Robotsystem from Robot Group Leipzig: MuscledArm Class Reference

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

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

# MuscledArm Class Reference

`#include <muscledarm.h>`

Inheritance diagram for MuscledArm:

[legend]
Collaboration diagram for MuscledArm:

[legend]
List of all members.

## Detailed Description

Definition at line 136 of file muscledarm.h.

## Public Member Functions
| MuscledArm (const OdeHandle &odeHandle, const OsgHandle &osgHandle, const MuscledArmConf &conf)
virtual | ~MuscledArm ()
virtual void | update ()
| draws the arm
virtual void | place (const osg::Matrix &pose)
| sets the pose of the vehicle pose desired 4x4 pose matrix
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.
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)
virtual Primitive * | getMainObject () const
## Static Public Member Functions
static MuscledArmConf | getDefaultConf ()
## Public Attributes
double | force_ [6]
## 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 arm at desired position
virtual void | destroy ()
| destroys vehicle and space
double | dBodyGetPositionAll (dBodyID basis, int para)
double | dGeomGetPositionAll (dGeomID basis, int para)
void | BodyCreate (int n, dMass m, dReal x, dReal y, dReal z, dReal qx, dReal qy, dReal qz, dReal qangle)
## Static Protected Member Functions
static void | mycallback (void *data, dGeomID o1, dGeomID o2)
## Protected Attributes
MuscledArmConf | conf
Primitive * | object [NUMParts]
Joint * | joint [NUMJoints]
Position | old_dist [NUMParts]
string | name
paramval | factorMotors
paramval | factorSensors
paramval | damping
paramval | print
int | segmentsno
double | gelenkabstand
double | SOCKEL_LAENGE
double | SOCKEL_BREITE
double | SOCKEL_HOEHE
double | SOCKEL_MASSE
int | sensorno
int | motorno
bool | created
dSpaceID | parentspace
int | printed
double | max_l
double | max_r
double | min_l
double | min_r
double | base_width
double | base_length
double | upperArm_width
double | upperArm_length
double | lowerArm_width
double | lowerArm_length
double | joint_offset
double | mainMuscle_width
double | mainMuscle_length
double | smallMuscle_width
double | smallMuscle_length
## Static Protected Attributes
static const int | armanzahl = 3

## Constructor & Destructor Documentation

MuscledArm | ( | const OdeHandle & | odeHandle,
|  | const OsgHandle & | osgHandle,
|  | const MuscledArmConf & | conf
| ) |

| Definition at line 71 of file muscledarm.cpp.

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

| Definition at line 152 of file muscledarm.h.

## Member Function Documentation

void BodyCreate | ( | int | n,
|  | dMass | m,
|  | dReal | x,
|  | dReal | y,
|  | dReal | z,
|  | dReal | qx,
|  | dReal | qy,
|  | dReal | qz,
|  | dReal | qangle
| ) | `[protected]`

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 321 of file muscledarm.cpp.

void create | ( | const osg::Matrix & | pose | ) | `[protected, virtual]`

  | creates arm at desired position Parameters:
  | pose | 4x4 pose matrix
Definition at line 365 of file muscledarm.cpp.

double dBodyGetPositionAll | ( | dBodyID | basis,
|  | int | para
| ) | `[protected]`

void destroy | ( |  | ) | `[protected, virtual]`

| destroys vehicle and space Definition at line 694 of file muscledarm.cpp.

double dGeomGetPositionAll | ( | dGeomID | basis,
|  | int | para
| ) | `[protected]`

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 236 of file muscledarm.cpp.

static MuscledArmConf getDefaultConf | ( |  | ) | `[inline, static]`

| Definition at line 143 of file muscledarm.h.

Primitive * getMainObject | ( |  | ) | const`[virtual]`

| Definition at line 709 of file muscledarm.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 223 of file muscledarm.h.

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

| returns number of motors Implements AbstractRobot. Definition at line 186 of file muscledarm.h.

virtual paramkey getName | ( |  | ) | const`[inline, virtual]`

| returns the name of the object (with version number) Reimplemented from Configurable. Definition at line 209 of file muscledarm.h.

Configurable::paramval getParam | ( | const paramkey & | key | ) | const`[virtual]`

| Definition at line 722 of file muscledarm.cpp.

Configurable::paramlist getParamList | ( |  | ) | const`[virtual]`

