Sphererobot3Masses Class Reference

#include <sphererobot3masses.h>

Inheritance diagram for Sphererobot3Masses:

Inheritance graph
[legend]
Collaboration diagram for Sphererobot3Masses:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 87 of file sphererobot3masses.h.

Public Types

enum  objects {
  Base, Pendular1, Pendular2, Pendular3,
  Last
}

Public Member Functions

 Sphererobot3Masses (const OdeHandle &odeHandle, const OsgHandle &osgHandle, const Sphererobot3MassesConf &conf, const char *name, double transparency=0.5)
 constructor
virtual ~Sphererobot3Masses ()
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.

Static Public Member Functions

static Sphererobot3MassesConf getDefaultConf ()

Public Attributes

Primitiveobject [Last]

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

SliderServoservo [servono]
SliderJointjoint [servono]
OSGPrimitiveaxis [servono]
double transparency
bool created
Sphererobot3MassesConf conf
RaySensorBank irSensorBank

Static Protected Attributes

static const int servono = 3


Member Enumeration Documentation

enum objects
 

Enumerator:
Base 
Pendular1 
Pendular2 
Pendular3 
Last 

Definition at line 90 of file sphererobot3masses.h.


Constructor & Destructor Documentation

Sphererobot3Masses const OdeHandle odeHandle,
const OsgHandle osgHandle,
const Sphererobot3MassesConf conf,
const char *  name,
double  transparency = 0.5
 

constructor

Definition at line 67 of file sphererobot3masses.cpp.

~Sphererobot3Masses  )  [virtual]
 

Definition at line 84 of file sphererobot3masses.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 178 of file sphererobot3masses.cpp.

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

creates vehicle at desired position

Parameters:
pose 4x4 pose matrix

Definition at line 232 of file sphererobot3masses.cpp.

void destroy  )  [protected, virtual]
 

destroys vehicle and space

Definition at line 315 of file sphererobot3masses.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 166 of file sphererobot3masses.cpp.

static Sphererobot3MassesConf getDefaultConf  )  [inline, static]
 

Definition at line 116 of file sphererobot3masses.h.

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 187 of file sphererobot3masses.h.

int getMotorNumber  )  [virtual]
 

Returns the number of motors used by the snake.

Returns:
number of motors

Implements AbstractRobot.

Definition at line 215 of file sphererobot3masses.cpp.

int getSensorNumber  )  [virtual]
 

Returns the number of sensors used by the robot.

Returns:
number of sensors

Implements AbstractRobot.

Definition at line 223 of file sphererobot3masses.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 109 of file sphererobot3masses.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 159 of file sphererobot3masses.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 151 of file sphererobot3masses.cpp.

void update  )  [virtual]
 

update all primitives and joints

Implements OdeRobot.

Definition at line 89 of file sphererobot3masses.cpp.


Member Data Documentation

OSGPrimitive* axis[servono] [protected]
 

Definition at line 97 of file sphererobot3masses.h.

Sphererobot3MassesConf conf [protected]
 

Definition at line 101 of file sphererobot3masses.h.

bool created [protected]
 

Definition at line 99 of file sphererobot3masses.h.

RaySensorBank irSensorBank [protected]
 

Definition at line 102 of file sphererobot3masses.h.

SliderJoint* joint[servono] [protected]
 

Definition at line 96 of file sphererobot3masses.h.

Primitive* object[Last]
 

Definition at line 105 of file sphererobot3masses.h.

SliderServo* servo[servono] [protected]
 

Definition at line 95 of file sphererobot3masses.h.

const int servono = 3 [static, protected]
 

Definition at line 93 of file sphererobot3masses.h.

double transparency [protected]
 

Definition at line 98 of file sphererobot3masses.h.


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