|
| std::string | create_sensor (sdf::ElementPtr _elem, const std::string &_worldName, const std::string &_parentName, uint32_t _parentId) |
| | Create a sensor using SDF.
|
| void | disable () |
| | Disable sensors.
|
| void | enable () |
| | Enable sensors.
|
| bool | fini () |
| | shutdown the sensor generation loop.
|
| SensorPtr | get_sensor (const std::string &_name) |
| | Get a sensor using by name.
|
| bool | init () |
| | initialize the sensor generation loop.
|
| bool | load () |
| | Load the sensor library.
|
| void | remove_sensor (const std::string &_sensorName) |
| | Remove a sensor by name.
|
| bool | remove_sensors () |
| | Remove all sensors.
|
| void | run_once (bool _force=false) |
| | Run the sensor generation one step.
|
| void | run_threads () |
| | Run sensors in a threads. This is a non-blocking call.
|
| GAZEBO_VISIBLE bool | running () |
| | Return true if the manager is running.
|
| void | stop () |
| | Stop the sensor generation loop.
|
A set of sensor classes, functions, and definitions
A set of sensor classes, functions, and definitions
Depth camera sensor This sensor is used for simulating standard monocular cameras
◆ GZ_REGISTER_STATIC_SENSOR
| #define GZ_REGISTER_STATIC_SENSOR |
( |
| name, |
|
|
| classname ) |
Value: Sensor *New##classname() \
{ \
return new gazebo::sensors::classname(); \
} \
\
void Register##classname() \
{\
SensorFactory::RegisterSensor(name, New##classname);\
}
Static sensor registration macro.
Use this macro to register sensors with the server.
- Parameters
-
| name | Sensor type name, as it appears in the world file. |
| classname | C++ class name for the sensor. |
◆ create_sensor()
| std::string create_sensor |
( |
sdf::ElementPtr | _elem, |
|
|
const std::string & | _worldName, |
|
|
const std::string & | _parentName, |
|
|
uint32_t | _parentId ) |
Create a sensor using SDF.
- Parameters
-
| [in] | _elem | The SDF element that describes the sensor. |
| [in] | _worldName | Name of the world in which to create the sensor. |
| [in] | _parentName | The fully scoped parent name (model::link). |
- Returns
- The name of the new sensor.
◆ disable()
◆ enable()
◆ fini()
shutdown the sensor generation loop.
- Returns
- True if successfully finalized, false if not
◆ get_sensor()
| SensorPtr get_sensor |
( |
const std::string & | _name | ) |
|
Get a sensor using by name.
The given name should have: world_name::model_name::link_name::sensor_name
- Parameters
-
| [in] | _name | Name of the sensor. This name should be fully scoped. This means _name = world_name::model_name::link_name::sensor_name. You may use the unscoped sensor name if that name is unique within the entire simulation. If the name is not unique a nullptr pointer is returned. |
- Returns
- Pointer to the sensor, nullptr if the sensor could not be found.
◆ init()
initialize the sensor generation loop.
- Returns
- True if successfully initialized, false if not
◆ load()
Load the sensor library.
- Returns
- True if successfully loaded, false if not.
◆ remove_sensor()
| void remove_sensor |
( |
const std::string & | _sensorName | ) |
|
Remove a sensor by name.
- Parameters
-
| [in] | _sensorName | Name of sensor to remove |
◆ remove_sensors()
Remove all sensors.
- Returns
- True if all successfully removed, false if not
◆ run_once()
| void run_once |
( |
bool | _force = false | ) |
|
Run the sensor generation one step.
- Parameters
-
| _force | If true, all sensors are forced to update. Otherwise a sensor will update based on it's Hz rate. |
◆ run_threads()
Run sensors in a threads. This is a non-blocking call.
◆ running()
Return true if the manager is running.
- Returns
- True if manager is running.
◆ stop()