db_planner::RosDatabaseManager Class Reference

Pure virtual base class for interfacing GraspIt with an unspecified Grasp Database. More...

#include <ros_database_manager.h>

Inheritance diagram for db_planner::RosDatabaseManager:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual bool AcquireNextTask (TaskRecord *rec)
 Acquires the next experiment to be executed from the list of tasks in the database.
virtual bool AlignmentMethodList (vector< string > *) const
 Not implemented.
virtual bool DeleteGrasp (Grasp *grasp) const
 Delete a grasp from the database.
virtual bool DistanceFunctionList (vector< string > *) const
 Not implemented.
virtual bool GetAlignment (const Model &, const Model &, const string &, float *) const
 Not implemented.
virtual bool GetGrasps (const Model &model, const string &hand_name, vector< Grasp * > *grasp_list) const
 Get a list of the Grasps for a Model.
virtual bool GetNeighbors (const Model &, const string &, const int, vector< pair< Model *, double > > *) const
 Not implemented.
virtual bool GetOptimizationTaskRecord (int task_id, OptimizationTaskRecord *rec)
 Fills in the details for an optimzation task based on the task id.
virtual bool GetPlanningTaskRecord (int task_id, PlanningTaskRecord *rec)
 Fills in the details for a planning task based on the task id.
virtual bool GraspTypeList (vector< string > *type_list) const
 Get a list of grasp types available in the database.
virtual bool InsertGraspPair (const Grasp *grasp1, const Grasp *grasp2) const
 Inserts into the database info that a pair of existing db grasps can be executed simultaneously.
virtual bool isConnected () const
 Returns true if the manager has successfully connected to the database.
virtual bool LoadModelGeometry (Model *model) const
 Loads the model's mesh directly from the database.
virtual bool ModelList (vector< Model * > *model_list, FilterList::FilterType filter=FilterList::NONE) const
 Get a list of models in the database.
 RosDatabaseManager (std::string host, std::string port, std::string user, std::string password, std::string dbname, ModelAllocator *model_allocator, GraspAllocator *grasp_allocator)
virtual bool SaveAlignment (const Model &, const Model &, const string &, const float *) const
 Not implemented.
virtual bool SaveGrasp (const Grasp *) const
 Save a grasp into the database.
virtual bool SaveNeighbors (const Model &, const string &, const vector< pair< Model *, double > > &) const
 Not implemented.
virtual bool SaveOptimizationResults (const OptimizationTaskRecord &rec, const std::vector< double > &parameters, const std::vector< double > &results)
 Saves the results of an optimization in the database.
virtual bool ScaledModel (Model *&model, int scaled_model_id) const
 Gets one individual model from the database based on scaled model id.
void SetGraspAllocator (GraspAllocator *allocator)
 Sets a new grasp allocator; deletes the old one.
virtual bool SetGraspClusterRep (Grasp *grasp, bool rep) const
 Sets the cluster_rep field of the grasp in the database.
virtual bool SetGraspTableClearance (Grasp *grasp, double clearance) const
 Sets the table_clearance field of the grasp in the database.
void SetModelAllocator (ModelAllocator *allocator)
 Sets a new model allocator; deletes the old one.
virtual bool SetTaskStatus (int task_id, const string &status)
 Change the status of a task in the database (e.g. mark it as COMPLETED).
 ~RosDatabaseManager ()

Protected Member Functions

void modelFromDBModel (Model *model, const household_objects_database::DatabaseScaledModel &db_model, std::string model_root) const
 Initializes a graspit model from a raw database model. Helper for ModelList.

Protected Attributes

household_objects_database::ObjectsDatabase * database_
 The actual ROS interface to the database.

Detailed Description

Pure virtual base class for interfacing GraspIt with an unspecified Grasp Database.

Definition at line 54 of file ros_database_manager.h.


Constructor & Destructor Documentation

db_planner::RosDatabaseManager::RosDatabaseManager ( std::string  host,
std::string  port,
std::string  user,
std::string  password,
std::string  dbname,
ModelAllocator model_allocator,
GraspAllocator grasp_allocator 
)

Definition at line 42 of file ros_database_manager.cpp.

db_planner::RosDatabaseManager::~RosDatabaseManager (  ) 

Definition at line 51 of file ros_database_manager.cpp.


Member Function Documentation

bool db_planner::RosDatabaseManager::AcquireNextTask ( TaskRecord rec  )  [virtual]

Acquires the next experiment to be executed from the list of tasks in the database.

Also marks it as RUNNING in an atomic fashion, so that it is not acquired by another process.

Implements db_planner::DatabaseManager.

Definition at line 126 of file ros_database_manager.cpp.

virtual bool db_planner::RosDatabaseManager::AlignmentMethodList ( vector< string > *   )  const [inline, virtual]

Not implemented.

Implements db_planner::DatabaseManager.

Definition at line 95 of file ros_database_manager.h.

bool db_planner::RosDatabaseManager::DeleteGrasp ( Grasp grasp  )  const [virtual]

Delete a grasp from the database.

Implements db_planner::DatabaseManager.

Definition at line 327 of file ros_database_manager.cpp.

virtual bool db_planner::RosDatabaseManager::DistanceFunctionList ( vector< string > *   )  const [inline, virtual]

Not implemented.

Implements db_planner::DatabaseManager.

Definition at line 93 of file ros_database_manager.h.

virtual bool db_planner::RosDatabaseManager::GetAlignment ( const Model ,
const Model ,
const string &  ,
float *   
) const [inline, virtual]

Not implemented.

Definition at line 83 of file ros_database_manager.h.

bool db_planner::RosDatabaseManager::GetGrasps ( const Model model,
const string &  hand_name,
vector< Grasp * > *  grasp_list 
) const [virtual]

