Formel1 Class Reference

#include <formel1.h>

Inheritance diagram for Formel1:

Inheritance graph
[legend]
Collaboration diagram for Formel1:

Collaboration graph
[legend]
List of all members.

Detailed Description

Robot that looks like a Nimm 2 Bonbon :-) 4 wheels and a capsule like body.

Definition at line 62 of file formel1.h.

Public Member Functions

 Formel1 (const OdeHandle &odeHandle, const OsgHandle &osgHandle, double size=1, double force=3, double speed=15, bool sphereWheels=true)
virtual ~Formel1 ()
virtual void update ()
 updates the osg notes
virtual void place (const osg::Matrix &pose)
 sets the pose of the vehicle
virtual int getSensors (sensor *sensors, int sensornumber)
 returns actual sensorvalues
virtual void setMotors (const motor *motors, int motornumber)
 sets actual motorcommands
virtual int getSensorNumber ()
 returns number of sensors
virtual int getMotorNumber ()
 returns number of motors
virtual bool collisionCallback (void *data, dGeomID o1, dGeomID o2)
 checks for internal collisions and treats them.
virtual void doInternalStuff (const GlobalData &globalData)
 this function is called in each timestep.

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 pose
virtual void destroy ()
 destroys vehicle and space

Static Protected Member Functions

static void mycallback (void *data, dGeomID o1, dGeomID o2)
 things for collision handling inside the space of the robot can be done here

Protected Attributes

double length
double width
double height
double radius
double wheelthickness
bool sphereWheels
double cmass
double wmass
int sensorno
int motorno
int segmentsno
double speed
double max_force
bool created
Primitiveobject [5]
Hinge2Jointjoint [4]


Constructor & Destructor Documentation

Formel1 const OdeHandle odeHandle,
const OsgHandle osgHandle,
double  size = 1,
double  force = 3,
double  speed = 15,
bool  sphereWheels = true
 

Definition at line 58 of file formel1.cpp.

virtual ~Formel1  )  [inline, virtual]
 

Definition at line 68 of file formel1.h.


Member Function Documentation

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

checks for internal collisions and treats them.

In case of a treatment return true (collision will be ignored by other objects and the default routine) else false (collision is passed to other objects and (if not treated) to the default routine).

Implements OdeRobot.

Definition at line 200 of file formel1.cpp.

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

creates vehicle at desired pose

Parameters:
pose 4x4 pose matrix

void destroy  )  [protected, virtual]
 

destroys vehicle and space

Definition at line 313 of file formel1.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 193 of file formel1.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 122 of file formel1.h.

virtual int getMotorNumber  )  [inline, virtual]
 

returns number of motors

Implements AbstractRobot.

Definition at line 102 of file formel1.h.

virtual int getSensorNumber  )  [inline, virtual]
 

returns number of sensors

Implements AbstractRobot.

Definition at line 96 of file formel1.h.

int getSensors sensor sensors,
int  sensornumber
[virtual]
 

returns actual sensorvalues

Parameters:
sensors sensors scaled to [-1,1]
sensornumber length of the sensor array
Returns:
number of actually written sensors

Implements AbstractRobot.

Definition at line 129 of file formel1.cpp.

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

things for collision handling inside the space of the robot can be done here

Definition at line 174 of file formel1.cpp.

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

sets the pose of the vehicle

Parameters:
pose desired pose matrix

Implements OdeRobot.

void setMotors const motor motors,
int  motornumber
[virtual]
 

sets actual motorcommands

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

Implements AbstractRobot.

Definition at line 97 of file formel1.cpp.

void update  )  [virtual]
 

updates the osg notes

Implements OdeRobot.

Definition at line 160 of file formel1.cpp.


Member Data Documentation

double cmass [protected]
 

Definition at line 143 of file formel1.h.

bool created [protected]
 

Definition at line 152 of file formel1.h.

double height [protected]
 

Definition at line 139 of file formel1.h.

Hinge2Joint* joint[4] [protected]
 

Definition at line 155 of file formel1.h.

double length [protected]
 

Definition at line 137 of file formel1.h.

double max_force [protected]
 

Definition at line 150 of file formel1.h.

int motorno [protected]
 

Definition at line 146 of file formel1.h.

Primitive* object[5] [protected]
 

Definition at line 154 of file formel1.h.

double radius [protected]
 

Definition at line 140 of file formel1.h.

int segmentsno [protected]
 

Definition at line 147 of file formel1.h.

int sensorno [protected]
 

Definition at line 145 of file formel1.h.

double speed [protected]
 

Definition at line 148 of file formel1.h.

bool sphereWheels [protected]
 

Definition at line 142 of file formel1.h.

double wheelthickness [protected]
 

Definition at line 141 of file formel1.h.

double width [protected]
 

Definition at line 138 of file formel1.h.

double wmass [protected]
 

Definition at line 144 of file formel1.h.


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