Robotsystem from Robot Group Leipzig: Nimm4 Class Reference

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

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

# Nimm4 Class Reference

`#include <nimm4.h>`

Inheritance diagram for Nimm4:

[legend]
Collaboration diagram for Nimm4:

[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 93 of file nimm4.h.

## Public Member Functions
| Nimm4 (const OdeHandle &odeHandle, const OsgHandle &osgHandle, double size=1, double force=3, double speed=15, bool sphereWheels=true)
| constructor of nimm4 robot
virtual | ~Nimm4 ()
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 Primitive * | getMainPrimitive () 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
Primitive * | object [5]
Hinge2Joint * | joint [4]

## Constructor & Destructor Documentation

Nimm4 | ( | const OdeHandle & | odeHandle,
|  | const OsgHandle & | osgHandle,
|  | double | size = `1`,
|  | double | force = `3`,
|  | double | speed = `15`,
|  | bool | sphereWheels = `true`
| ) |

  | constructor of nimm4 robot Parameters:
  | odeHandle | data structure for accessing ODE
  | osgHandle | ata structure for accessing OSG
  | size | scaling of robot
  | force | maximal used force to realize motorcommand
  | speed | factor for changing speed of robot
  | sphereWheels | switches between spheres and 'normal' wheels
Definition at line 92 of file nimm4.cpp.

virtual ~Nimm4 | ( |  | ) | `[inline, virtual]`

| Definition at line 108 of file nimm4.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 235 of file nimm4.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 355 of file nimm4.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 228 of file nimm4.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 162 of file nimm4.h.

virtual int getMotorNumber | ( |  | ) | `[inline, virtual]`

| returns number of motors Implements AbstractRobot. Definition at line 142 of file nimm4.h.

virtual int getSensorNumber | ( |  | ) | `[inline, virtual]`

| returns number of sensors Implements AbstractRobot. Definition at line 136 of file nimm4.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 164 of file nimm4.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 209 of file nimm4.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 132 of file nimm4.cpp.

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

| updates the osg notes Implements OdeRobot. Definition at line 195 of file nimm4.cpp.

## Member Data Documentation

double cmass`[protected]`

| Definition at line 183 of file nimm4.h.

bool created`[protected]`

| Definition at line 192 of file nimm4.h.

double height`[protected]`

| Definition at line 179 of file nimm4.h.

Hinge2Joint* joint[4]`[protected]`

| Definition at line 195 of file nimm4.h.

double length`[protected]`

| Definition at line 177 of file nimm4.h.

double max_force`[protected]`

| Definition at line 190 of file nimm4.h.

int motorno`[protected]`

| Definition at line 186 of file nimm4.h.

Primitive* object[5]`[protected]`

| Definition at line 194 of file nimm4.h.

double radius`[protected]`

| Definition at line 180 of file nimm4.h.

int segmentsno`[protected]`

| Definition at line 187 of file nimm4.h.

int sensorno`[protected]`

| Definition at line 185 of file nimm4.h.

double speed`[protected]`

| Definition at line 188 of file nimm4.h.

bool sphereWheels`[protected]`

| Definition at line 182 of file nimm4.h.

double wheelthickness`[protected]`

| Definition at line 181 of file nimm4.h.

double width`[protected]`

| Definition at line 178 of file nimm4.h.

double wmass`[protected]`

| Definition at line 184 of file nimm4.h.