rapid
A ROS robotics library.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
rapid::pr2::Gripper Class Reference

High-level interface for a PR2's gripper. More...

#include <gripper.h>

Public Member Functions

bool StartOpening ()
 Starts opening the gripper. More...
 
bool StartClosing ()
 Starts closing the gripper. More...
 
bool StartClosing (double max_effort)
 Starts closing the gripper with a given maximum effort. More...
 
bool IsDone () const
 Returns true if the gripper is done opening or closing. More...
 
void Cancel ()
 Stops the gripper's opening or closing movement. More...
 

Static Public Member Functions

static Gripper Left ()
 Returns a Gripper object for the PR2's left gripper. More...
 
static Gripper Right ()
 Returns a Gripper object for the PR2's right gripper. More...
 

Detailed Description

High-level interface for a PR2's gripper.

Example:

left.StartClosing();
while (ros::ok() && !left.IsDone()) {
ros::spinOnce();
}

Definition at line 24 of file gripper.h.

Member Function Documentation

void rapid::pr2::Gripper::Cancel ( )

Stops the gripper's opening or closing movement.

bool rapid::pr2::Gripper::IsDone ( ) const

Returns true if the gripper is done opening or closing.

static Gripper rapid::pr2::Gripper::Left ( )
static

Returns a Gripper object for the PR2's left gripper.

static Gripper rapid::pr2::Gripper::Right ( )
static

Returns a Gripper object for the PR2's right gripper.

bool rapid::pr2::Gripper::StartClosing ( )

Starts closing the gripper.

Returns
true if the goal was sent, false if this couldn't connect to the gripper action server within 1 second.
bool rapid::pr2::Gripper::StartClosing ( double  max_effort)

Starts closing the gripper with a given maximum effort.

Parameters
[in]max_effortThe maximum amount of force to use, in Newtons.
Returns
true if the goal was sent, false if this couldn't connect to the gripper action server within 1 second.
bool rapid::pr2::Gripper::StartOpening ( )

Starts opening the gripper.

Returns
true if the goal was sent, false if this couldn't connect to the gripper action server within 1 second.

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