Robotsystem from Robot Group Leipzig: OdeRobot Class Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Alphabetical List
- Class Hierarchy
- Class Members

# OdeRobot Class Reference

`#include <oderobot.h>`

Inheritance diagram for OdeRobot:

[legend]
Collaboration diagram for OdeRobot:

[legend]
List of all members.

## Detailed Description

Abstract class for ODE robots.

Examples:

  main.cpp.

Definition at line 127 of file oderobot.h.

## Public Member Functions
| OdeRobot (const OdeHandle &odeHandle, const OsgHandle &osgHandle, const char *name="OdeRobot")
| Constructor.
virtual | ~OdeRobot ()
virtual void | update ()=0
| update the OSG notes here
virtual void | place (const Pos &pos)
| sets the vehicle to position pos pos desired position of the robot
virtual void | place (const osg::Matrix &pose)=0
| sets the pose of the vehicle
virtual bool | collisionCallback (void *data, dGeomID o1, dGeomID o2)=0
| checks for internal collisions and treats them.
virtual void | doInternalStuff (const GlobalData &globalData)=0
| this function is called in each timestep.
virtual void | setColor (const Color &col)
| sets color of the robot
virtual Position | getPosition () const
| returns position of the object
virtual Position | getSpeed () const
| returns linear speed vector of the object
virtual matrix::Matrix | getOrientation () const
| returns the orientation of the object
virtual Primitive * | getMainPrimitive () const =0
| overload this in the robot implementation.
## Static Protected Member Functions
static bool | isGeomInPrimitiveList (Primitive **ps, int len, dGeomID geom)
static bool | isGeomInPrimitiveList (list< Primitive * > ps, dGeomID geom)
static matrix::Matrix | odeRto3x3RotationMatrixT (const double R[12])
static matrix::Matrix | odeRto3x3RotationMatrix (const double R[12])
## Protected Attributes
OdeHandle | odeHandle
OsgHandle | osgHandle
dSpaceID | parentspace
## Friends
class | OdeAgent

## Constructor & Destructor Documentation

OdeRobot | ( | const OdeHandle & | odeHandle,
|  | const OsgHandle & | osgHandle,
|  | const char * | name = `"OdeRobot"`
| ) |

  | Constructor. Parameters:
  | odehandle | structure with all global ODE variables
Definition at line 48 of file oderobot.cpp.

~OdeRobot | ( |  | ) | `[virtual]`

| Definition at line 53 of file oderobot.cpp.

## Member Function Documentation

virtual bool collisionCallback | ( | void * | data,
|  | dGeomID | o1,
|  | dGeomID | o2
| ) | `[pure 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). Implemented in ComponentToRobot, Arm2Segm, ForcedSphere, Formel1, HurlingSnake, MuscledArm, Nimm2, Nimm4, Schlange, ShortCircuit, Sphererobot, and Sphererobot3Masses.

virtual void doInternalStuff | ( | const GlobalData & | globalData | ) | `[pure 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
Implemented in ComponentToRobot, Arm2Segm, ForcedSphere, Formel1, HurlingSnake, MuscledArm, Nimm2, Nimm4, Schlange, ShortCircuit, Sphererobot, and Sphererobot3Masses.

virtual Primitive* getMainPrimitive | ( |  | ) | const`[pure virtual]`

| overload this in the robot implementation. If there is no object for some reason then return a null pointer Returns: main object of the robot (used for tracking) Implemented in Arm2Segm, ForcedSphere, Formel1, HurlingSnake, MuscledArm, Nimm2, Nimm4, Schlange, ShortCircuit, Sphererobot, and Sphererobot3Masses.

matrix::Matrix getOrientation | ( |  | ) | const`[virtual]`

| returns the orientation of the object Returns: 3x3 rotation matrix Implements Trackable. Definition at line 92 of file oderobot.cpp.

Position getPosition | ( |  | ) | const`[virtual]`

| returns position of the object Returns: vector of position (x,y,z) Implements Trackable. Definition at line 72 of file oderobot.cpp.

Position getSpeed | ( |  | ) | const`[virtual]`

| returns linear speed vector of the object Returns: vector (vx,vy,vz) Implements Trackable. Definition at line 82 of file oderobot.cpp.

bool isGeomInPrimitiveList | ( | list< Primitive * > | ps,
|  | dGeomID | geom
| ) | `[static, protected]`

| Definition at line 110 of file oderobot.cpp.

bool isGeomInPrimitiveList | ( | Primitive ** | ps,
|  | int | len,
|  | dGeomID | geom
| ) | `[static, protected]`

| Definition at line 103 of file oderobot.cpp.

matrix::Matrix odeRto3x3RotationMatrix | ( | const double | R[12] | ) | `[static, protected]`

| Definition at line 131 of file oderobot.cpp.

matrix::Matrix odeRto3x3RotationMatrixT | ( | const double | R[12] | ) | `[static, protected]`

| Definition at line 117 of file oderobot.cpp.

virtual void place | ( | const osg::Matrix & | pose | ) | `[pure virtual]`

  | sets the pose of the vehicle Parameters:
  | pose | desired 4x4 pose matrix
Implemented in Arm2Segm, ForcedSphere, Formel1, HurlingSnake, MuscledArm, Nimm2, Nimm4, Schlange, ShortCircuit, Sphererobot, and Sphererobot3Masses.

void place | ( | const Pos & | pos | ) | `[virtual]`

  | sets the vehicle to position pos pos desired position of the robot Parameters:
  | pos | desired position of the robot
Examples: main.cpp. Definition at line 65 of file oderobot.cpp.

void setColor | ( | const Color & | col | ) | `[virtual]`

  | sets color of the robot Parameters:
  | col | Color struct with desired Color
Definition at line 58 of file oderobot.cpp.

virtual void update | ( |  | ) | `[pure virtual]`

| update the OSG notes here Implemented in Arm2Segm, ForcedSphere, Formel1, HurlingSnake, MuscledArm, Nimm2, Nimm4, Schlange, ShortCircuit, Sphererobot, and Sphererobot3Masses.

## Friends And Related Function Documentation

friend class OdeAgent`[friend]`

| Definition at line 130 of file oderobot.h.

## Member Data Documentation

OdeHandle odeHandle`[protected]`

| Definition at line 201 of file oderobot.h.

OsgHandle osgHandle`[protected]`

| Definition at line 202 of file oderobot.h.

dSpaceID parentspace`[protected]`

| Reimplemented in Arm2Segm, and MuscledArm. Definition at line 203 of file oderobot.h.