kidnapped_robot::PlaceDatabase Class Reference

#include <place_database.h>

List of all members.

Public Member Functions

int64_t add (ros::Time stamp, const tf::Pose &pose_in_map, const tf::Transform &optical_transform, const frame_common::Frame &frame, int64_t id=AUTO_ID)
void findInRegion (cv::Rect_< double > bounding_box, std::vector< int64_t > &ids) const
void findMatching (const frame_common::Frame &query_frame, size_t N, vt::Matches &matches) const
void getFrame (int64_t id, frame_common::Frame &frame) const
void getImages (int64_t id, cv::Mat &left, cv::Mat &right)
sqlite3 * getSqlite ()
void getTransforms (int64_t id, tf::Pose &pose_in_map, tf::Transform &optical_transform) const
void load (const std::string &db_file, const std::string &tree_file, const std::string &weights_file)
 PlaceDatabase (const std::string &db_file, const std::string &tree_file, const std::string &weights_file)
 PlaceDatabase ()
 ~PlaceDatabase ()

Static Public Attributes

static const int64_t AUTO_ID = LONG_MIN

Protected Member Functions

void bindCameraParams (const frame_common::CamParams &cam)
void bindImage (int col, const cv::Mat &image)
void bindTransform (const btTransform &xfm, int param_index)
template<typename T >
void bindVector (sqlite3_stmt *stmt, int col, const std::vector< T > &vec)
void checkErr (int returned_code, const char *msg, int expected_code=SQLITE_OK) const
void extractImage (cv::Mat &image, int col) const
void extractTransform (btTransform &xfm, int start_index) const
void loadDocumentDatabase (const std::string &weights_file)
void loadPersistentDatabase (const std::string &db_file)
void prepareReusedStatements ()

Private Types

typedef std::map< vt::DocId,
int64_t > 
IdMap

Private Attributes

int camera_param_index_
int disparities_param_index_
IdMap doc_to_place_id_
vt::Database document_db_
sqlite3_stmt * insert_stmt_
int keypoints_param_index_
int map_pose_param_index_
int optical_transform_param_index_
sqlite3 * persistent_db_
sqlite3_stmt * select_frame_stmt_
sqlite3_stmt * select_images_stmt_
sqlite3_stmt * select_spatial_stmt_
sqlite3_stmt * select_transforms_stmt_
vt::GenericTree voctree_

Detailed Description

Definition at line 11 of file place_database.h.


Member Typedef Documentation

typedef std::map<vt::DocId, int64_t> kidnapped_robot::PlaceDatabase::IdMap [private]

Definition at line 13 of file place_database.h.


Constructor & Destructor Documentation

kidnapped_robot::PlaceDatabase::PlaceDatabase (  ) 

Definition at line 25 of file place_database.cpp.

kidnapped_robot::PlaceDatabase::PlaceDatabase ( const std::string &  db_file,
const std::string &  tree_file,
const std::string &  weights_file 
)

Definition at line 32 of file place_database.cpp.

kidnapped_robot::PlaceDatabase::~PlaceDatabase (  ) 

Definition at line 40 of file place_database.cpp.


Member Function Documentation

int64_t kidnapped_robot::PlaceDatabase::add ( ros::Time  stamp,
const tf::Pose &  pose_in_map,
const tf::Transform &  optical_transform,
const frame_common::Frame &  frame,
int64_t  id = AUTO_ID 
)

Todo:
Move persistent db stuff to separate function

Definition at line 183 of file place_database.cpp.

void kidnapped_robot::PlaceDatabase::bindCameraParams ( const frame_common::CamParams &  cam  )  [protected]

Definition at line 390 of file place_database.cpp.

void kidnapped_robot::PlaceDatabase::bindImage ( int  col,
const cv::Mat &  image 
) [protected]

Definition at line 412 of file place_database.cpp.

void kidnapped_robot::PlaceDatabase::bindTransform ( const btTransform &  xfm,
int  param_index 
) [protected]

Definition at line 375 of file place_database.cpp.

