Class to manage and update all sensors. More...
#include <sensors/sensors.hh>
Public Member Functions | |
std::string | CreateSensor (sdf::ElementPtr _elem, const std::string &_worldName, const std::string &_parentName) GAZEBO_DEPRECATED(2.0) |
Deprecated. More... | |
std::string | CreateSensor (sdf::ElementPtr _elem, const std::string &_worldName, const std::string &_parentName, uint32_t _parentId) |
Add a sensor from an SDF element. More... | |
void | Fini () |
Finalize all the sensors. More... | |
SensorPtr | GetSensor (const std::string &_name) const |
Get a sensor. More... | |
Sensor_V | GetSensors () const |
Get all the sensors. More... | |
void | GetSensorTypes (std::vector< std::string > &_types) const |
Get all the sensor types. More... | |
void | Init () |
Init all the sensors. More... | |
void | RemoveSensor (const std::string &_name) |
Remove a sensor. More... | |
void | RemoveSensors () |
Remove all sensors. More... | |
void | ResetLastUpdateTimes () |
Reset last update times in all sensors. More... | |
void | RunThreads () |
Run sensor updates in separate threads. More... | |
bool | SensorsInitialized () |
True if SensorManager::initSensors queue is empty i.e. More... | |
void | Stop () |
Stop the run thread. More... | |
void | Update (bool _force=false) |
Update all the sensors. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from SingletonT< T > | |
static T * | Instance () |
Get an instance of the singleton. More... | |
Protected Member Functions inherited from SingletonT< T > | |
SingletonT () | |
Constructor. More... | |
virtual | ~SingletonT () |
Destructor. More... | |
Class to manage and update all sensors.
std::string gazebo::sensors::SensorManager::CreateSensor | ( | sdf::ElementPtr | _elem, |
const std::string & | _worldName, | ||
const std::string & | _parentName | ||
) |
Deprecated.
std::string gazebo::sensors::SensorManager::CreateSensor | ( | sdf::ElementPtr | _elem, |
const std::string & | _worldName, | ||
const std::string & | _parentName, | ||
uint32_t | _parentId | ||
) |
Add a sensor from an SDF element.
This function will also Load and Init the sensor.
[in] | _elem | The SDF element that describes the sensor |
[in] | _worldName | Name of the world in which to create the sensor |
[in] | _parentName | The name of the parent link which the sensor is attached to. |
void gazebo::sensors::SensorManager::Fini | ( | ) |
Finalize all the sensors.
SensorPtr gazebo::sensors::SensorManager::GetSensor | ( | const std::string & | _name | ) | const |
Get a sensor.
[in] | _name | The name of a sensor to find. |
Sensor_V gazebo::sensors::SensorManager::GetSensors | ( | ) | const |
Get all the sensors.
void gazebo::sensors::SensorManager::GetSensorTypes | ( | std::vector< std::string > & | _types | ) | const |
Get all the sensor types.
[out] | All | the sensor types. |
void gazebo::sensors::SensorManager::Init | ( | ) |
Init all the sensors.
void gazebo::sensors::SensorManager::RemoveSensor | ( | const std::string & | _name | ) |
Remove a sensor.
[in] | _name | The name of the sensor to remove. |
void gazebo::sensors::SensorManager::RemoveSensors | ( | ) |
Remove all sensors.
void gazebo::sensors::SensorManager::ResetLastUpdateTimes | ( | ) |
Reset last update times in all sensors.
void gazebo::sensors::SensorManager::RunThreads | ( | ) |
Run sensor updates in separate threads.
This will only run non-image based sensor updates.
bool gazebo::sensors::SensorManager::SensorsInitialized | ( | ) |
True if SensorManager::initSensors queue is empty i.e.
all sensors managed by SensorManager have been initialized
void gazebo::sensors::SensorManager::Stop | ( | ) |
Stop the run thread.
void gazebo::sensors::SensorManager::Update | ( | bool | _force = false | ) |
Update all the sensors.
Checks to see if any sensor need to be initialized first, then updates all sensors once.
[in] | _force | True force update, false if not |