Get a list of the Grasps for a Model.

Implements db_planner::DatabaseManager.

Definition at line 223 of file ros_database_manager.cpp.

virtual bool db_planner::RosDatabaseManager::GetNeighbors ( const Model ,
const string &  ,
const   int,
vector< pair< Model *, double > > *   
) const [inline, virtual]

Not implemented.

Implements db_planner::DatabaseManager.

Definition at line 87 of file ros_database_manager.h.

bool db_planner::RosDatabaseManager::GetOptimizationTaskRecord ( int  task_id,
OptimizationTaskRecord rec 
) [virtual]

Fills in the details for an optimzation task based on the task id.

Reimplemented from db_planner::DatabaseManager.

Definition at line 184 of file ros_database_manager.cpp.

bool db_planner::RosDatabaseManager::GetPlanningTaskRecord ( int  task_id,
PlanningTaskRecord rec 
) [virtual]

Fills in the details for a planning task based on the task id.

Implements db_planner::DatabaseManager.

Definition at line 151 of file ros_database_manager.cpp.

bool db_planner::RosDatabaseManager::GraspTypeList ( vector< string > *  type_list  )  const [virtual]

Get a list of grasp types available in the database.

Implements db_planner::DatabaseManager.

Definition at line 217 of file ros_database_manager.cpp.

bool db_planner::RosDatabaseManager::InsertGraspPair ( const Grasp grasp1,
const Grasp grasp2 
) const [virtual]

Inserts into the database info that a pair of existing db grasps can be executed simultaneously.

Implements db_planner::DatabaseManager.

Definition at line 352 of file ros_database_manager.cpp.

bool db_planner::RosDatabaseManager::isConnected (  )  const [virtual]

Returns true if the manager has successfully connected to the database.

Implements db_planner::DatabaseManager.

Definition at line 59 of file ros_database_manager.cpp.

bool db_planner::RosDatabaseManager::LoadModelGeometry ( Model model  )  const [virtual]

Loads the model's mesh directly from the database.

Implements db_planner::DatabaseManager.

Definition at line 365 of file ros_database_manager.cpp.

void db_planner::RosDatabaseManager::modelFromDBModel ( Model model,
const household_objects_database::DatabaseScaledModel &  db_model,
std::string  model_root 
) const [protected]

Initializes a graspit model from a raw database model. Helper for ModelList.

Definition at line 64 of file ros_database_manager.cpp.

bool db_planner::RosDatabaseManager::ModelList ( vector< Model * > *  model_list,
FilterList::FilterType  filter = FilterList::NONE 
) const [virtual]

Get a list of models in the database.

Implements db_planner::DatabaseManager.

Definition at line 96 of file ros_database_manager.cpp.

virtual bool db_planner::RosDatabaseManager::SaveAlignment ( const Model ,
const Model ,
const string &  ,
const float *   
) const [inline, virtual]

Not implemented.

Definition at line 85 of file ros_database_manager.h.

bool db_planner::RosDatabaseManager::SaveGrasp ( const Grasp grasp  )  const [virtual]

Save a grasp into the database.

Implements db_planner::DatabaseManager.

Definition at line 287 of file ros_database_manager.cpp.

virtual bool db_planner::RosDatabaseManager::SaveNeighbors ( const Model ,
const string &  ,
const vector< pair< Model *, double > > &   
) const [inline, virtual]

Not implemented.

Implements db_planner::DatabaseManager.

Definition at line 90 of file ros_database_manager.h.

bool db_planner::RosDatabaseManager::SaveOptimizationResults ( const OptimizationTaskRecord rec,
const std::vector< double > &  parameters,
const std::vector< double > &  results 
) [virtual]

Saves the results of an optimization in the database.

Reimplemented from db_planner::DatabaseManager.

Definition at line 200 of file ros_database_manager.cpp.

bool db_planner::RosDatabaseManager::ScaledModel ( Model *&  model,
int  scaled_model_id 
) const [virtual]

Gets one individual model from the database based on scaled model id.

Implements db_planner::DatabaseManager.

Definition at line 111 of file ros_database_manager.cpp.

void db_planner::RosDatabaseManager::SetGraspAllocator ( GraspAllocator allocator  )  [inline, virtual]

Sets a new grasp allocator; deletes the old one.

Implements db_planner::DatabaseManager.

Definition at line 72 of file ros_database_manager.h.

bool db_planner::RosDatabaseManager::SetGraspClusterRep ( Grasp grasp,
bool  rep 
) const [virtual]

Sets the cluster_rep field of the grasp in the database.

Implements db_planner::DatabaseManager.

Definition at line 335 of file ros_database_manager.cpp.

bool db_planner::RosDatabaseManager::SetGraspTableClearance ( Grasp grasp,
double  clearance 
) const [virtual]

Sets the table_clearance field of the grasp in the database.

Implements db_planner::DatabaseManager.

Definition at line 343 of file ros_database_manager.cpp.

void db_planner::RosDatabaseManager::SetModelAllocator ( ModelAllocator allocator  )  [inline, virtual]

Sets a new model allocator; deletes the old one.

Implements db_planner::DatabaseManager.

Definition at line 77 of file ros_database_manager.h.

bool db_planner::RosDatabaseManager::SetTaskStatus ( int  task_id,
const string &  status 
) [virtual]

Change the status of a task in the database (e.g. mark it as COMPLETED).

Implements db_planner::DatabaseManager.

Definition at line 142 of file ros_database_manager.cpp.


Member Data Documentation

household_objects_database::ObjectsDatabase* db_planner::RosDatabaseManager::database_ [protected]

The actual ROS interface to the database.

Definition at line 59 of file ros_database_manager.h.


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


graspit
Author(s):
autogenerated on Wed Jan 25 11:00:32 2012