Public Member Functions | Private Attributes | List of all members
tesseract_visualization::EntityManager Class Reference

#include <entity_manager.h>

Public Member Functions

EntityID addLink (const std::string &name)
 Add link name to manager and return id for link. More...
 
EntityID addModel (const std::string &name)
 Add model name to manager and return id for model. More...
 
EntityID addSensor (const std::string &name)
 Add sensor name to manager and return id for sensor. More...
 
EntityID addVisual (const std::string &name)
 Add visual name to manager and return id for visual. More...
 
void clear ()
 Clear interanl data. More...
 
bool empty () const
 Check if empty. More...
 
EntityID getLink (const std::string &name) const
 Given the link name return the ID. More...
 
const EntityMapgetLinks () const
 Get all links being managed. More...
 
EntityID getModel (const std::string &name) const
 Given the model name return the ID. More...
 
const EntityMapgetModels () const
 Get all models being managed. More...
 
EntityID getSensor (const std::string &name) const
 Given the sensor name return the ID. More...
 
const EntityMapgetSensors () const
 Get all sensors being managed. More...
 
EntityID getVisual (const std::string &name) const
 Given the visual name return the ID. More...
 
const EntityMapgetVisuals () const
 Get all visuals being managed. More...
 

Private Attributes

EntityID entity_counter_ { 1000 }
 
EntityMap link_id_map_
 
EntityMap model_id_map_
 
EntityMap sensor_id_map_
 
EntityMap visual_id_map_
 

Detailed Description

Definition at line 41 of file entity_manager.h.

Member Function Documentation

◆ addLink()

EntityID tesseract_visualization::EntityManager::addLink ( const std::string &  name)

Add link name to manager and return id for link.

Parameters
nameName given to the link
Returns
The Entity ID

Definition at line 47 of file entity_manager.cpp.

◆ addModel()

EntityID tesseract_visualization::EntityManager::addModel ( const std::string &  name)

Add model name to manager and return id for model.

Parameters
nameName given to the model
Returns
The Entity ID

Definition at line 30 of file entity_manager.cpp.

◆ addSensor()

EntityID tesseract_visualization::EntityManager::addSensor ( const std::string &  name)

Add sensor name to manager and return id for sensor.

Parameters
nameName given to the sensor
Returns
The Entity ID

Definition at line 81 of file entity_manager.cpp.

◆ addVisual()

EntityID tesseract_visualization::EntityManager::addVisual ( const std::string &  name)

Add visual name to manager and return id for visual.

Parameters
nameName given to the visual
Returns
The Entity ID

Definition at line 64 of file entity_manager.cpp.

◆ clear()

void tesseract_visualization::EntityManager::clear ( )

Clear interanl data.

Definition at line 100 of file entity_manager.cpp.

◆ empty()

bool tesseract_visualization::EntityManager::empty ( ) const

Check if empty.

Definition at line 98 of file entity_manager.cpp.

◆ getLink()

EntityID tesseract_visualization::EntityManager::getLink ( const std::string &  name) const

Given the link name return the ID.

Parameters
nameName of the link
Returns
The ID of the link (if < 1000 it was not found)

Definition at line 53 of file entity_manager.cpp.

◆ getLinks()

const EntityMap & tesseract_visualization::EntityManager::getLinks ( ) const

Get all links being managed.

Returns
A map of names to entity id's

Definition at line 62 of file entity_manager.cpp.

◆ getModel()

EntityID tesseract_visualization::EntityManager::getModel ( const std::string &  name) const

Given the model name return the ID.

Parameters
nameName of the model
Returns
The ID of the model (if < 1000 it was not found)

Definition at line 36 of file entity_manager.cpp.

◆ getModels()

const EntityMap & tesseract_visualization::EntityManager::getModels ( ) const

Get all models being managed.

Returns
A map of names to entity id's

Definition at line 45 of file entity_manager.cpp.

◆ getSensor()

EntityID tesseract_visualization::EntityManager::getSensor ( const std::string &  name) const

Given the sensor name return the ID.

Parameters
nameName of the sensor
Returns
The ID of the visual (if < 1000 it was not found)

Definition at line 87 of file entity_manager.cpp.

◆ getSensors()

const EntityMap & tesseract_visualization::EntityManager::getSensors ( ) const

Get all sensors being managed.

Returns
A map of names to entity id's

Definition at line 96 of file entity_manager.cpp.

◆ getVisual()

EntityID tesseract_visualization::EntityManager::getVisual ( const std::string &  name) const

Given the visual name return the ID.

Parameters
nameName of the visual
Returns
The ID of the visual (if < 1000 it was not found)

Definition at line 70 of file entity_manager.cpp.

◆ getVisuals()

const EntityMap & tesseract_visualization::EntityManager::getVisuals ( ) const

Get all visuals being managed.

Returns
A map of names to entity id's

Definition at line 79 of file entity_manager.cpp.

Member Data Documentation

◆ entity_counter_

EntityID tesseract_visualization::EntityManager::entity_counter_ { 1000 }
private

Start entity counter to avoid clashing with gazebo

Definition at line 135 of file entity_manager.h.

◆ link_id_map_

EntityMap tesseract_visualization::EntityManager::link_id_map_
private

Stores entity id for each link

Definition at line 131 of file entity_manager.h.

◆ model_id_map_

EntityMap tesseract_visualization::EntityManager::model_id_map_
private

Stores entity id for each model

Definition at line 132 of file entity_manager.h.

◆ sensor_id_map_

EntityMap tesseract_visualization::EntityManager::sensor_id_map_
private

Stores entity id for each sensor

Definition at line 134 of file entity_manager.h.

◆ visual_id_map_

EntityMap tesseract_visualization::EntityManager::visual_id_map_
private

Stores entity id for each visual

Definition at line 133 of file entity_manager.h.


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


tesseract_visualization
Author(s): Levi Armstrong
autogenerated on Sun May 18 2025 03:02:27