Nimm2 Class Reference

#include <nimm2.h>

Inheritance diagram for Nimm2:

Inheritance graph
[legend]
Collaboration diagram for Nimm2:

Collaboration graph
[legend]
List of all members.

Detailed Description

Robot that looks like a Nimm 2 Bonbon :-) 2 wheels and a cylinder like body.
Examples:

main.cpp.

Definition at line 140 of file nimm2.h.

Public Member Functions

 Nimm2 (const OdeHandle &odehandle, const OsgHandle &osgHandle, const Nimm2Conf &conf)
virtual ~Nimm2 ()
virtual void update ()
 updates the osg notes and sensorbank
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 int getSegmentsPosition (vector< Position > &poslist)
 returns a vector with the positions of all segments of the robot
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.

Static Public Member Functions

static Nimm2Conf getDefaultConf ()

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)

Protected Attributes

Nimm2Conf conf
double length
double width
double height
double radius
double wheelthickness
double cmass
double wmass
int sensorno
int motorno
bool created
double max_force
Primitiveobject [3]
double wheeloffset
int number_bumpers
Bumper bumper [2]
Hinge2Jointjoint [2]
RaySensorBank irSensorBank


Constructor & Destructor Documentation

Nimm2 const OdeHandle odehandle,
const OsgHandle osgHandle,
const Nimm2Conf conf
 

Definition at line 100 of file nimm2.cpp.

virtual ~Nimm2  )  [inline, virtual]
 

Definition at line 161 of file nimm2.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 243 of file nimm2.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 392 of file nimm2.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 291 of file nimm2.cpp.

static Nimm2Conf getDefaultConf  )  [inline, static]
 

Definition at line 145 of file nimm2.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 214 of file nimm2.h.

virtual int getMotorNumber  )  [inline, virtual]
 

returns number of motors

Implements AbstractRobot.

Definition at line 194 of file nimm2.h.

int getSegmentsPosition vector< Position > &  poslist  )  [virtual]
 

returns a vector with the positions of all segments of the robot

Parameters:
poslist vector of positions (of all robot segments)
Returns:
length of the list

Definition at line 205 of file nimm2.cpp.

virtual int getSensorNumber  )  [inline, virtual]
 

returns number of sensors

Implements AbstractRobot.

Definition at line 188 of file nimm2.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 173 of file nimm2.cpp.

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

Definition at line 236 of file nimm2.cpp.

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

sets the pose of the vehicle

Parameters:
pose desired 4x4 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 152 of file nimm2.cpp.

void update  )  [virtual]
 

updates the osg notes and sensorbank

Implements OdeRobot.

Definition at line 216 of file nimm2.cpp.


Member Data Documentation

Bumper bumper[2] [protected]
 

Definition at line 244 of file nimm2.h.

double cmass [protected]
 

Definition at line 233 of file nimm2.h.

Nimm2Conf conf [protected]
 

Definition at line 226 of file nimm2.h.

bool created [protected]
 

Definition at line 238 of file nimm2.h.

double height [protected]
 

Definition at line 230 of file nimm2.h.

RaySensorBank irSensorBank [protected]
 

Definition at line 247 of file nimm2.h.

Hinge2Joint* joint[2] [protected]
 

Definition at line 245 of file nimm2.h.

double length [protected]
 

Definition at line 228 of file nimm2.h.

double max_force [protected]
 

Definition at line 239 of file nimm2.h.

int motorno [protected]
 

Definition at line 236 of file nimm2.h.

int number_bumpers [protected]
 

Definition at line 243 of file nimm2.h.

Primitive* object[3] [protected]
 

Definition at line 241 of file nimm2.h.

double radius [protected]
 

Definition at line 231 of file nimm2.h.

int sensorno [protected]
 

Definition at line 235 of file nimm2.h.

double wheeloffset [protected]
 

Definition at line 242 of file nimm2.h.

double wheelthickness [protected]
 

Definition at line 232 of file nimm2.h.

double width [protected]
 

Definition at line 229 of file nimm2.h.

double wmass [protected]
 

Definition at line 234 of file nimm2.h.


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