Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
PR2GripperGraspController Class Reference

Converts GraspHandPostureExecution goals or queries into controller commands for the PR2 or LCG grippers. More...

List of all members.

Public Member Functions

 PR2GripperGraspController ()
 ~PR2GripperGraspController ()

Private Member Functions

void executeCB (const object_manipulation_msgs::GraspHandPostureExecutionGoalConstPtr &goal)
bool getGripperValue (double &value)
 Returns the current value of the gripper joint.
double jointToGap (double jointValue)
 Given a value of a gripper joint, converts that to a value of the gap between the fingers.
bool serviceCallback (object_manipulation_msgs::GraspStatus::Request &request, object_manipulation_msgs::GraspStatus::Response &response)

Private Attributes

actionlib::SimpleActionServer
< object_manipulation_msgs::GraspHandPostureExecutionAction > * 
action_server_
 Action server for the grasp poture action.
actionlib::SimpleActionClient
< pr2_controllers_msgs::Pr2GripperCommandAction > * 
gripper_action_client_
 Action client for moving the PR2 gripper.
double gripper_closed_gap_value_
 Gap value for gripper fully closed.
double gripper_max_effort_
 Max effort used when achieving a position (e.g. pre-grasp or release) without epxecting an object.
double gripper_object_presence_threshold_
 A value of [rl]_gripper_joint below this indicates there is nothing inside the gripper.
double gripper_open_gap_value_
 Gap value for gripper fully open.
std::string gripper_type_
 The type of gripper, for now "pr2" or "lcg".
std::string gripper_virtual_joint_name_
 The name of the virtual joint of the gripper.
ros::NodeHandle priv_nh_
 The private namespace node handle.
ros::ServiceServer query_srv_
 Server for the posture query service.
ros::NodeHandle root_nh_
 The root namespace node handle.

Static Private Attributes

static const double DEFAULT_GRIPPER_CLOSED = 0.0
 Default gap value for gripper fully closed.
static const double DEFAULT_GRIPPER_MAX_EFFORT = 100
 Default max effort for achieving a position.
static const double DEFAULT_GRIPPER_OBJECT_PRESENCE_THRESHOLD = 0.0021
 Default value in case this parameter is not in the launch file.
static const double DEFAULT_GRIPPER_OPEN = 0.086
 Default gap value for gripper fully open.

Detailed Description

Converts GraspHandPostureExecution goals or queries into controller commands for the PR2 or LCG grippers.

GraspHandPostureExecution reasons in terms of joint values, while the PR2 gripper (and for now the LCG) controllers reason in terms of gap between the fingers. This node makes the translation.

For both grippers, only looks at the first joint value in the grasp, and uses it to convert to a gap value.

Definition at line 54 of file pr2_gripper_grasp_controller.cpp.


Constructor & Destructor Documentation

Definition at line 268 of file pr2_gripper_grasp_controller.cpp.

Definition at line 308 of file pr2_gripper_grasp_controller.cpp.


Member Function Documentation

Definition at line 145 of file pr2_gripper_grasp_controller.cpp.

bool PR2GripperGraspController::getGripperValue ( double &  value) [inline, private]

Returns the current value of the gripper joint.

Definition at line 104 of file pr2_gripper_grasp_controller.cpp.

double PR2GripperGraspController::jointToGap ( double  jointValue) [inline, private]

Given a value of a gripper joint, converts that to a value of the gap between the fingers.

This is different for the PR2 gripper and LCG

Definition at line 138 of file pr2_gripper_grasp_controller.cpp.

Definition at line 244 of file pr2_gripper_grasp_controller.cpp.


Member Data Documentation

Action server for the grasp poture action.

Definition at line 68 of file pr2_gripper_grasp_controller.cpp.

const double PR2GripperGraspController::DEFAULT_GRIPPER_CLOSED = 0.0 [static, private]

Default gap value for gripper fully closed.

Definition at line 86 of file pr2_gripper_grasp_controller.cpp.

const double PR2GripperGraspController::DEFAULT_GRIPPER_MAX_EFFORT = 100 [static, private]

Default max effort for achieving a position.

Definition at line 96 of file pr2_gripper_grasp_controller.cpp.

Default value in case this parameter is not in the launch file.

Definition at line 91 of file pr2_gripper_grasp_controller.cpp.

const double PR2GripperGraspController::DEFAULT_GRIPPER_OPEN = 0.086 [static, private]

Default gap value for gripper fully open.

Definition at line 81 of file pr2_gripper_grasp_controller.cpp.

Action client for moving the PR2 gripper.

Definition at line 65 of file pr2_gripper_grasp_controller.cpp.

Gap value for gripper fully closed.

Definition at line 84 of file pr2_gripper_grasp_controller.cpp.

Max effort used when achieving a position (e.g. pre-grasp or release) without epxecting an object.

Definition at line 94 of file pr2_gripper_grasp_controller.cpp.

A value of [rl]_gripper_joint below this indicates there is nothing inside the gripper.

Definition at line 89 of file pr2_gripper_grasp_controller.cpp.

Gap value for gripper fully open.

Definition at line 79 of file pr2_gripper_grasp_controller.cpp.

The type of gripper, for now "pr2" or "lcg".

Definition at line 99 of file pr2_gripper_grasp_controller.cpp.

The name of the virtual joint of the gripper.

Definition at line 74 of file pr2_gripper_grasp_controller.cpp.

The private namespace node handle.

Definition at line 62 of file pr2_gripper_grasp_controller.cpp.

Server for the posture query service.

Definition at line 71 of file pr2_gripper_grasp_controller.cpp.

The root namespace node handle.

Definition at line 59 of file pr2_gripper_grasp_controller.cpp.


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


pr2_gripper_grasp_controller
Author(s): Matei Ciocarlie
autogenerated on Fri Jan 3 2014 11:52:24