Abstract class for ODE robots. More...
#include <oderobot.h>
Inherits AbstractRobot.
Inherited by AddSensors2RobotAdapter, Arm, Arm2Segm, Component, DefaultCaterPillar, DefaultWheelie, Discus, ForcedSphere, Formel1, Hand, HurlingSnake, MuscledArm, Nimm2, Nimm4, ReplayRobot, Schlange, ShortCircuit, SliderWheelie, Sphererobot, Sphererobot3Masses, TruckMesh, Uwo, and VierBeiner.
Public Member Functions | |
OdeRobot (const OdeHandle &odeHandle, const OsgHandle &osgHandle, const std::string &name, const std::string &revision) | |
Constructor. | |
virtual | ~OdeRobot () |
virtual void | update ()=0 |
update the OSG notes here | |
virtual void | place (const Pos &pos) |
sets the vehicle to position pos | |
virtual void | place (const osg::Matrix &pose)=0 |
sets the pose of the vehicle | |
virtual bool | collisionCallback (void *data, dGeomID o1, dGeomID o2) |
virtual void | sense (GlobalData &globalData) |
this function is called each controlstep before control. | |
virtual void | doInternalStuff (GlobalData &globalData) |
this function is called in each simulation timestep (always after control). | |
virtual void | setColor (const Color &col) |
sets color of the robot | |
virtual Position | getPosition () const |
returns position of the object | |
virtual Position | getSpeed () const |
returns linear speed vector of the object | |
virtual Position | getAngularSpeed () const |
returns angular velocity vector of the object | |
virtual matrix::Matrix | getOrientation () const |
returns the orientation of the object | |
virtual Primitive * | getMainPrimitive () const =0 |
return the primitive of the robot that is used for tracking and camera following | |
Static Protected Member Functions | |
static bool | isGeomInPrimitiveList (Primitive **ps, int len, dGeomID geom) |
static bool | isGeomInPrimitiveList (std::list< Primitive * > ps, dGeomID geom) |
Protected Attributes | |
OdeHandle | odeHandle |
OsgHandle | osgHandle |
dSpaceID | parentspace |
Friends | |
class | OdeAgent |
Abstract class for ODE robots.
OdeRobot | ( | const OdeHandle & | odeHandle, | |
const OsgHandle & | osgHandle, | |||
const std::string & | name, | |||
const std::string & | revision | |||
) |
Constructor.
odehandle | structure with all global ODE variables |
~OdeRobot | ( | ) | [virtual] |
virtual bool collisionCallback | ( | void * | data, | |
dGeomID | o1, | |||
dGeomID | o2 | |||
) | [inline, virtual] |
Reimplemented in AddSensors2RobotAdapter, Arm, Arm2Segm, AtomComponent, Component, DefaultCaterPillar, DefaultWheelie, ForcedSphere, Formel1, Hand, MuscledArm, Nimm2, ReplayRobot, RobotComponent, ShortCircuit, SimpleComponent, SliderWheelie, Sphererobot, TruckMesh, Uwo, and VierBeiner.
virtual void doInternalStuff | ( | GlobalData & | globalData | ) | [inline, virtual] |
this function is called in each simulation timestep (always after control).
It should perform robot-internal checks and actions like resetting certain sensors or implement velocity dependend friction and the like. The attached Motors should act here.
globalData | structure that contains global data from the simulation environment |
Reimplemented in AddSensors2RobotAdapter, Arm, Arm2Segm, AtomComponent, DefaultCaterPillar, DefaultWheelie, Discus, ForcedSphere, Formel1, FourWheeled, Hand, HurlingSnake, MuscledArm, Nimm2, Nimm4, ReplayRobot, RobotComponent, Schlange, ShortCircuit, SimpleComponent, SliderWheelie, Sphererobot, Sphererobot3Masses, TruckMesh, Uwo, and VierBeiner.
Position getAngularSpeed | ( | ) | const [virtual] |
virtual Primitive* getMainPrimitive | ( | ) | const [pure virtual] |
return the primitive of the robot that is used for tracking and camera following
Implemented in AddSensors2RobotAdapter, Arm, Arm2Segm, AtomComponent, Component, DefaultCaterPillar, DefaultWheelie, Discus, ForcedSphere, Formel1, Hand, HurlingSnake, MuscledArm, Nimm2, Nimm4, PrimitiveComponent, ReplayRobot, RobotComponent, Schlange, ShortCircuit, SimpleComponent, SliderWheelie, Sphererobot, Sphererobot3Masses, TruckMesh, Uwo, and VierBeiner.
matrix::Matrix getOrientation | ( | ) | const [virtual] |
Position getPosition | ( | ) | const [virtual] |
returns position of the object
Implements Trackable.
Reimplemented in AtomComponent, Component, PrimitiveComponent, RobotComponent, and SimpleComponent.
Position getSpeed | ( | ) | const [virtual] |
bool isGeomInPrimitiveList | ( | std::list< Primitive * > | ps, | |
dGeomID | geom | |||
) | [static, protected] |
bool isGeomInPrimitiveList | ( | Primitive ** | ps, | |
int | len, | |||
dGeomID | geom | |||
) | [static, protected] |
virtual void place | ( | const osg::Matrix & | pose | ) | [pure virtual] |
sets the pose of the vehicle
pose | desired 4x4 pose matrix |
Implemented in AddSensors2RobotAdapter, Arm, Arm2Segm, AtomComponent, DefaultCaterPillar, DefaultWheelie, Discus, ForcedSphere, Formel1, Hand, HurlingSnake, MuscledArm, Nimm2, Nimm4, ReplayRobot, RobotComponent, Schlange, ShortCircuit, SimpleComponent, SliderWheelie, Sphererobot, Sphererobot3Masses, TruckMesh, Uwo, and VierBeiner.
void place | ( | const Pos & | pos | ) | [virtual] |
sets the vehicle to position pos
pos | desired position of the robot |
Reimplemented in AtomComponent, Component, PrimitiveComponent, RobotComponent, and SimpleComponent.
virtual void sense | ( | GlobalData & | globalData | ) | [inline, virtual] |
this function is called each controlstep before control.
This is the place the perform active sensing (e.g. Image processing)
globalData | structure that contains global data from the simulation environment |
Reimplemented in AddSensors2RobotAdapter, and TwoWheeled.
void setColor | ( | const Color & | col | ) | [virtual] |
virtual void update | ( | ) | [pure virtual] |
update the OSG notes here
Implemented in AddSensors2RobotAdapter, Arm, Arm2Segm, AtomComponent, Component, DefaultCaterPillar, DefaultWheelie, Discus, ForcedSphere, Formel1, FourWheeled, Hand, HurlingSnake, MuscledArm, Nimm2, Nimm4, PrimitiveComponent, ReplayRobot, RobotComponent, Schlange, ShortCircuit, SimpleComponent, SliderWheelie, Sphererobot, Sphererobot3Masses, TruckMesh, TwoWheeled, Uwo, and VierBeiner.
friend class OdeAgent [friend] |
dSpaceID parentspace [protected] |
Reimplemented in Arm, Arm2Segm, and MuscledArm.