probabilistic_grasp_planner::ProbabilisticGraspPlanner Class Reference

#include <probabilistic_grasp_planner.h>

List of all members.

Public Member Functions

void plan (const std::string &arm_name, object_manipulation_msgs::GraspableObject &graspable_object, std::vector< object_manipulation_msgs::Grasp > &grasps, bool visualize_results, bool prune_grasps)
 ProbabilisticGraspPlanner (ObjectsDatabasePtr database)
void setMarkerPublisher (object_manipulator::GraspMarkerPublisher *publisher, object_manipulator::GraspMarkerPublisher *debug_publisher, object_manipulator::GraspMarkerPublisher *rank_publisher)

Private Member Functions

void appendMetadataToTestGrasps (std::vector< object_manipulation_msgs::Grasp > &input_list, std::vector< GraspWithMetadata > &output_list, const object_manipulation_msgs::GraspableObject &graspable_object)
void clusterGrasps (std::vector< GraspWithMetadata > &input_list, std::vector< GraspWithMetadata > &cluster_rep_list)
ObjectRepresentation getObjectRepresentationFromCluster (const object_manipulation_msgs::GraspableObject &request_object, std::string arm_name)
ObjectRepresentation getObjectRepresentationFromDatabaseObject (const household_objects_database_msgs::DatabaseModelPose &model_with_score, std::string arm_name)
void populateRepresentationsList (std::vector< ObjectRepresentation > &representations, std::string arm_name, const object_manipulation_msgs::GraspableObject &request_object, const bool enable_cluster)
void printGrasps (const std::vector< GraspWithMetadata > &grasps)
void printRepresentations (const std::vector< ObjectRepresentation > &representations)
void pruneGraspList (std::vector< GraspWithMetadata > &grasps, const double threshold)
void visualizeGrasps (const std::vector< GraspWithMetadata > &grasps, object_manipulator::GraspMarkerPublisher *grasp_marker_pub, bool color_by_rank)

Private Attributes

ObjectsDatabasePtr database_
object_manipulator::GraspMarkerPublisher * debug_grasp_marker_publisher_
 GMP which shows all grasps and colors based on relative probability.
object_manipulator::GraspMarkerPublisher debug_postprune_grasp_marker_publisher_
 GMP for grasps after pruning and clustering but before second pass.
object_manipulator::GraspMarkerPublisher debug_precluster_grasp_marker_publisher_
 GMP for grasps after pruning but before clustering.
object_manipulator::GraspMarkerPublisher debug_preprune_grasp_marker_publisher_
 GMP for grasps before pruning.
object_manipulator::GraspMarkerPublisher * grasp_marker_publisher_
 GMP which shows the grasps returned by the planner, colored by relative probability compared to the best grasp.
ros::NodeHandle nh_
object_manipulator::GraspMarkerPublisher * rank_grasp_marker_publisher_
 GMP which colors grasps based on their rank in the sorted list.

Detailed Description

Definition at line 43 of file probabilistic_grasp_planner.h.


Constructor & Destructor Documentation

probabilistic_grasp_planner::ProbabilisticGraspPlanner::ProbabilisticGraspPlanner ( ObjectsDatabasePtr  database  )  [inline]

Creates a new ProbabilisticDatabasePlanner with a connection to the database

Definition at line 114 of file probabilistic_grasp_planner.h.


Member Function Documentation

void probabilistic_grasp_planner::ProbabilisticGraspPlanner::appendMetadataToTestGrasps ( std::vector< object_manipulation_msgs::Grasp > &  input_list,
std::vector< GraspWithMetadata > &  output_list,
const object_manipulation_msgs::GraspableObject &  graspable_object 
) [private]

The "tool point" is roughly in the middle of the object enclosed by the grasp, so roughly 13cm from wrist

Definition at line 524 of file probabilistic_grasp_planner.cpp.

void probabilistic_grasp_planner::ProbabilisticGraspPlanner::clusterGrasps ( std::vector< GraspWithMetadata > &  input_list,
std::vector< GraspWithMetadata > &  cluster_rep_list 
) [private]

TODO: this line adds non-cluster grasps to the result list so that we can see all grasps with cluster reps highlighted. Remove this to actually filter out non-cluster rep grasps.

Definition at line 559 of file probabilistic_grasp_planner.cpp.

ObjectRepresentation probabilistic_grasp_planner::ProbabilisticGraspPlanner::getObjectRepresentationFromCluster ( const object_manipulation_msgs::GraspableObject &  request_object,
std::string  arm_name 
) [private]

Creates an object representation based on the cluster, complete with a grasp retriever and probability computer.

