#include <schlange.h>
Inherits OdeRobot.
Inherited by SchlangeForce, SchlangeServo, SchlangeServo2, and SchlangeVelocity.
Inheritance diagram for Schlange:
Public Member Functions | |
Schlange (const OdeHandle &odeHandle, const OsgHandle &osgHandle, const SchlangeConf &conf, const std::string &name, const std::string &revision) | |
virtual | ~Schlange () |
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 | |
virtual void | setTexture (const std::string &filename) |
sets a texture to the body of the snake note: the head texture of the snake is set by this method too! | |
virtual void | setHeadTexture (const std::string &filename) |
sets a texture to the head of the snake | |
virtual void | setHeadColor (const Color &color) |
sets the color of the head element | |
Static Public Member Functions | |
SchlangeConf | 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 Primitive * | createSegment (int index) |
creates and initialised the segment with the given index | |
virtual void | destroy () |
destroys vehicle and space | |
Protected Attributes | |
bool | created |
std::vector< Primitive * > | objects |
std::vector< Joint * > | joints |
std::vector< AngularMotor * > | frictionmotors |
SchlangeConf | 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 SchlangeForce, SchlangeServo, SchlangeServo2, and SchlangeVelocity.
|
|
creates and initialised the segment with the given index
Reimplemented in PlattfussSchlange.
|
|
destroys vehicle and space
Reimplemented in SchlangeForce, SchlangeServo, SchlangeServo2, and SchlangeVelocity.
|
|
this function is called in each timestep. It should perform robot-internal checks, like space-internal collision detection, sensor resets/update etc.
Implements OdeRobot.
|
|
Reimplemented in SchlangeVelocity.
|
|
the main object of the robot, which is used for position and speed tracking
Implements OdeRobot.
|
|
returns number of motors
Implements AbstractRobot.
Implemented in SchlangeForce, SchlangeServo, SchlangeServo2, and SchlangeVelocity.
|
|
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 SchlangeForce, SchlangeServo, SchlangeServo2, and SchlangeVelocity.
|
|
Writes the sensor values to an array in the memory.
Implements AbstractRobot.
Implemented in SchlangeForce, SchlangeServo, SchlangeServo2, and SchlangeVelocity.
|
|
|
|
sets the pose of the vehicle
Implements OdeRobot.
|
|
sets the color of the head element
|
|
sets a texture to the head of the snake
|
|
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 SchlangeForce, SchlangeServo, SchlangeServo2, and SchlangeVelocity.
|
|
sets the value of the given parameter or does nothing if unknown.
Reimplemented from Configurable.
Reimplemented in SchlangeServo, and SchlangeServo2.
|
|
sets a texture to the body of the snake note: the head texture of the snake is set by this method too!
|
|
update all primitives and joints
Implements OdeRobot.
|
|
|
|
|
|
|
|
|
|
|