Robot Simulator of the Robotics Group for Self-Organization of Control: Hand Class Reference

# Hand Class Reference

Artificial Hand. More...

`#include <hand.h>`

Inherits lpzrobots::OdeRobot.

Collaboration diagram for Hand:
[legend]

List of all members.

## Public Member Functions
| Hand (const OdeHandle &odeHandle, const OsgHandle &osgHandle, const HandConf &conf, const std::string &name)
| constructor of hand
virtual void | update ()
| update the subcomponents
virtual void | place (const osg::Matrix &pose)
| sets the pose of the vehicle
virtual void | doInternalStuff (GlobalData &globalData)
| this function is called in each timestep.
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 void | notifyOnChange (const paramkey &key)
| returns a vector with the positions of all segments of the robot
## Static Public Member Functions
static HandConf | getDefaultConf ()
## Protected Member Functions
virtual Primitive * | getMainPrimitive () const
| Returns the palm as the main object of the robot, which is used for position and speed tracking.
## Protected Attributes
HandConf | conf
| configuration of hand
std::vector< OSGPrimitive * > | osg_objects
| vector containing OSGPrimitives
std::vector< IRSensor * > | ir_sensors
| vector containing Primitivesinfrared sensors
bool | contact_joint_created
| true if contact joint is created
std::vector< AngularMotor * > | frictionmotors
| vector of the joints used in hand
std::vector< HingeServo * > | servos
| vector of the used hinge servos
RaySensorBank | irSensorBank
| a collection of ir sensors
dSpaceID | hand_space
| space containing the hand
AngularMotor * | palm_motor_joint
| motorjoint for actuating the forearm_palm joint (ball joint)
AngularMotor * | thumb_motor_joint
| motorjoint for actuating the palm_thumb joint (ball joint)
HingeJoint * | thumb_bt
| Hinge Joint between thumb_buttom and thumb_top.
Joint * | palm_index
| Hinge Joint between buttom, center and top part of the index finger.
Joint * | index_bc
Joint * | index_ct
Joint * | palm_middle
| Hinge Joint between buttom, center and top part of the middle finger.
Joint * | middle_bc
Joint * | middle_ct
Joint * | palm_ring
| Hinge Joint between buttom, center and top part of the ring finger.
Joint * | ring_bc
Joint * | ring_ct
Joint * | palm_little
| Hinge Joint between buttom, center and top part of the little finger.
Joint * | little_bc
Joint * | little_ct
GripMode | gripmode
| for handling lateral and precision grip modes
Position | initial_pos
| initial position of robot
Pos | oldp
int | sensorno
int | motorno
int | sensor_number
paramval | factorForce
paramval | frictionGround
double | velocity

## Detailed Description

Artificial Hand.

## Constructor & Destructor Documentation

Hand | ( | const OdeHandle & | odeHandle,
|  | const OsgHandle & | osgHandle,
|  | const HandConf & | conf,
|  | const std::string & | name |
| ) |  |  |

constructor of hand

Parameters:

  | odeHandle | data structure for accessing ODE
  | osgHandle | ata structure for accessing OSG
  | conf | configuration of robot

## Member Function Documentation

void doInternalStuff | ( | 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

Reimplemented from OdeRobot.

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

virtual Primitive* getMainPrimitive | ( |  | ) | const`[inline, protected, virtual]`

Returns the palm as the main object of the robot, which is used for position and speed tracking.

Reimplemented from OdeRobot.

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

returns number of motors

Implements AbstractRobot.

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

returns number of sensors

Implements AbstractRobot.

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.

void notifyOnChange | ( | const paramkey & | key | ) | `[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

Reimplemented from Configurable.

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.

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

update the subcomponents

Implements OdeRobot.

## Member Data Documentation

HandConf conf`[protected]`

configuration of hand

bool contact_joint_created`[protected]`

true if contact joint is created

paramval factorForce`[protected]`

paramval frictionGround`[protected]`

std::vector<AngularMotor*> frictionmotors`[protected]`

vector of the joints used in hand

vector of the angular motors

GripMode gripmode`[protected]`

for handling lateral and precision grip modes

dSpaceID hand_space`[protected]`

space containing the hand

Joint * index_bc`[protected]`

Joint * index_ct`[protected]`

Position initial_pos`[protected]`

initial position of robot

std::vector<IRSensor*> ir_sensors`[protected]`

vector containing Primitivesinfrared sensors

RaySensorBank irSensorBank`[protected]`

a collection of ir sensors

Joint * little_bc`[protected]`

Joint * little_ct`[protected]`

Joint * middle_bc`[protected]`

Joint * middle_ct`[protected]`

int motorno`[protected]`

Pos oldp`[protected]`

std::vector<OSGPrimitive*> osg_objects`[protected]`

vector containing OSGPrimitives

Joint* palm_index`[protected]`

Hinge Joint between buttom, center and top part of the index finger.

Joint* palm_little`[protected]`

Hinge Joint between buttom, center and top part of the little finger.

Joint* palm_middle`[protected]`

Hinge Joint between buttom, center and top part of the middle finger.

AngularMotor* palm_motor_joint`[protected]`

motorjoint for actuating the forearm_palm joint (ball joint)

Joint* palm_ring`[protected]`

Hinge Joint between buttom, center and top part of the ring finger.

Joint * ring_bc`[protected]`

Joint * ring_ct`[protected]`

int sensor_number`[protected]`

int sensorno`[protected]`

std::vector<HingeServo*> servos`[protected]`

vector of the used hinge servos

HingeJoint* thumb_bt`[protected]`

Hinge Joint between thumb_buttom and thumb_top.

AngularMotor* thumb_motor_joint`[protected]`

motorjoint for actuating the palm_thumb joint (ball joint)

double velocity`[protected]`

The documentation for this class was generated from the following files:

- hand.h
- hand.cpp