Base class, interface and common functionality for grasp execution. More...
#include <grasp_executor.h>
Public Member Functions | |
object_manipulation_msgs::GraspResult | checkAndExecuteGrasp (const object_manipulation_msgs::PickupGoal &pickup_goal, const object_manipulation_msgs::Grasp &grasp) |
Checks if the grasp is feasible, then executes it. | |
GraspExecutor (GraspMarkerPublisher *pub) | |
Also sets the marker publisher that is to be used; pass NULL to disable marker publishing. | |
virtual object_manipulation_msgs::GraspResult | lift (const object_manipulation_msgs::PickupGoal &pickup_goal) |
Lifts the object after grasping. | |
object_manipulation_msgs::GraspResult | Result (int result_code, bool continuation) |
virtual object_manipulation_msgs::GraspResult | retreat (const object_manipulation_msgs::PickupGoal &pickup_goal, const object_manipulation_msgs::Grasp &grasp) |
Called if the grasp fails to retreat the gripper. | |
virtual | ~GraspExecutor () |
Protected Member Functions | |
arm_navigation_msgs::OrderedCollisionOperations | collisionOperationsForLift (const object_manipulation_msgs::PickupGoal &pickup_goal) |
Collision operations to be used when planning the lift motion. | |
virtual object_manipulation_msgs::GraspResult | executeGrasp (const object_manipulation_msgs::PickupGoal &pickup_goal, const object_manipulation_msgs::Grasp &grasp)=0 |
Implementation of the actual execution stage of the grasp. | |
std::vector < arm_navigation_msgs::LinkPadding > | fingertipPadding (const object_manipulation_msgs::PickupGoal &pickup_goal, double pad) |
Helper function for setting padding on fingertips. | |
object_manipulation_msgs::GraspResult | getInterpolatedIKForLift (const object_manipulation_msgs::PickupGoal &pickup_goal, const object_manipulation_msgs::Grasp &grasp, const std::vector< double > &grasp_joint_angles, trajectory_msgs::JointTrajectory &lift_trajectory) |
Calls the interpolated IK service to find a path from the grasp to lift the object. | |
std::vector < arm_navigation_msgs::LinkPadding > | linkPaddingForLift (const object_manipulation_msgs::PickupGoal &pickup_goal) |
Dynamic link padding to be used when planning the lift motion. | |
virtual object_manipulation_msgs::GraspResult | prepareGrasp (const object_manipulation_msgs::PickupGoal &pickup_goal, const object_manipulation_msgs::Grasp &grasp)=0 |
Performs an initial check to see if the grasp is valid and generates information needed to execute it. | |
Protected Attributes | |
trajectory_msgs::JointTrajectory | interpolated_lift_trajectory_ |
The result of interpolated IK from grasp to lift. | |
unsigned int | marker_id_ |
The marker id of this grasp, retrieved from the publisher. | |
GraspMarkerPublisher * | marker_publisher_ |
The marker publisher that will be used; NULL is marker publishing is disabled. |
Base class, interface and common functionality for grasp execution.
Defines the interface for a grasp executor:
Definition at line 53 of file grasp_executor.h.
object_manipulator::GraspExecutor::GraspExecutor | ( | GraspMarkerPublisher * | pub | ) | [inline] |
Also sets the marker publisher that is to be used; pass NULL to disable marker publishing.
Definition at line 108 of file grasp_executor.h.
virtual object_manipulator::GraspExecutor::~GraspExecutor | ( | ) | [inline, virtual] |
Definition at line 110 of file grasp_executor.h.
GraspResult object_manipulator::GraspExecutor::checkAndExecuteGrasp | ( | const object_manipulation_msgs::PickupGoal & | pickup_goal, |
const object_manipulation_msgs::Grasp & | grasp | ||
) |
Checks if the grasp is feasible, then executes it.
Definition at line 145 of file grasp_executor.cpp.
arm_navigation_msgs::OrderedCollisionOperations object_manipulator::GraspExecutor::collisionOperationsForLift | ( | const object_manipulation_msgs::PickupGoal & | pickup_goal | ) | [protected] |
Collision operations to be used when planning the lift motion.
Disables collision between gripper and target
Reimplemented in object_manipulator::UnsafeGraspExecutor.
Definition at line 49 of file grasp_executor.cpp.
virtual object_manipulation_msgs::GraspResult object_manipulator::GraspExecutor::executeGrasp | ( | const object_manipulation_msgs::PickupGoal & | pickup_goal, |
const object_manipulation_msgs::Grasp & | grasp | ||
) | [protected, pure virtual] |
Implementation of the actual execution stage of the grasp.
Can use information generated during prepareGrasp
Implemented in object_manipulator::GraspExecutorWithApproach, object_manipulator::UnsafeGraspExecutor, object_manipulator::SimpleGraspExecutor, and object_manipulator::ReactiveGraspExecutor.
std::vector<arm_navigation_msgs::LinkPadding> object_manipulator::GraspExecutor::fingertipPadding | ( | const object_manipulation_msgs::PickupGoal & | pickup_goal, |
double | pad | ||
) | [protected] |
Helper function for setting padding on fingertips.
GraspResult object_manipulator::GraspExecutor::getInterpolatedIKForLift | ( | const object_manipulation_msgs::PickupGoal & | pickup_goal, |
const object_manipulation_msgs::Grasp & | grasp, | ||
const std::vector< double > & | grasp_joint_angles, | ||
trajectory_msgs::JointTrajectory & | lift_trajectory | ||
) | [protected] |
Calls the interpolated IK service to find a path from the grasp to lift the object.
Definition at line 81 of file grasp_executor.cpp.
GraspResult object_manipulator::GraspExecutor::lift | ( | const object_manipulation_msgs::PickupGoal & | pickup_goal | ) | [virtual] |
Lifts the object after grasping.
Generally returns SUCCESS if full lift was achieved, UNFEASIBLE if no movement was performed and FAILED if some movement was achieved but it fell short of a full lift.
Will often use information that was pre-generated during grasp execution, so this should always be called after executeGrasp() has succeeded.
Reimplemented in object_manipulator::ReactiveGraspExecutor.
Definition at line 131 of file grasp_executor.cpp.
std::vector< arm_navigation_msgs::LinkPadding > object_manipulator::GraspExecutor::linkPaddingForLift | ( | const object_manipulation_msgs::PickupGoal & | pickup_goal | ) | [protected] |
Dynamic link padding to be used when planning the lift motion.
Zero padding on fingertip links
Definition at line 72 of file grasp_executor.cpp.
virtual object_manipulation_msgs::GraspResult object_manipulator::GraspExecutor::prepareGrasp | ( | const object_manipulation_msgs::PickupGoal & | pickup_goal, |
const object_manipulation_msgs::Grasp & | grasp | ||
) | [protected, pure virtual] |
Performs an initial check to see if the grasp is valid and generates information needed to execute it.
Implemented in object_manipulator::GraspExecutorWithApproach, and object_manipulator::SimpleGraspExecutor.
object_manipulation_msgs::GraspResult object_manipulator::GraspExecutor::Result | ( | int | result_code, |
bool | continuation | ||
) | [inline] |
Definition at line 56 of file grasp_executor.h.
virtual object_manipulation_msgs::GraspResult object_manipulator::GraspExecutor::retreat | ( | const object_manipulation_msgs::PickupGoal & | pickup_goal, |
const object_manipulation_msgs::Grasp & | grasp | ||
) | [inline, virtual] |
Called if the grasp fails to retreat the gripper.
By default, a grasp executor does not know how to do this. Generally returns UNFEASIBLE if no movement has been performed at all, SUCCESS if a full retreat was achieved and FAILED is some movement was performed but it fell short of a full retreat.
Reimplemented in object_manipulator::GraspExecutorWithApproach.
Definition at line 128 of file grasp_executor.h.
trajectory_msgs::JointTrajectory object_manipulator::GraspExecutor::interpolated_lift_trajectory_ [protected] |
The result of interpolated IK from grasp to lift.
Definition at line 73 of file grasp_executor.h.
unsigned int object_manipulator::GraspExecutor::marker_id_ [protected] |
The marker id of this grasp, retrieved from the publisher.
Definition at line 70 of file grasp_executor.h.
The marker publisher that will be used; NULL is marker publishing is disabled.
Definition at line 67 of file grasp_executor.h.