template<typename T >
void kidnapped_robot::PlaceDatabase::bindVector ( sqlite3_stmt *  stmt,
int  col,
const std::vector< T > &  vec 
) [inline, protected]

Definition at line 7 of file place_database.cpp.

void kidnapped_robot::PlaceDatabase::checkErr ( int  returned_code,
const char *  msg,
int  expected_code = SQLITE_OK 
) const [protected]

Definition at line 353 of file place_database.cpp.

void kidnapped_robot::PlaceDatabase::extractImage ( cv::Mat &  image,
int  col 
) const [protected]

Definition at line 400 of file place_database.cpp.

void kidnapped_robot::PlaceDatabase::extractTransform ( btTransform &  xfm,
int  start_index 
) const [protected]

Definition at line 362 of file place_database.cpp.

void kidnapped_robot::PlaceDatabase::findInRegion ( cv::Rect_< double >  bounding_box,
std::vector< int64_t > &  ids 
) const

Definition at line 264 of file place_database.cpp.

void kidnapped_robot::PlaceDatabase::findMatching ( const frame_common::Frame &  query_frame,
size_t  N,
vt::Matches &  matches 
) const

Todo:
Copy-pasta from add()

Definition at line 247 of file place_database.cpp.

void kidnapped_robot::PlaceDatabase::getFrame ( int64_t  id,
frame_common::Frame &  frame 
) const

Definition at line 284 of file place_database.cpp.

void kidnapped_robot::PlaceDatabase::getImages ( int64_t  id,
cv::Mat &  left,
cv::Mat &  right 
)

Definition at line 341 of file place_database.cpp.

sqlite3* kidnapped_robot::PlaceDatabase::getSqlite (  )  [inline]

Definition at line 45 of file place_database.h.

void kidnapped_robot::PlaceDatabase::getTransforms ( int64_t  id,
tf::Pose &  pose_in_map,
tf::Transform &  optical_transform 
) const

Definition at line 329 of file place_database.cpp.

void kidnapped_robot::PlaceDatabase::load ( const std::string &  db_file,
const std::string &  tree_file,
const std::string &  weights_file 
)

Definition at line 53 of file place_database.cpp.

void kidnapped_robot::PlaceDatabase::loadDocumentDatabase ( const std::string &  weights_file  )  [protected]

Definition at line 98 of file place_database.cpp.

void kidnapped_robot::PlaceDatabase::loadPersistentDatabase ( const std::string &  db_file  )  [protected]

Todo:
Could use R*Tree module instead

Definition at line 61 of file place_database.cpp.

void kidnapped_robot::PlaceDatabase::prepareReusedStatements (  )  [protected]

Definition at line 123 of file place_database.cpp.


Member Data Documentation

const int64_t kidnapped_robot::PlaceDatabase::AUTO_ID = LONG_MIN [static]

Definition at line 30 of file place_database.h.

Definition at line 17 of file place_database.h.

Definition at line 18 of file place_database.h.

Definition at line 14 of file place_database.h.

Definition at line 12 of file place_database.h.

Definition at line 16 of file place_database.h.

Definition at line 18 of file place_database.h.

Definition at line 17 of file place_database.h.

Definition at line 17 of file place_database.h.

Definition at line 10 of file place_database.h.

sqlite3_stmt * kidnapped_robot::PlaceDatabase::select_frame_stmt_ [mutable, private]

Definition at line 19 of file place_database.h.

sqlite3_stmt * kidnapped_robot::PlaceDatabase::select_images_stmt_ [mutable, private]

Definition at line 19 of file place_database.h.

sqlite3_stmt * kidnapped_robot::PlaceDatabase::select_spatial_stmt_ [mutable, private]

Definition at line 19 of file place_database.h.

Definition at line 19 of file place_database.h.

vt::GenericTree kidnapped_robot::PlaceDatabase::voctree_ [private]

Definition at line 11 of file place_database.h.


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


kidnapped_robot
Author(s): Patrick Mihelich
autogenerated on Fri Jan 11 09:51:23 2013