Public Types | Public Member Functions | Private Attributes
ShapesManager Class Reference

Class to manage fcl::Shapes and connect with RVIZ marker type. More...

#include <shapes_manager.hpp>

List of all members.

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::Publisherpub_
std::unordered_map
< std::string,
PtrIMarkerShape_t
shapes_

Detailed Description

Class to manage fcl::Shapes and connect with RVIZ marker type.

Definition at line 28 of file shapes_manager.hpp.


Member Typedef Documentation

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.


Constructor & Destructor Documentation

Ctor

Parameters:
pubPublisher 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.


Member Function Documentation

void ShapesManager::addShape ( const std::string &  id,
PtrIMarkerShape_t  s 
)

Adds a new shape to the manager.

Parameters:
idKey to access the marker shape.
sPointer to an already created marker shape.

Definition at line 32 of file shapes_manager.cpp.

Definition at line 92 of file shapes_manager.hpp.

Definition at line 93 of file shapes_manager.hpp.

Clear the managed shapes.

Definition at line 83 of file shapes_manager.cpp.

uint32_t ShapesManager::count ( ) const

Number of elements in map.

Returns:
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.

Returns:
Number of elements in map.

Definition at line 95 of file shapes_manager.cpp.

Draw the marker managed by the ShapesManager

Definition at line 65 of file shapes_manager.cpp.

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.

Parameters:
idKey to access the marker shape.
sPointer to an already created marker shape.
Returns:
State of success.

Definition at line 52 of file shapes_manager.cpp.

void ShapesManager::removeShape ( const std::string &  id)

Removes a shape from the manager.

Parameters:
idKey to access the marker shape.

Definition at line 38 of file shapes_manager.cpp.


Member Data Documentation

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.


The documentation for this class was generated from the following files:


cob_obstacle_distance
Author(s): Marco Bezzon
autogenerated on Thu Jun 6 2019 21:19:14