PandaODE questions

Hi! I have some questions about ODE implementation in Panda3D (I’ve searched in the forum history and API reference but without results):

  1. How can i access to ode.environment equivalent? I need to have some static collision geometries so I need to set the ODE environment as body for them.

  2. How can i disable collisions between two geometries? I’ve a car model composed by a chassis and four wheels and i want to disable collisions from wheels to chassis and viceversa but i need to preserve collisions between wheels and ground.

  3. This is a personal opinion: why we need another customized implementation of an existent physics engine? Why we don’t implement a generic abstraction layer with Python bindings instead of a partial porting of an existent API (which already has its Python bindings -> PyODE)?

Thanks!

I’ve found this thread:

https://discourse.panda3d.org/viewtopic.php?t=4956&highlight=ode+environment

but the solution doesn’t work. I can’t write something like this:

static_geom.setBody(None)

and if i don’t set a body for a geometry, ODE returns an error:

ODE INTERNAL ERROR 1: 

assertion "bNormalizationResult" failed in ...

just don’t call setBody at all and it will be fine.

you need to use collision and category bitmasks. See the manual: panda3d.org/manual/index.php/Collision_Bitmasks

good question, but I don’t know the answer.

Hmm, with my tests I’m pretty sure setting the body to None or False worked. Even in the PyODE implementation ode.environment is the same as False or None.

As mentioned by dinoint, there are collision bitmasks for ODE although the linked manual page isn’t directly related to ODE. In ODE you set the bitmasks using Geom.setCollideBits and Geom.setCategoryBits. I’m not quite sure what the difference between category and collide bits are but I know they’re both used for collision masking.

Because the disney devs aren’t interested in a heavy duty physics engine implementation, they’re just using it for simple physics simulations. The panda implementation of ODE is also so similar to PyODE that you can use the PyODE documentation for help. Unless theres community interest and work to put in a feature in panda we basically have to wait until disney has a use for such a feature.

I did some stuff with PyODE and Panda3D before ODE was (semi-)integrated into Panda. It was a real PITA having to convert between Panda and PyODE types all the time. There may be other reasons but that alone is reason enough IMO.