robot that should look like a dog More...
#include <vierbeiner.h>
Inherits lpzrobots::OdeRobot.
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 nodes of the vehicle | |
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 |
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 | |
static VierBeinerConf | getDefaultConf () |
Protected Member Functions | |
virtual void | create (const osg::Matrix &pose) |
creates vehicle at desired pose | |
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 |
robot that should look like a dog
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 pose
creates vehicle at desired position
pose | 4x4 pose matrix | |
pos | struct Position with desired position |
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 & | global | ) | [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 |
It should perform robot-internal checks, like space-internal collision detection, sensor resets/update etc.
global | structure that contains global data from the simulation environment |
Reimplemented from OdeRobot.
static VierBeinerConf getDefaultConf | ( | ) | [inline, static] |
virtual Primitive* getMainPrimitive | ( | ) | const [inline, virtual] |
the main object of the robot, which is used for position and speed tracking
Implements OdeRobot.
int getMotorNumber | ( | ) | [virtual] |
returns number of motors
Implements AbstractRobot.
Configurable::paramval getParam | ( | const paramkey & | key | ) | const [virtual] |
returns the value of the requested parameter or 0 (+ error message to stderr) if unknown.
Reimplemented from Configurable.
Configurable::paramlist getParamList | ( | ) | const [virtual] |
The list of all parameters with there value as allocated lists.
Reimplemented from Configurable.
int getSensorNumber | ( | ) | [virtual] |
returns number of sensors
Implements AbstractRobot.
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.
sets the value of the given parameter or does nothing if unknown.
Reimplemented from Configurable.
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] |