next up previous contents
Next: 2.9 IRProxy Up: 2. Class Reference Previous: 2.7 GpsProxy   Contents

Subsections

2.8 GripperProxy

The GripperProxy class is used to control a gripper device. The latest gripper data held in a handful of class attributes. A single method provides user control.

Attributes

unsigned char state,beams;

The latest raw gripper data.

bool outer_break_beam,inner_break_beam,
paddles_open,paddles_closed,paddles_moving,
gripper_error,lift_up,lift_down,lift_moving,
lift_error;

These boolean variables indicate the state of the gripper

Methods

GripperProxy(PlayerClient* pc, unsigned short index,
unsigned char access='c')

The client calls this method to make a new proxy. Leave access empty to start unconnected.

int SetGrip(unsigned char cmd, unsigned char arg=0)

Send a gripper command. Look in the Player user manual for details on the command and argument. Returns 0 if everything's ok, and -1 otherwise (that's bad).

void Print()

Print out current gripper state.



2004-05-31