Definition at line 295 of file probabilistic_grasp_planner.cpp.

ObjectRepresentation probabilistic_grasp_planner::ProbabilisticGraspPlanner::getObjectRepresentationFromDatabaseObject ( const household_objects_database_msgs::DatabaseModelPose &  model_with_score,
std::string  arm_name 
) [private]

Creates an object representation based on a recognition result, complete with a grasp retriever and probability computer.

Definition at line 356 of file probabilistic_grasp_planner.cpp.

void probabilistic_grasp_planner::ProbabilisticGraspPlanner::plan ( const std::string &  arm_name,
object_manipulation_msgs::GraspableObject &  graspable_object,
std::vector< object_manipulation_msgs::Grasp > &  grasps,
bool  visualize_results,
bool  prune_grasps 
)

Given a graspable object describes the seen point cloud, plans which grasp is most likely to successfully manipulate the underlying object. At the end of the computation, the grasps vector stores a list of grasps sorted by probability of successful manipulation. Optionally will publish the grasp markers for visualization.

TODO: switch this to a std::list, we don't need random access

note that grasps should now be very small

Definition at line 80 of file probabilistic_grasp_planner.cpp.

void probabilistic_grasp_planner::ProbabilisticGraspPlanner::populateRepresentationsList ( std::vector< ObjectRepresentation > &  representations,
std::string  arm_name,
const object_manipulation_msgs::GraspableObject &  request_object,
const bool  enable_cluster 
) [private]

Given an initial GraspableObject containing representations from different sources (database fits, clusters, etc), populates a list of Representations each labeled with their type and only storing one representation of the real object (for example, only one DatabaseModelPoseWithScore or only one PointCloud)

Definition at line 276 of file probabilistic_grasp_planner.cpp.

void probabilistic_grasp_planner::ProbabilisticGraspPlanner::printGrasps ( const std::vector< GraspWithMetadata > &  grasps  )  [private]

Definition at line 502 of file probabilistic_grasp_planner.cpp.

void probabilistic_grasp_planner::ProbabilisticGraspPlanner::printRepresentations ( const std::vector< ObjectRepresentation > &  representations  )  [private]

Definition at line 485 of file probabilistic_grasp_planner.cpp.

void probabilistic_grasp_planner::ProbabilisticGraspPlanner::pruneGraspList ( std::vector< GraspWithMetadata > &  grasps,
const double  threshold 
) [private]

Definition at line 256 of file probabilistic_grasp_planner.cpp.

void probabilistic_grasp_planner::ProbabilisticGraspPlanner::setMarkerPublisher ( object_manipulator::GraspMarkerPublisher *  publisher,
object_manipulator::GraspMarkerPublisher *  debug_publisher,
object_manipulator::GraspMarkerPublisher *  rank_publisher 
) [inline]

Sets the grasp marker publishers that can optionally be used by this Planner. If the publishers are null, the planner won't try to publish anything.

Definition at line 137 of file probabilistic_grasp_planner.h.

void probabilistic_grasp_planner::ProbabilisticGraspPlanner::visualizeGrasps ( const std::vector< GraspWithMetadata > &  grasps,
object_manipulator::GraspMarkerPublisher *  grasp_marker_pub,
bool  color_by_rank 
) [private]

Publishes the grasps to rviz with specific namespaces for grasps belonging to each different model, colored with green being the best grasp and red being the worst.

Definition at line 446 of file probabilistic_grasp_planner.cpp.


Member Data Documentation

Definition at line 43 of file probabilistic_grasp_planner.h.

GMP which shows all grasps and colors based on relative probability.

Definition at line 51 of file probabilistic_grasp_planner.h.

GMP for grasps after pruning and clustering but before second pass.

Definition at line 60 of file probabilistic_grasp_planner.h.

GMP for grasps after pruning but before clustering.

Definition at line 57 of file probabilistic_grasp_planner.h.

GMP for grasps before pruning.

Definition at line 54 of file probabilistic_grasp_planner.h.

object_manipulator::GraspMarkerPublisher* probabilistic_grasp_planner::ProbabilisticGraspPlanner::grasp_marker_publisher_ [private]

GMP which shows the grasps returned by the planner, colored by relative probability compared to the best grasp.

Definition at line 48 of file probabilistic_grasp_planner.h.

Definition at line 45 of file probabilistic_grasp_planner.h.

GMP which colors grasps based on their rank in the sorted list.

Definition at line 63 of file probabilistic_grasp_planner.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines


probabilistic_grasp_planner
Author(s): Peter Brook
autogenerated on Fri Jan 11 09:52:10 2013