ODE Middleware

I’m glad you like it :slight_smile:.

Yeah, perhaps I should have made an example of that in the package… Don’t know why I haven’t, so maybe I’ll update it with some boxes.

Anyway, yes, the box, or any other object that you want to be animated by ODE rather than by hand, should be Dynamic. But that’s the default setting when you look at setGeomData method.

It’s actually quite simple to do. You haven’t provided much information (a complete piece of code where you setup stuff would be very helpful next time), but I think I can see what’s wrong.

Instead of setGeomData(boxGeom, boxData) you should have used this:

self.worldManager.setGeomData(boxGeom, boxData, boxModel)

If you take a look into the odeWorldManager code you’ll see that this method takes 4 arguments: geom, data, object, kinematic. Geom is the OdeGeom, data is OdeGeomData and object is the visible 3D model. Kinematic is obviously a switch between kinematic and dynamic.

If you don’t add a value for the “object” argument the code will not crash however, since that’s the way you can add Static objects which are not animated in any way – neither by you nor by ODE. Objects such as walls (you can see setGeomData with None as object argument in main.py when I setup the static environment). In such objects the positions of graphical representation and collision body don’t need to be updated every frame since they do not change. But you need to remember about this, since if you forget the “object” argument you will end up with static objects by accident and no error to warn you (if you want such error you can modify the setGeomData() method to request the object argument and remember to set is to None for Statics).

Try this and let me know if it works.