probabilistic_grasp_planner::DatabaseGraspRetriever Class Reference

#include <grasp_retriever.h>

Inheritance diagram for probabilistic_grasp_planner::DatabaseGraspRetriever:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DatabaseGraspRetriever (ObjectsDatabasePtr database, const household_objects_database_msgs::DatabaseModelPose &model, const std::string &arm_name, bool prune_compliant_copies, bool use_cluster_rep_grasps)
virtual void fetchFromDB ()
virtual void getGrasps (std::vector< GraspWithMetadata > &grasps)

Protected Member Functions

void appendMetadataToGrasps (const std::vector< household_objects_database::DatabaseGraspPtr > &db_grasps, std::vector< GraspWithMetadata > &grasps)
void pruneGraspList (std::vector< household_objects_database::DatabaseGraspPtr > &grasps, double gripper_threshold, double table_clearance_threshold)

Protected Attributes

ObjectsDatabasePtr database_
const
household_objects_database_msgs::DatabaseModelPose & 
model_
 The model whose grasps this retriever will retrieve.
bool prune_compliant_copies_
 Whether compliant copies should be returned or not.
bool use_cluster_rep_grasps_
 Whether only cluster representative grasps should be returned.

Private Attributes

std::map< int, std::vector
< household_objects_database::DatabaseGraspPtr > > 
grasps_cache_
 A cache storing model_id->grasps for that model. This is private since subclasses should not share caches.

Detailed Description

Definition at line 75 of file grasp_retriever.h.


Constructor & Destructor Documentation

probabilistic_grasp_planner::DatabaseGraspRetriever::DatabaseGraspRetriever ( ObjectsDatabasePtr  database,
const household_objects_database_msgs::DatabaseModelPose &  model,
const std::string &  arm_name,
bool  prune_compliant_copies,
bool  use_cluster_rep_grasps 
)

Instantiates a DatabaseGraspRetriever which gets all grasps for a model (as opposed to just cluster rep grasps)

Definition at line 167 of file grasp_retriever.cpp.


Member Function Documentation

void probabilistic_grasp_planner::DatabaseGraspRetriever::appendMetadataToGrasps ( const std::vector< household_objects_database::DatabaseGraspPtr > &  db_grasps,
std::vector< GraspWithMetadata > &  grasps 
) [protected]

Given a model which the grasps are specified relative to, and a list of grasps from the database, populates a list of GraspWithMetadata objects which contains the basic Grasp object for final return by the planner and additional information used by the planner such as energy metrics and object coordinate frames.

void probabilistic_grasp_planner::DatabaseGraspRetriever::fetchFromDB (  )  [virtual]
void probabilistic_grasp_planner::DatabaseGraspRetriever::getGrasps ( std::vector< GraspWithMetadata > &  grasps  )  [virtual]

Given a list of models, retrieves all of the cluster representative grasps for those models and stores them with their metadata in the grasps vector.

Implements probabilistic_grasp_planner::GraspRetriever.

Reimplemented in probabilistic_grasp_planner::ClusterRepGraspRetriever, probabilistic_grasp_planner::DebugClusterRepGraspRetriever, and probabilistic_grasp_planner::PerturbationGraspRetriever.

Definition at line 225 of file grasp_retriever.cpp.

void probabilistic_grasp_planner::DatabaseGraspRetriever::pruneGraspList ( std::vector< household_objects_database::DatabaseGraspPtr > &  grasps,
double  gripper_threshold,
double  table_clearance_threshold 
) [protected]

Removes grasps from the list which do not match certain criteria (such as not coming from beneath the object).


Member Data Documentation

Definition at line 82 of file grasp_retriever.h.

std::map<int, std::vector<household_objects_database::DatabaseGraspPtr> > probabilistic_grasp_planner::DatabaseGraspRetriever::grasps_cache_ [private]

A cache storing model_id->grasps for that model. This is private since subclasses should not share caches.

Reimplemented in probabilistic_grasp_planner::ClusterRepGraspRetriever.

Definition at line 79 of file grasp_retriever.h.

const household_objects_database_msgs::DatabaseModelPose& probabilistic_grasp_planner::DatabaseGraspRetriever::model_ [protected]

The model whose grasps this retriever will retrieve.

Definition at line 85 of file grasp_retriever.h.

Whether compliant copies should be returned or not.

Definition at line 88 of file grasp_retriever.h.

Whether only cluster representative grasps should be returned.

Definition at line 91 of file grasp_retriever.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:09 2013