#include <defaultCaterpillar.h>
Inherits OdeRobot.
Inherited by CaterPillar.
Inheritance diagram for DefaultCaterPillar:
Public Member Functions | |
DefaultCaterPillar (const OdeHandle &odeHandle, const OsgHandle &osgHandle, const CaterPillarConf &conf, const std::string &name, const std::string &revision) | |
virtual | ~DefaultCaterPillar () |
virtual void | place (const osg::Matrix &pose) |
sets the pose of the vehicle | |
virtual void | update () |
update all primitives and joints | |
virtual bool | collisionCallback (void *data, dGeomID o1, dGeomID o2) |
This is the collision handling function for snake robots. | |
virtual void | doInternalStuff (const GlobalData &global) |
this function is called in each timestep. | |
virtual void | setMotors (const motor *motors, int motornumber)=0 |
Reads the actual motor commands from an array, an sets all motors of the snake to this values. | |
virtual int | getSensors (sensor *sensors, int sensornumber)=0 |
Writes the sensor values to an array in the memory. | |
virtual int | getSensorNumber ()=0 |
returns number of sensors | |
virtual int | getMotorNumber ()=0 |
returns number of motors | |
virtual int | getSegmentsPosition (std::vector< Position > &poslist) |
returns a vector with the positions of all segments of the robot | |
virtual paramlist | getParamList () const |
The list of all parameters with there value as allocated lists. | |
virtual paramval | getParam (const paramkey &key) const |
returns the value of the requested parameter or 0 (+ error message to stderr) if unknown. | |
virtual bool | setParam (const paramkey &key, paramval val) |
sets the value of the given parameter or does nothing if unknown. | |
virtual Primitive * | getMainPrimitive () const |
the main object of the robot, which is used for position and speed tracking | |
Static Public Member Functions | |
CaterPillarConf | getDefaultConf () |
void | mycallback (void *data, dGeomID o1, dGeomID o2) |
Protected Member Functions | |
virtual void | create (const osg::Matrix &pose) |
creates vehicle at desired position | |
virtual void | destroy () |
destroys vehicle and space | |
Protected Attributes | |
bool | created |
std::vector< Primitive * > | objects |
std::vector< Joint * > | joints |
std::vector< AngularMotor * > | frictionmotors |
CaterPillarConf | conf |
It consists of a number of equal elements, each linked by a joint
|
|
|
|
|
This is the collision handling function for snake robots. This overwrides the function collisionCallback of the class robot.
Implements OdeRobot.
|
|
creates vehicle at desired position
Reimplemented in CaterPillar.
|
|
destroys vehicle and space
Reimplemented in CaterPillar.
|
|
this function is called in each timestep. It should perform robot-internal checks, like space-internal collision detection, sensor resets/update etc.
Implements OdeRobot.
|
|
|
|
the main object of the robot, which is used for position and speed tracking
Implements OdeRobot.
|
|
returns number of motors
Implements AbstractRobot.
Implemented in CaterPillar.
|
|
returns the value of the requested parameter or 0 (+ error message to stderr) if unknown.
Reimplemented from Configurable.
|
|
The list of all parameters with there value as allocated lists.
Reimplemented from Configurable.
|
|
returns a vector with the positions of all segments of the robot
|
|
returns number of sensors
Implements AbstractRobot.
Implemented in CaterPillar.
|
|
Writes the sensor values to an array in the memory.
Implements AbstractRobot.
Implemented in CaterPillar.
|
|
|
|
sets the pose of the vehicle
Implements OdeRobot.
|
|
Reads the actual motor commands from an array, an sets all motors of the snake to this values. It is an linear allocation.
Implements AbstractRobot.
Implemented in CaterPillar.
|
|
sets the value of the given parameter or does nothing if unknown.
Reimplemented from Configurable.
Reimplemented in CaterPillar.
|
|
update all primitives and joints
Implements OdeRobot.
|
|
|
|
|
|
|
|
|
|
|