| The list of all parameters with there value as allocated lists. Reimplemented from Configurable. Definition at line 713 of file muscledarm.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 211 of file muscledarm.cpp.

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

| returns number of sensors Implements AbstractRobot. Definition at line 180 of file muscledarm.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 163 of file muscledarm.cpp.

void mycallback | ( | void * | data,
|  | dGeomID | o1,
|  | dGeomID | o2
| ) | `[static, protected]`

| Definition at line 289 of file muscledarm.cpp.

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

  | sets the pose of the vehicle pose desired 4x4 pose matrix Parameters:
  | pose | desired 4x4 pose matrix
Implements OdeRobot. Definition at line 197 of file muscledarm.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 136 of file muscledarm.cpp.

bool setParam | ( | const paramkey & | key,
|  | paramval | val
| ) | `[virtual]`

| Definition at line 730 of file muscledarm.cpp.

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

| draws the arm Implements OdeRobot. Definition at line 223 of file muscledarm.cpp.

## Member Data Documentation

const int armanzahl = 3`[static, protected]`

| Definition at line 244 of file muscledarm.h.

double base_length`[protected]`

| Definition at line 286 of file muscledarm.h.

double base_width`[protected]`

| Definition at line 285 of file muscledarm.h.

MuscledArmConf conf`[protected]`

| Definition at line 242 of file muscledarm.h.

bool created`[protected]`

| Definition at line 274 of file muscledarm.h.

paramval damping`[protected]`

| Definition at line 255 of file muscledarm.h.

paramval factorMotors`[protected]`

| Definition at line 253 of file muscledarm.h.

paramval factorSensors`[protected]`

| Definition at line 254 of file muscledarm.h.

double force_[6]

| Definition at line 139 of file muscledarm.h.

double gelenkabstand`[protected]`

| Definition at line 265 of file muscledarm.h.

Joint* joint[NUMJoints]`[protected]`

| Definition at line 248 of file muscledarm.h.

double joint_offset`[protected]`

| Definition at line 291 of file muscledarm.h.

double lowerArm_length`[protected]`

| Definition at line 290 of file muscledarm.h.

double lowerArm_width`[protected]`

| Definition at line 289 of file muscledarm.h.

double mainMuscle_length`[protected]`

| Definition at line 293 of file muscledarm.h.

double mainMuscle_width`[protected]`

| Definition at line 292 of file muscledarm.h.

double max_l`[protected]`

| Definition at line 282 of file muscledarm.h.

double max_r`[protected]`

| Definition at line 283 of file muscledarm.h.

double min_l`[protected]`

| Definition at line 283 of file muscledarm.h.

double min_r`[protected]`

| Definition at line 283 of file muscledarm.h.

int motorno`[protected]`

| Definition at line 272 of file muscledarm.h.

string name`[protected]`

| Reimplemented from AbstractRobot. Definition at line 252 of file muscledarm.h.

Primitive* object[NUMParts]`[protected]`

| Definition at line 247 of file muscledarm.h.

Position old_dist[NUMParts]`[protected]`

| Definition at line 250 of file muscledarm.h.

dSpaceID parentspace`[protected]`

| Reimplemented from OdeRobot. Definition at line 278 of file muscledarm.h.

paramval print`[protected]`

| Definition at line 256 of file muscledarm.h.

int printed`[protected]`

| Definition at line 280 of file muscledarm.h.

int segmentsno`[protected]`

| Definition at line 261 of file muscledarm.h.

int sensorno`[protected]`

| Definition at line 271 of file muscledarm.h.

double smallMuscle_length`[protected]`

| Definition at line 295 of file muscledarm.h.

double smallMuscle_width`[protected]`

| Definition at line 294 of file muscledarm.h.

double SOCKEL_BREITE`[protected]`

| Definition at line 267 of file muscledarm.h.

double SOCKEL_HOEHE`[protected]`

| Definition at line 268 of file muscledarm.h.

double SOCKEL_LAENGE`[protected]`

| Definition at line 266 of file muscledarm.h.

double SOCKEL_MASSE`[protected]`

| Definition at line 269 of file muscledarm.h.

double upperArm_length`[protected]`

| Definition at line 288 of file muscledarm.h.

double upperArm_width`[protected]`

| Definition at line 287 of file muscledarm.h.