ForcedSphere Class Reference

#include <forcedsphere.h>

Inheritance diagram for ForcedSphere:

Inheritance graph
[legend]
Collaboration diagram for ForcedSphere:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 46 of file forcedsphere.h.

Public Member Functions

 ForcedSphere (const OdeHandle &odeHandle, const OsgHandle &osgHandle, const char *name, double radius=1, double max_force=1)
 constructor
virtual ~ForcedSphere ()
virtual void update ()
 update all primitives and joints
virtual void place (const osg::Matrix &pose)
 sets the pose of the vehicle
virtual bool collisionCallback (void *data, dGeomID o1, dGeomID o2)
 This is the collision handling function for sphere robots.
virtual void doInternalStuff (const GlobalData &globalData)
 this function is called in each timestep.
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.

Protected Member Functions

virtual PrimitivegetMainPrimitive () const
 the main object of the robot, which is used for position and speed tracking
virtual void create (const osg::Matrix &pose)
 creates vehicle at desired position
virtual void destroy ()
 destroys vehicle and space

Protected Attributes

Primitiveobject [1]
double radius
double max_force
bool created


Constructor & Destructor Documentation

ForcedSphere const OdeHandle odeHandle,
const OsgHandle osgHandle,
const char *  name,
double  radius = 1,
double  max_force = 1
 

constructor

Definition at line 57 of file forcedsphere.cpp.

~ForcedSphere  )  [virtual]
 

Definition at line 67 of file forcedsphere.cpp.


Member Function Documentation

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

This is the collision handling function for sphere 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

Implements OdeRobot.

Definition at line 127 of file forcedsphere.cpp.

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

creates vehicle at desired position

Parameters:
pose 4x4 pose matrix

Definition at line 152 of file forcedsphere.cpp.

void destroy  )  [protected, virtual]
 

destroys vehicle and space

Definition at line 165 of file forcedsphere.cpp.

void doInternalStuff const 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.

Definition at line 116 of file forcedsphere.cpp.

virtual Primitive* getMainPrimitive  )  const [inline, protected, virtual]
 

the main object of the robot, which is used for position and speed tracking

Implements OdeRobot.

Definition at line 118 of file forcedsphere.h.

int getMotorNumber  )  [virtual]
 

Returns the number of motors used by the snake.

Returns:
number of motors

Implements AbstractRobot.

Definition at line 136 of file forcedsphere.cpp.

int getSensorNumber  )  [virtual]
 

Returns the number of sensors used by the robot.

Returns:
number of sensors

Implements AbstractRobot.

Definition at line 144 of file forcedsphere.cpp.

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

Definition at line 83 of file forcedsphere.cpp.

void place const osg::Matrix pose  )  [virtual]
 

sets the pose of the vehicle

Parameters:
pose desired 4x4 pose matrix

Implements OdeRobot.

Definition at line 109 of file forcedsphere.cpp.

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

Implements AbstractRobot.

Definition at line 102 of file forcedsphere.cpp.

void update  )  [virtual]
 

update all primitives and joints

Implements OdeRobot.

Definition at line 72 of file forcedsphere.cpp.


Member Data Documentation

bool created [protected]
 

Definition at line 52 of file forcedsphere.h.

double max_force [protected]
 

Definition at line 51 of file forcedsphere.h.

Primitive* object[1] [protected]
 

Definition at line 49 of file forcedsphere.h.

double radius [protected]
 

Definition at line 50 of file forcedsphere.h.


Generated on Tue Apr 4 19:05:27 2006 for Robotsystem from Robot Group Leipzig by  doxygen 1.4.5