[ODE] Sensors in ODE

Alex Rubinsteyn rubnstyn at uiuc.edu
Fri Feb 25 18:21:07 MST 2005


I've written a 3d agent simulation using ODE as the physics
engine. I'd like to add sensors to the agents...but I'm not
sure how to do it. 

Intuitively the dRay class seems like it would be useful for
implementing sensors...project rays from each sensor, use the
contact distance to generate sensor values. 

But...I have different types of objects, and and sensors that
are tuned to only some of those objects. 

struct Object
{
string type;
dBodyID body;
dGeomID geom; 
Sensor sensor; 
};

Sensor
{
float value; 
string specificity; //what Object->type am I sensitive to?
dGeomID ray;
};

If a ray intersects another geom, it should test the type of
the Object that contains the body, and if that type matches
Sensor::specificity, then increase Sensor::value depending on
contact distance. 

Any ideas on how to accomplish this? Anyone here done
something similar?

Thanks, 
Alex



More information about the ODE mailing list