SphererobotTest Class Reference

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

#include <sphererobotTest.h>

List of all members.

Public Types

enum  objects {
  Base, Pendular, Pole1Bot, Pole2Bot,
  Pole3Bot, Pole1Top, Pole2Top, Pole3Top
}

Public Member Functions

 SphererobotTest (int startRoboterID, const OdeHandle &odeHandle, const SphererobotConf &conf)
 constructor
virtual ~SphererobotTest ()
 Destruktor.
virtual void draw ()
 Draws the geometrical objects of the robot.
virtual void place (Position pos, Color *c=0)
 Sets the sphere to position pos, sets color to c, and creates sphere if necessary.
virtual bool collisionCallback (void *data, dGeomID o1, dGeomID o2)
 This is the collision handling function for snake robots.
virtual int getSensors (sensor *sensors, int sensornumber)
 Writes the sensor values to an array in the memory.
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 getMotorNumber ()
 Returns the number of motors used by the snake.
virtual int getSensorNumber ()
 Returns the number of sensors used by the robot.
virtual void sensoraktualisierung ()
 Updates the sensorarray.
virtual void getStatus ()
 Prints some internal robot parameters.

Static Public Member Functions

SphererobotConf getStandartConf ()
void mycallback (void *data, dGeomID o1, dGeomID o2)

Public Attributes

SliderServo * servo

Protected Member Functions

virtual Object getMainObject ()

Protected Attributes

SphererobotConf conf
double lastJointPos [3]

Private Attributes

dSpaceID sphererobot_space
vector< PID * > motorliste2


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. This class is based upon the class roboter by the same author.

Author:
Marcel Kretschmann
Version:
beta


Member Enumeration Documentation

enum objects
 

Enumeration values:
Base 
Pendular 
Pole1Bot 
Pole2Bot 
Pole3Bot 
Pole1Top 
Pole2Top 
Pole3Top 


Constructor & Destructor Documentation

SphererobotTest int  startRoboterID,
const OdeHandle &  odeHandle,
const SphererobotConf &  conf
 

constructor

Parameters:
startRoboterID ID, which should be managed clearly
Author:
Marcel Kretschmann
Version:
beta

~SphererobotTest  )  [virtual]
 

Destruktor.

Author:
Marcel Kretschmann
Version:
beta


Member Function Documentation

bool collisionCallback void *  data,
dGeomID  o1,
dGeomID  o2
[virtual]
 

This is the collision handling function for snake robots.

This overwrides the function collisionCallback of the class robot.

Parameters:
data 
o1 first geometrical object, which has taken part in the collision
o2 second geometrical object, which has taken part in the collision
Returns:
true if the collision was threated by the robot, false if not
Author:
Marcel Kretschmann
Version:
beta

void draw  )  [virtual]
 

Draws the geometrical objects of the robot.

Author:
Marcel Kretschmann
Version:
beta

virtual Object getMainObject  )  [inline, protected, virtual]
 

int getMotorNumber  )  [virtual]
 

Returns the number of motors used by the snake.

Returns:
number of motors
Author:
Marcel Kretschmann
Version:
final

int getSensorNumber  )  [virtual]
 

Returns the number of sensors used by the robot.

Returns:
number of sensors
Author:
Marcel Kretschmann
Version:
final

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
Author:
Marcel Kretschmann
Version:
beta

SphererobotConf getStandartConf  )  [inline, static]
 

void getStatus  )  [virtual]
 

Prints some internal robot parameters.

Actualy it prints all sensor data of one callculation step.

Author:
Marcel Kretschmann
Version:
beta

void mycallback void *  data,
dGeomID  o1,
dGeomID  o2
[static]
 

void place Position  pos,
Color *  c = 0
[virtual]
 

Sets the sphere to position pos, sets color to c, and creates sphere if necessary.

This overwrides the function place of the class robot.

Parameters:
pos desired position of the snake in struct Position
c desired color for the snake in struct Color
Author:
Marcel Kretschmann
Version:
beta

void sensoraktualisierung  )  [virtual]
 

Updates the sensorarray.

This overwrides the function sensoraktualisierung of the class robot

Author:
Marcel Kretschmann
Version:
beta

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.

It is an linear allocation.

Parameters:
motors pointer to the array, motor values are scaled to [-1,1]
motornumber length of the motor array
Author:
Marcel Kretschmann
Version:
beta


Member Data Documentation

SphererobotConf conf [protected]
 

double lastJointPos[3] [protected]
 

vector<PID*> motorliste2 [private]
 

SliderServo* servo
 

dSpaceID sphererobot_space [private]
 


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