Robot Simulator of the Robotics Group for Self-Organization of Control: ODE-Robots Collision handling

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages
- Examples

- Search for |

# ODE-Robots Collision handling

Since version 0.4 the collision handling was redesigned significantly.

It has the following features:

- Material properties for each object (Substance)
- No user specific collision code necessary
- Automatic ignorance of collisions between connected bodies
- User defined ignorance pairs
- fine grain callback functions on collisions possible (Substance)

How to set material properties
  Modify Substance in your local OdeHandle, e.g.

      odeHandle.substance.toRubber(20);
      // create Primitive with odeHandle
      Primitive* box = new Box(1,1,1);
      box->init(odeHandle, ...);

  would change the substance to a soft rubber. Once you have created a Primitive you can change its properties in the same way:

      box.substance.toMetal(0.6);

How to disable collisions between two primitives

      odeHandle.addIgnoredPair(p1,p2);
      // and to remove
      odeHandle.removeIgnoredPair(p1,p2);

  This mechanism is used internally for primitives that are connected by joints. So in most cases you don't have to worry about that.

How to disable collisions within an entire space

      odeHandle.addIgnoredSpace(spaceID);
      // and to remove
      odeHandle.removeIgnoredSpace(spaceID);

Todo: continue