#include <bayesian_grasp_planner.h>
Public Member Functions | |
BayesianGraspPlanner (household_objects_database::ObjectsDatabasePtr database) | |
void | bayesianInference (std::vector< GraspWM > &grasps, const std::vector< object_manipulation_msgs::GraspableObject > &objects, const std::vector< boost::shared_ptr< ObjectDetector > > &object_detectors, const std::vector< boost::shared_ptr< GraspEvaluatorProb > > &prob_evaluators) |
void | plan (const std::string &arm_name, const object_manipulation_msgs::GraspableObject &graspable_object, std::vector< object_manipulation_msgs::Grasp > &final_grasp_list) |
Private Member Functions | |
void | appendMetadataToTestGrasps (std::vector< object_manipulation_msgs::Grasp > &input_list, std::vector< GraspWM > &output_list, const std::string frame_id) |
void | clusterGrasps (std::vector< GraspWM > &input_list, std::vector< GraspWM > &cluster_rep_list) |
void | createDatabaseObjectDetectors (const std::vector< object_manipulation_msgs::GraspableObject > &objects, std::vector< boost::shared_ptr< ObjectDetector > > &detectors) |
void | createMutuallyExclusiveObjectRepresentations (const object_manipulation_msgs::GraspableObject &original_object, std::vector< object_manipulation_msgs::GraspableObject > &me_objects) |
void | pruneGraspList (std::vector< GraspWM > &grasps, const double threshold) |
void | visualizeGrasps (const std::vector< GraspWM > &grasps, object_manipulator::GraspMarkerPublisher *grasp_marker_pub, bool color_by_rank) |
Private Attributes | |
household_objects_database::ObjectsDatabasePtr | database_ |
object_manipulator::GraspMarkerPublisher | debug_postprune_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 probability. | |
ros::NodeHandle | nh_ |
Definition at line 50 of file bayesian_grasp_planner.h.
bayesian_grasp_planner::BayesianGraspPlanner::BayesianGraspPlanner | ( | household_objects_database::ObjectsDatabasePtr | database | ) | [inline] |
Definition at line 91 of file bayesian_grasp_planner.h.
void bayesian_grasp_planner::BayesianGraspPlanner::appendMetadataToTestGrasps | ( | std::vector< object_manipulation_msgs::Grasp > & | input_list, | |
std::vector< GraspWM > & | output_list, | |||
const std::string | frame_id | |||
) | [private] |
The "tool point" is roughly in the middle of the object enclosed by the grasp, so roughly 13cm from wrist
Definition at line 466 of file bayesian_grasp_planner.cpp.
void bayesian_grasp_planner::BayesianGraspPlanner::bayesianInference | ( | std::vector< GraspWM > & | grasps, | |
const std::vector< object_manipulation_msgs::GraspableObject > & | objects, | |||
const std::vector< boost::shared_ptr< ObjectDetector > > & | object_detectors, | |||
const std::vector< boost::shared_ptr< GraspEvaluatorProb > > & | prob_evaluators | |||
) |
Definition at line 46 of file bayesian_grasp_planner.cpp.
void bayesian_grasp_planner::BayesianGraspPlanner::clusterGrasps | ( | std::vector< GraspWM > & | input_list, | |
std::vector< GraspWM > & | 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 499 of file bayesian_grasp_planner.cpp.
void bayesian_grasp_planner::BayesianGraspPlanner::createDatabaseObjectDetectors | ( | const std::vector< object_manipulation_msgs::GraspableObject > & | objects, | |
std::vector< boost::shared_ptr< ObjectDetector > > & | detectors | |||
) | [private] |
Definition at line 442 of file bayesian_grasp_planner.cpp.
void bayesian_grasp_planner::BayesianGraspPlanner::createMutuallyExclusiveObjectRepresentations | ( | const object_manipulation_msgs::GraspableObject & | original_object, | |
std::vector< object_manipulation_msgs::GraspableObject > & | me_objects | |||
) | [private] |
Definition at line 420 of file bayesian_grasp_planner.cpp.
void bayesian_grasp_planner::BayesianGraspPlanner::plan | ( | const std::string & | arm_name, | |
const object_manipulation_msgs::GraspableObject & | graspable_object, | |||
std::vector< object_manipulation_msgs::Grasp > & | final_grasp_list | |||
) |
Definition at line 227 of file bayesian_grasp_planner.cpp.
void bayesian_grasp_planner::BayesianGraspPlanner::pruneGraspList | ( | std::vector< GraspWM > & | grasps, | |
const double | threshold | |||
) | [private] |
Definition at line 542 of file bayesian_grasp_planner.cpp.
void bayesian_grasp_planner::BayesianGraspPlanner::visualizeGrasps | ( | const std::vector< GraspWM > & | 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 564 of file bayesian_grasp_planner.cpp.
household_objects_database::ObjectsDatabasePtr bayesian_grasp_planner::BayesianGraspPlanner::database_ [private] |
Definition at line 56 of file bayesian_grasp_planner.h.
object_manipulator::GraspMarkerPublisher bayesian_grasp_planner::BayesianGraspPlanner::debug_postprune_grasp_marker_publisher_ [private] |
GMP for grasps after pruning but before clustering.
Definition at line 62 of file bayesian_grasp_planner.h.
object_manipulator::GraspMarkerPublisher bayesian_grasp_planner::BayesianGraspPlanner::debug_preprune_grasp_marker_publisher_ [private] |
GMP for grasps before pruning.
Definition at line 59 of file bayesian_grasp_planner.h.
object_manipulator::GraspMarkerPublisher bayesian_grasp_planner::BayesianGraspPlanner::grasp_marker_publisher_ [private] |
GMP which shows the grasps returned by the planner, colored by probability.
Definition at line 65 of file bayesian_grasp_planner.h.
ros::NodeHandle bayesian_grasp_planner::BayesianGraspPlanner::nh_ [private] |
Definition at line 54 of file bayesian_grasp_planner.h.