I am using Panda’s ODE:
Setup:
space = OdeSimpleSpace()
space.setAutoCollideWorld(world)
contactgroup = OdeJointGroup()
space.setAutoCollideJointGroup(contactgroup)
Simulation Task:
def simulationTask1(self, task):
self.space.autoCollide() # Setup the contact joints
# Step the simulation and set the new positions
self.world.quickStep(globalClock.getDt())
for b_ode in self.objectlist:
if b_ode.isDynamic():
np = b_ode.realObj
#body = b_ode.body
body = b_ode.geom
np.setPosQuat(render, body.getPosition(), Quat(body.getQuaternion()))
self.contactgroup.empty() # Clear the contact joints
return task.cont
How can I get back the contact joints from self.contactgroup before I empty it ? I would like to know the contact points to make some visual effect. But I can’t find the method to do so.
Also, is there corresponding functions in Panda’s ODE to perform a near_callback when object collides ?