[solved] ode environment


I have been using PyOde with Panda 1.5.2, but now that ode is integrated into 1.5.3 it seems sensible to use the integrated version.

I want to attach a body to the ode.environment using a joint, but I can’t seem to find the ode environment variable anywhere.

Could someone please tell me how I would do this in Panda 1.5.3?


OK, I found the solution in libPandaOdeModules:

“If either body is None, the other will be attached to the environment.”

This comment comes a long time later, but I have a similar problem with Panda3d 1.9.4.

When I tried to do :
from panda3d.ode import *
joint.attach(body1,None) #None is supposed to pin a joint to the environment
# but causes error. Fix with attachBody() as per below

ppython throws the error " TypeError: OdeJoint.attach() argument 2 must be OdeBody, not NoneType"

Eventually I found I could fix it using
joint.attachBody(body1,1) #this connects body1 to end 1 and ‘environment’ to end 0

BTW this means that the odeBallJoint Example in the Panda3d doco is broken…