Tesseract
Motion Planning Environment
Loading...
Searching...
No Matches
entity_manager.h
Go to the documentation of this file.
1
26#ifndef TESSERACT_VISUALIZATION_IGNITION_ENTITY_MANAGER_H
27#define TESSERACT_VISUALIZATION_IGNITION_ENTITY_MANAGER_H
28
31#include <string>
32#include <unordered_map>
34
36{
37static const int NULL_ENTITY_ID = -1;
38using EntityID = int;
39using EntityMap = std::unordered_map<std::string, EntityID>;
40
42{
43public:
49 EntityID addModel(const std::string& name);
50
56 EntityID getModel(const std::string& name) const;
57
62 const EntityMap& getModels() const;
63
69 EntityID addLink(const std::string& name);
70
76 EntityID getLink(const std::string& name) const;
77
82 const EntityMap& getLinks() const;
83
89 EntityID addVisual(const std::string& name);
90
96 EntityID getVisual(const std::string& name) const;
97
102 const EntityMap& getVisuals() const;
103
109 EntityID addSensor(const std::string& name);
110
116 EntityID getSensor(const std::string& name) const;
117
122 const EntityMap& getSensors() const;
123
125 bool empty() const;
126
128 void clear();
129
130private:
136};
137} // namespace tesseract_visualization
138
139#endif // TESSERACT_VISUALIZATION_IGNITION_ENTITY_MANAGER_H
Definition: entity_manager.h:42
EntityID getVisual(const std::string &name) const
Given the visual name return the ID.
Definition: entity_manager.cpp:70
const EntityMap & getLinks() const
Get all links being managed.
Definition: entity_manager.cpp:62
const EntityMap & getModels() const
Get all models being managed.
Definition: entity_manager.cpp:45
EntityID addLink(const std::string &name)
Add link name to manager and return id for link.
Definition: entity_manager.cpp:47
EntityID getLink(const std::string &name) const
Given the link name return the ID.
Definition: entity_manager.cpp:53
bool empty() const
Check if empty.
Definition: entity_manager.cpp:98
EntityID getSensor(const std::string &name) const
Given the sensor name return the ID.
Definition: entity_manager.cpp:87
EntityMap link_id_map_
Definition: entity_manager.h:131
const EntityMap & getSensors() const
Get all sensors being managed.
Definition: entity_manager.cpp:96
EntityID getModel(const std::string &name) const
Given the model name return the ID.
Definition: entity_manager.cpp:36
EntityID entity_counter_
Definition: entity_manager.h:135
const EntityMap & getVisuals() const
Get all visuals being managed.
Definition: entity_manager.cpp:79
void clear()
Clear interanl data.
Definition: entity_manager.cpp:100
EntityMap model_id_map_
Definition: entity_manager.h:132
EntityMap visual_id_map_
Definition: entity_manager.h:133
EntityID addModel(const std::string &name)
Add model name to manager and return id for model.
Definition: entity_manager.cpp:30
EntityID addVisual(const std::string &name)
Add visual name to manager and return id for visual.
Definition: entity_manager.cpp:64
EntityMap sensor_id_map_
Definition: entity_manager.h:134
EntityID addSensor(const std::string &name)
Add sensor name to manager and return id for sensor.
Definition: entity_manager.cpp:81
Common Tesseract Macros.
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
Definition: macros.h:71
Definition: create_convex_hull.cpp:36
Definition: conversions.h:39
static const int NULL_ENTITY_ID
Definition: entity_manager.h:37
int EntityID
Definition: entity_manager.h:38
std::unordered_map< std::string, EntityID > EntityMap
Definition: entity_manager.h:39