CaterPillar Class Reference

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

#include <caterpillar.h>

Inherits lpzrobots::DefaultCaterPillar.

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 std::string &name)
virtual ~CaterPillar ()
virtual void setMotors (const motor *motors, int motornumber)
 Reads the actual motor commands from an array, an sets all motors 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 void notifyOnChange (const paramkey &key)
 Is called when a parameter was changes via setParam().

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 std::string &  name 
)
~CaterPillar (  )  [virtual]

Member Function Documentation

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
Parameters:
sensor* pointer to the arrays
sensornumber length of the sensor array
Returns:
number of actually written sensors

Implements DefaultCaterPillar.

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

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

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

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

It is a linear allocation.

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

Implements DefaultCaterPillar.


The documentation for this class was generated from the following files:
Generated on Thu Jun 28 14:48:54 2012 for Robot Simulator of the Robotics Group for Self-Organization of Control by  doxygen 1.6.3