#include <vierbeiner.h>
Inherits OdeRobot.
Inheritance diagram for VierBeiner:
Public Member Functions | |
VierBeiner (const OdeHandle &odeHandle, const OsgHandle &osgHandle, const VierBeinerConf &conf, const std::string &name) | |
constructor of VierBeiner robot | |
virtual | ~VierBeiner () |
virtual void | update () |
updates the osg notes | |
virtual void | place (const osg::Matrix &pose) |
sets the pose of the vehicle | |
virtual int | getSensors (sensor *sensors, int sensornumber) |
returns actual sensorvalues | |
virtual void | setMotors (const motor *motors, int motornumber) |
sets actual motorcommands | |
virtual int | getSensorNumber () |
returns number of sensors | |
virtual int | getMotorNumber () |
returns number of motors | |
virtual bool | collisionCallback (void *data, dGeomID o1, dGeomID o2) |
checks for internal collisions and treats them. | |
virtual void | doInternalStuff (GlobalData &globalData) |
this function is called in each timestep. | |
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 VierBeinerConf | getDefaultConf () |
Protected Member Functions | |
virtual void | create (const osg::Matrix &pose) |
creates vehicle at desired position | |
virtual void | destroy () |
destroys vehicle and space | |
Protected Attributes | |
VierBeinerConf | conf |
double | legmass |
bool | created |
Primitive * | trunk |
Primitive * | headtrans |
Primitive * | bigboxtransform |
Primitive * | neck |
Primitive * | tail |
std::vector< Primitive * > | objects |
std::vector< Joint * > | joints |
std::vector< OneAxisServo * > | hipservos |
std::vector< OneAxisServo * > | kneeservos |
std::vector< OneAxisServo * > | ankleservos |
std::vector< OneAxisServo * > | headtailservos |
sensors/motors: 0: neck, 1: tail 2,3,4,5 : hip: rh, lh, rf, lf 6,7,8,9 : knee: rh, lh, rf, lf 10,11 : ankle rh, lh
VierBeiner | ( | const OdeHandle & | odeHandle, | |
const OsgHandle & | osgHandle, | |||
const VierBeinerConf & | conf, | |||
const std::string & | name | |||
) |
constructor of VierBeiner robot
odeHandle | data structure for accessing ODE | |
osgHandle | ata structure for accessing OSG | |
conf | configuration object |
virtual ~VierBeiner | ( | ) | [inline, virtual] |
bool collisionCallback | ( | void * | data, | |
dGeomID | o1, | |||
dGeomID | o2 | |||
) | [virtual] |
checks for internal collisions and treats them.
In case of a treatment return true (collision will be ignored by other objects and the default routine) else false (collision is passed to other objects and (if not treated) to the default routine).
Reimplemented from OdeRobot.
void create | ( | const osg::Matrix & | pose | ) | [protected, virtual] |
creates vehicle at desired position
pose | 4x4 pose matrix |
ignore collision between box on top of dog and head and also between head and body
ignore collision between box on top of dog and tail
void destroy | ( | ) | [protected, virtual] |
destroys vehicle and space
void doInternalStuff | ( | GlobalData & | globalData | ) | [virtual] |
this function is called in each timestep.
It should perform robot-internal checks, like space-internal collision detection, sensor resets/update etc.
globalData | structure that contains global data from the simulation environment |
Implements OdeRobot.
static VierBeinerConf getDefaultConf | ( | ) | [inline, static] |
virtual Primitive* getMainPrimitive | ( | ) | const [inline, virtual] |
int getMotorNumber | ( | ) | [virtual] |
Configurable::paramval getParam | ( | const paramkey & | key | ) | const [virtual] |
Configurable::paramlist getParamList | ( | ) | const [virtual] |
int getSensorNumber | ( | ) | [virtual] |
int getSensors | ( | sensor * | sensors, | |
int | sensornumber | |||
) | [virtual] |
returns actual sensorvalues
sensors | sensors scaled to [-1,1] | |
sensornumber | length of the sensor array |
Implements AbstractRobot.
void place | ( | const osg::Matrix & | pose | ) | [virtual] |
void setMotors | ( | const motor * | motors, | |
int | motornumber | |||
) | [virtual] |
sets actual motorcommands
motors | motors scaled to [-1,1] | |
motornumber | length of the motor array |
set knee servos to set point 0 (spring emulation)
set ankle servos to set point 0 (spring emulation)
Implements AbstractRobot.
void update | ( | ) | [virtual] |
std::vector<OneAxisServo*> ankleservos [protected] |
Primitive * bigboxtransform [protected] |
VierBeinerConf conf [protected] |
bool created [protected] |
std::vector<OneAxisServo*> headtailservos [protected] |
std::vector<OneAxisServo*> hipservos [protected] |
std::vector<OneAxisServo*> kneeservos [protected] |
double legmass [protected] |