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

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages
- Examples

- Search for |

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# VierBeiner Class Reference

robot that should look like a dog More...

`#include <vierbeiner.h>`

Inherits OdeRobot.

Inheritance diagram for VierBeiner:

[legend]
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 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

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

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

Parameters:

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

Parameters:

  | globalData | structure that contains global data from the simulation environment

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

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

Parameters:

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

Returns:
  number of actually written sensors

Implements AbstractRobot.

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.

bool setParam | ( | const paramkey & | key,
|  | paramval | val |
| ) |  |  | `[virtual]`

void update | ( |  | ) | `[virtual]`

updates the osg notes

Implements OdeRobot.

## Member Data Documentation

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

Primitive * bigboxtransform`[protected]`

VierBeinerConf conf`[protected]`

bool created`[protected]`

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

Primitive * headtrans`[protected]`

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

std::vector<Joint*> joints`[protected]`

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

double legmass`[protected]`

Primitive * neck`[protected]`

std::vector<Primitive*> objects`[protected]`

Primitive * tail`[protected]`

Primitive* trunk`[protected]`

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

- vierbeiner.h
- vierbeiner.cpp