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

# Gripper Class Reference

A gripper can be attached to a primitive via its substance and implements gripping (a fixed joint) on collision with specified objects. More...

`#include <gripper.h>`

Inherits Configurable.

Collaboration diagram for Gripper:
[legend]

List of all members.

## Public Member Functions
| Gripper (const GripperConf &conf=getDefaultConf())
bool | attach (Primitive *p)
| call this to attach the gripper to the given primitive
virtual void | addGrippables (const std::vector< Primitive * > &ps)
virtual void | removeGrippables (const std::vector< Primitive * > &ps)
virtual void | removeAllGrippables ()
## Static Public Member Functions
static GripperConf | getDefaultConf ()
static int | onCollision (dSurfaceParameters &params, GlobalData &globaldata, void *userdata, dContact *contacts, int numContacts, dGeomID o1, dGeomID o2, const Substance &s1, const Substance &s2)

## Detailed Description

A gripper can be attached to a primitive via its substance and implements gripping (a fixed joint) on collision with specified objects.

Usage: in your robot, create a Gripper object and attach it to the primitive that grips (e.g. hand). Then you need make the gripper(s) available to you simulation in order to set call the addGrippables from there (e.g. with otherrobot->getAllPrimitives()), see Skeleton.

## Constructor & Destructor Documentation

Gripper | ( | const GripperConf & | conf = `getDefaultConf()` | ) |

Parameters:

  | gripDuration | time in seconds for how long the gripper grasps
  | releaseDuration | time in seconds for how long the gripper cannot grasp after release
  | size | diameter of the drawn sphere (if 0 nothing is drawn)
  | drawAtContactPoint | sphere is drawn at contact point (true) or at center of attached primitive (false)

## Member Function Documentation

void addGrippables | ( | const std::vector< Primitive * > & | ps | ) | `[virtual]`

bool attach | ( | Primitive * | p | ) |

call this to attach the gripper to the given primitive

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

int onCollision | ( | dSurfaceParameters & | params,
|  | GlobalData & | globaldata,
|  | void * | userdata,
|  | dContact * | contacts,
|  | int | numContacts,
|  | dGeomID | o1,
|  | dGeomID | o2,
|  | const Substance & | s1,
|  | const Substance & | s2 |
| ) |  |  | `[static]`

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

void removeGrippables | ( | const std::vector< Primitive * > & | ps | ) | `[virtual]`

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

- gripper.h
- gripper.cpp