Class to manage fcl::Shapes and connect with RVIZ marker type. More...
#include <shapes_manager.hpp>
Public Types | |
typedef std::unordered_map < std::string, PtrIMarkerShape_t > ::const_iterator | MapConstIter_t |
typedef std::unordered_map < std::string, PtrIMarkerShape_t >::iterator | MapIter_t |
Public Member Functions | |
void | addShape (const std::string &id, PtrIMarkerShape_t s) |
MapIter_t | begin () |
MapConstIter_t | begin () const |
void | clear () |
uint32_t | count () const |
uint32_t | count (const std::string &id) const |
void | draw () |
MapIter_t | end () |
MapConstIter_t | end () const |
bool | getShape (const std::string &id, PtrIMarkerShape_t &s) |
void | removeShape (const std::string &id) |
ShapesManager (const ros::Publisher &pub) | |
~ShapesManager () | |
Private Attributes | |
const ros::Publisher & | pub_ |
std::unordered_map < std::string, PtrIMarkerShape_t > | shapes_ |
Class to manage fcl::Shapes and connect with RVIZ marker type.
Definition at line 28 of file shapes_manager.hpp.
typedef std::unordered_map<std::string, PtrIMarkerShape_t>::const_iterator ShapesManager::MapConstIter_t |
Definition at line 36 of file shapes_manager.hpp.
typedef std::unordered_map<std::string, PtrIMarkerShape_t>::iterator ShapesManager::MapIter_t |
Definition at line 35 of file shapes_manager.hpp.
ShapesManager::ShapesManager | ( | const ros::Publisher & | pub | ) |
Ctor
pub | Publisher on a marker topic (visualize marker in RVIZ). |
Definition at line 21 of file shapes_manager.cpp.
Definition at line 26 of file shapes_manager.cpp.
void ShapesManager::addShape | ( | const std::string & | id, |
PtrIMarkerShape_t | s | ||
) |
Adds a new shape to the manager.
id | Key to access the marker shape. |
s | Pointer to an already created marker shape. |
Definition at line 32 of file shapes_manager.cpp.
MapIter_t ShapesManager::begin | ( | ) | [inline] |
Definition at line 92 of file shapes_manager.hpp.
MapConstIter_t ShapesManager::begin | ( | ) | const [inline] |
Definition at line 93 of file shapes_manager.hpp.
void ShapesManager::clear | ( | ) |
Clear the managed shapes.
Definition at line 83 of file shapes_manager.cpp.
uint32_t ShapesManager::count | ( | ) | const |
Number of elements in map.
Definition at line 89 of file shapes_manager.cpp.
uint32_t ShapesManager::count | ( | const std::string & | id | ) | const |
Number of elements with the given id in map.
Definition at line 95 of file shapes_manager.cpp.
void ShapesManager::draw | ( | ) |
Draw the marker managed by the ShapesManager
Definition at line 65 of file shapes_manager.cpp.
MapIter_t ShapesManager::end | ( | ) | [inline] |
Definition at line 94 of file shapes_manager.hpp.
MapConstIter_t ShapesManager::end | ( | ) | const [inline] |
Definition at line 95 of file shapes_manager.hpp.
bool ShapesManager::getShape | ( | const std::string & | id, |
PtrIMarkerShape_t & | s | ||
) |
Tries to return the marker shape if ID is correct.
id | Key to access the marker shape. |
s | Pointer to an already created marker shape. |
Definition at line 52 of file shapes_manager.cpp.
void ShapesManager::removeShape | ( | const std::string & | id | ) |
Removes a shape from the manager.
id | Key to access the marker shape. |
Definition at line 38 of file shapes_manager.cpp.
const ros::Publisher& ShapesManager::pub_ [private] |
Definition at line 32 of file shapes_manager.hpp.
std::unordered_map<std::string, PtrIMarkerShape_t> ShapesManager::shapes_ [private] |
Definition at line 31 of file shapes_manager.hpp.