CaterPillar Class Reference

This is a class, which models a snake like robot. More...

#include <caterpillar.h>

Inherits DefaultCaterPillar.

Inheritance diagram for CaterPillar:

Inheritance graph
[legend]
Collaboration diagram for CaterPillar:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CaterPillar (const OdeHandle &odeHandle, const OsgHandle &osgHandle, const CaterPillarConf &conf, const char *name)
virtual ~CaterPillar ()
virtual void setMotors (const motor *motors, int motornumber)
 Reads the actual motor commands from an array, and sets all motors (forces) of the snake to this values.
virtual int getSensors (sensor *sensors, int sensornumber)
 Writes the sensor values to an array in the memory.
virtual int getSensorNumber ()
 returns number of sensors
virtual int getMotorNumber ()
 returns number of motors
virtual bool setParam (const paramkey &key, paramval val)
 sets the value of the given parameter or does nothing if unknown.

Private Member Functions

virtual void create (const osg::Matrix &pose)
 creates vehicle at desired position
virtual void destroy ()
 destroys vehicle and space

Private Attributes

std::vector< UniversalServo * > universalServos
std::vector< SliderServo * > sliderServos

Detailed Description

This is a class, which models a snake like robot.

It consists of a number of equal elements, each linked by a joint powered by 2 servos


Constructor & Destructor Documentation

CaterPillar const OdeHandle odeHandle,
const OsgHandle osgHandle,
const CaterPillarConf conf,
const char *  name
 

~CaterPillar  )  [virtual]
 


Member Function Documentation

void create const osg::Matrix pose  )  [private, virtual]
 

creates vehicle at desired position

Parameters:
pos struct Position with desired position

Reimplemented from DefaultCaterPillar.

void destroy  )  [private, virtual]
 

destroys vehicle and space

Reimplemented from DefaultCaterPillar.

virtual int getMotorNumber  )  [inline, virtual]
 

returns number of motors

Implements DefaultCaterPillar.

virtual int getSensorNumber  )  [inline, virtual]
 

returns number of sensors

Implements DefaultCaterPillar.

int getSensors sensor sensors,
int  sensornumber
[virtual]
 

Writes the sensor values to an array in the memory.

Parameters:
sensors pointer to the array
sensornumber length of the sensor array
Returns:
number of actually written sensors

Implements DefaultCaterPillar.

void setMotors const motor motors,
int  motornumber
[virtual]
 

Reads the actual motor commands from an array, and sets all motors (forces) of the snake to this values.

It is an linear allocation.

Parameters:
motors pointer to the array, motor values are scaled to [-1,1]
motornumber length of the motor array

Implements DefaultCaterPillar.

bool setParam const paramkey key,
paramval  val
[virtual]
 

sets the value of the given parameter or does nothing if unknown.

Reimplemented from DefaultCaterPillar.


Member Data Documentation

std::vector<SliderServo*> sliderServos [private]
 

std::vector<UniversalServo*> universalServos [private]
 


The documentation for this class was generated from the following files:
Generated on Tue Jan 16 02:14:53 2007 for Robotsystem of the Robot Group Leipzig by doxygen 1.3.8