Robot Simulator of the Robotics Group for Self-Organization of Control: VierBeiner Class Reference

# VierBeiner Class Reference

robot that should look like a dog More...

`#include <vierbeiner.h>`

Inherits lpzrobots::OdeRobot.

Collaboration diagram for VierBeiner:
[legend]

List of all members.

## 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 void | doInternalStuff (GlobalData &globalData)
| this function is called in each timestep.
virtual void | notifyOnChange (const paramkey &key)
| Is called when a parameter was changes via setParam().
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
Primitive * | eye_r_trans
Primitive * | eye_l_trans
Primitive * | ear_l_trans
Primitive * | ear_r_trans
Primitive * | mouth_trans
std::vector< OneAxisServo * > | hipservos
std::vector< OneAxisServo * > | kneeservos
std::vector< OneAxisServo * > | ankleservos
std::vector< OneAxisServo * > | headtailservos
std::list< Primitive * > | legparts

## Detailed Description

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

## Constructor & Destructor Documentation

VierBeiner | ( | const OdeHandle & | odeHandle,
|  | const OsgHandle & | osgHandle,
|  | const VierBeinerConf & | conf,
|  | const std::string & | name |
| ) |  |  |

constructor of VierBeiner robot

Parameters:

  | odeHandle | data structure for accessing ODE
  | osgHandle | ata structure for accessing OSG
  | conf | configuration object

virtual ~VierBeiner | ( |  | ) | `[inline, virtual]`

## Member Function Documentation

void create | ( | const osg::Matrix & | pose | ) | `[protected, virtual]`

creates vehicle at desired pose

creates vehicle at desired position

Parameters:

  | 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.

Parameters:

  | 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.

Parameters:

  | 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

Reimplemented from OdeRobot.

int getMotorNumber | ( |  | ) | `[virtual]`

returns number of motors

Implements AbstractRobot.

int getSensorNumber | ( |  | ) | `[virtual]`

returns number of sensors

Implements AbstractRobot.

int getSensors | ( | sensor * | sensors,
|  | int | sensornumber |
| ) |  |  | `[virtual]`

returns actual sensorvalues

Parameters:

  | sensors | sensors scaled to [-1,1]
  | sensornumber | length of the sensor array

Returns:
  number of actually written sensors

Implements AbstractRobot.

void notifyOnChange | ( | const paramkey & | key | ) | `[virtual]`

Is called when a parameter was changes via setParam().

Note that it is not called of parameters of childs are changed, then there notifyOnChange() method is called. The key and of the changed parameter (use getParam() to retrieve its actual value). Overload this function when special actions have to be taken on parameter changes.

Reimplemented from Configurable.

void place | ( | const osg::Matrix & | pose | ) | `[virtual]`

sets the pose of the vehicle

Parameters:

  | pose | desired pose matrix

Implements OdeRobot.

void setMotors | ( | const motor * | motors,
|  | int | motornumber |
| ) |  |  | `[virtual]`

sets actual motorcommands

Parameters:

  | 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]`

updates the OSG nodes of the vehicle

updates the osg notes

Implements OdeRobot.

## Member Data Documentation

std::vector<OneAxisServo*> ankleservos`[protected]`

Primitive * bigboxtransform`[protected]`

VierBeinerConf conf`[protected]`

bool created`[protected]`

Primitive * ear_l_trans`[protected]`

Primitive * ear_r_trans`[protected]`

Primitive * eye_l_trans`[protected]`

Primitive* eye_r_trans`[protected]`

std::vector<OneAxisServo*> headtailservos`[protected]`

Primitive * headtrans`[protected]`

std::vector<OneAxisServo*> hipservos`[protected]`

std::vector<OneAxisServo*> kneeservos`[protected]`

double legmass`[protected]`

std::list<Primitive*> legparts`[protected]`

Primitive * mouth_trans`[protected]`

Primitive * neck`[protected]`

Primitive * tail`[protected]`

Primitive* trunk`[protected]`

The documentation for this class was generated from the following files:

- vierbeiner.h
- vierbeiner.cpp