Arm2Segm Class Reference

#include <arm2segm.h>

Inheritance diagram for Arm2Segm:

Inheritance graph
[legend]
Collaboration diagram for Arm2Segm:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 92 of file arm2segm.h.

Public Member Functions

 Arm2Segm (const OdeHandle &odeHandle, const OsgHandle &osgHandle, const Arm2SegmConf)
virtual ~Arm2Segm ()
virtual void update ()
 update the subcomponents
virtual void place (const osg::Matrix &pose)
 sets the vehicle to position pos, sets color to c, and creates robot if necessary pos desired position of the robot in struct Position
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 PrimitivegetMainPrimitive () const
 the main object of the robot, which is used for position and speed tracking
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.
virtual paramkey getName () const
 returns the name of the object (with version number)
paramlist getParamList () const
 The list of all parameters with there value as allocated lists.
virtual paramval getParam (const paramkey &key) const
virtual bool setParam (const paramkey &key, paramval val)

Static Public Member Functions

static Arm2SegmConf getDefaultConf ()

Protected Member Functions

virtual void create (const osg::Matrix &pose)
 creates vehicle at desired position
virtual void destroy ()
 destroys vehicle and space

Static Protected Member Functions

static void mycallback (void *data, dGeomID o1, dGeomID o2)

Protected Attributes

dSpaceID parentspace
Arm2SegmConf conf
vector< Primitive * > objects
vector< Joint * > joints
vector< AngularMotor1Axis * > amotors
string name
paramval speed
paramval factorSensors
int sensorno
int motorno
bool created


Constructor & Destructor Documentation

Arm2Segm const OdeHandle odeHandle,
const OsgHandle osgHandle,
const   Arm2SegmConf
 

Definition at line 51 of file arm2segm.cpp.

virtual ~Arm2Segm  )  [inline, virtual]
 

Definition at line 97 of file arm2segm.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 175 of file arm2segm.cpp.

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

creates vehicle at desired position

Parameters:
pose 4x4 pose matrix

Definition at line 212 of file arm2segm.cpp.

void destroy  )  [protected, virtual]
 

destroys vehicle and space

Definition at line 286 of file arm2segm.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 168 of file arm2segm.cpp.

static Arm2SegmConf getDefaultConf  )  [inline, static]
 

Definition at line 99 of file arm2segm.h.

Primitive * getMainPrimitive  )  const [virtual]
 

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

Implements OdeRobot.

Definition at line 202 of file arm2segm.cpp.

virtual int getMotorNumber  )  [inline, virtual]
 

returns number of motors

Implements AbstractRobot.

Definition at line 143 of file arm2segm.h.

virtual paramkey getName  )  const [inline, virtual]
 

returns the name of the object (with version number)

Reimplemented from Configurable.

Definition at line 164 of file arm2segm.h.

Configurable::paramval getParam const paramkey key  )  const [virtual]
 

Definition at line 314 of file arm2segm.cpp.

Configurable::paramlist getParamList  )  const [virtual]
 

The list of all parameters with there value as allocated lists.

Returns:
list of names

Reimplemented from Configurable.

Definition at line 307 of file arm2segm.cpp.

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 148 of file arm2segm.cpp.

virtual int getSensorNumber  )  [inline, virtual]
 

returns number of sensors

Implements AbstractRobot.

Definition at line 137 of file arm2segm.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 102 of file arm2segm.cpp.

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

Definition at line 171 of file arm2segm.cpp.

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

sets the vehicle to position pos, sets color to c, and creates robot if necessary pos desired position of the robot in struct Position

Parameters:
pose desired 4x4 pose matrix

Implements OdeRobot.

Definition at line 125 of file arm2segm.cpp.

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 72 of file arm2segm.cpp.

bool setParam const paramkey key,
paramval  val
[virtual]
 

Definition at line 320 of file arm2segm.cpp.

void update  )  [virtual]
 

update the subcomponents

Implements OdeRobot.

Definition at line 157 of file arm2segm.cpp.


Member Data Documentation

vector<AngularMotor1Axis*> amotors [protected]
 

Definition at line 195 of file arm2segm.h.

Arm2SegmConf conf [protected]
 

Definition at line 191 of file arm2segm.h.

bool created [protected]
 

Definition at line 204 of file arm2segm.h.

paramval factorSensors [protected]
 

Definition at line 199 of file arm2segm.h.

vector<Joint*> joints [protected]
 

Definition at line 194 of file arm2segm.h.

int motorno [protected]
 

Definition at line 202 of file arm2segm.h.

string name [protected]
 

Reimplemented from AbstractRobot.

Definition at line 197 of file arm2segm.h.

vector<Primitive*> objects [protected]
 

Definition at line 193 of file arm2segm.h.

dSpaceID parentspace [protected]
 

Reimplemented from OdeRobot.

Definition at line 189 of file arm2segm.h.

int sensorno [protected]
 

Definition at line 201 of file arm2segm.h.

paramval speed [protected]
 

Definition at line 198 of file arm2segm.h.


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