#include <defaultWheelie.h>
Inherits OdeRobot.
Inherited by Wheelie.
Inheritance diagram for DefaultWheelie:
Public Member Functions | |
DefaultWheelie (const OdeHandle &odeHandle, const OsgHandle &osgHandle, const WheelieConf &conf, const std::string &name, const std::string &revision) | |
virtual | ~DefaultWheelie () |
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 (GlobalData &global) |
this function is called in each timestep after control. | |
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 |
virtual bool | setParam (const paramkey &key, paramval val) |
virtual Primitive * | getMainPrimitive () const |
the main object of the robot, which is used for position and speed tracking | |
Static Public Member Functions | |
static WheelieConf | getDefaultConf () |
static 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 |
WheelieConf | conf |
It consists of a number of equal elements, each linked by a joint
DefaultWheelie | ( | const OdeHandle & | odeHandle, | |
const OsgHandle & | osgHandle, | |||
const WheelieConf & | conf, | |||
const std::string & | name, | |||
const std::string & | revision | |||
) |
~DefaultWheelie | ( | ) | [virtual] |
bool collisionCallback | ( | void * | data, | |
dGeomID | o1, | |||
dGeomID | o2 | |||
) | [virtual] |
This is the collision handling function for snake robots.
This overwrides the function collisionCallback of the class robot.
data | ||
o1 | first geometrical object, which has taken part in the collision | |
o2 | second geometrical object, which has taken part in the collision |
Reimplemented from OdeRobot.
void create | ( | const osg::Matrix & | pose | ) | [protected, virtual] |
creates vehicle at desired position
pose | 4x4 pose matrix |
void destroy | ( | ) | [protected, virtual] |
destroys vehicle and space
void doInternalStuff | ( | GlobalData & | global | ) | [virtual] |
this function is called in each timestep after control.
It should perform robot-internal checks and actions, like acting and sensing of internal motors/sensors etc.
globalData | structure that contains global data from the simulation environment |
Implements OdeRobot.
static WheelieConf getDefaultConf | ( | ) | [inline, static] |
virtual Primitive* getMainPrimitive | ( | ) | const [inline, virtual] |
virtual int getMotorNumber | ( | ) | [pure virtual] |
Configurable::paramval getParam | ( | const paramkey & | key | ) | const [virtual] |
Configurable::paramlist getParamList | ( | ) | const [virtual] |
The list of all parameters with there value as allocated lists.
Reimplemented from Configurable.
int getSegmentsPosition | ( | std::vector< Position > & | poslist | ) | [virtual] |
returns a vector with the positions of all segments of the robot
poslist | vector of positions (of all robot segments) |
virtual int getSensorNumber | ( | ) | [pure virtual] |
virtual int getSensors | ( | sensor * | sensors, | |
int | sensornumber | |||
) | [pure virtual] |
Writes the sensor values to an array in the memory.
sensors | pointer to the array | |
sensornumber | length of the sensor array |
Implements AbstractRobot.
Implemented in Wheelie.
void mycallback | ( | void * | data, | |
dGeomID | o1, | |||
dGeomID | o2 | |||
) | [static] |
void place | ( | const osg::Matrix & | pose | ) | [virtual] |
virtual void setMotors | ( | const motor * | motors, | |
int | motornumber | |||
) | [pure virtual] |
Reads the actual motor commands from an array, an sets all motors of the snake to this values.
It is an linear allocation.
motors | pointer to the array, motor values are scaled to [-1,1] | |
motornumber | length of the motor array |
Implements AbstractRobot.
Implemented in Wheelie.
void update | ( | ) | [virtual] |
WheelieConf conf [protected] |
bool created [protected] |
std::vector<AngularMotor*> frictionmotors [protected] |