Sensors

A set of sensor classes, functions, and definitions. More...

Files

file  SensorTypes.hh
 Forward declarations and typedefs for sensors.
 

Namespaces

 gazebo::sensors
 Sensors namespace.
 

Classes

class  AltimeterSensor
 AltimeterSensor to provide vertical position and velocity. More...
 
class  CameraSensor
 Basic camera sensor. More...
 
class  ContactSensor
 Contact sensor. More...
 
class  DepthCameraSensor
 
class  ForceTorqueSensor
 Sensor for measure force and torque on a joint. More...
 
class  GpsSensor
 GpsSensor to provide position measurement. More...
 
class  GpuRaySensor
 GPU based laser sensor. More...
 
class  ImuSensor
 An IMU sensor. More...
 
class  LogicalCameraSensor
 A camera sensor that reports locations of objects instead of rendering a scene. More...
 
class  MagnetometerSensor
 MagnetometerSensor to provide magnetic field measurement. More...
 
class  MultiCameraSensor
 Multiple camera sensor. More...
 
class  Noise
 Noise models for sensor output signals. More...
 
class  NoiseFactory
 Use this noise manager for creating and loading noise models. More...
 
class  RaySensor
 Sensor with one or more rays. More...
 
class  RFIDSensor
 Sensor class for RFID type of sensor. More...
 
class  RFIDTag
 RFIDTag to interact with RFIDTagSensors. More...
 
class  Sensor
 Base class for sensors. More...
 
class  SensorFactor
 The sensor factory; the class is just for namespacing purposes. More...
 
class  SensorFactory
 
class  SensorManager
 Class to manage and update all sensors. More...
 
class  SonarSensor
 Sensor with sonar cone. More...
 
class  WideAngleCameraSensor
 Camera sensor with variable mapping function. More...
 
class  WirelessReceiver
 Sensor class for receiving wireless signals. More...
 
class  WirelessTransceiver
 Sensor class for receiving wireless signals. More...
 
class  WirelessTransmitter
 Transmitter to send wireless signals. More...
 

Macros

#define GZ_REGISTER_STATIC_SENSOR(name, classname)
 Static sensor registration macro. More...
 

Functions

std::string create_sensor (sdf::ElementPtr _elem, const std::string &_worldName, const std::string &_parentName, uint32_t _parentId)
 Create a sensor using SDF. More...
 
void disable ()
 Disable sensors. More...
 
void enable ()
 Enable sensors. More...
 
bool fini ()
 shutdown the sensor generation loop. More...
 
SensorPtr get_sensor (const std::string &_name)
 Get a sensor using by name. More...
 
bool init ()
 initialize the sensor generation loop. More...
 
bool load ()
 Load the sensor library. More...
 
void remove_sensor (const std::string &_sensorName)
 Remove a sensor by name. More...
 
bool remove_sensors ()
 Remove all sensors. More...
 
void run_once (bool _force=false)
 Run the sensor generation one step. More...
 
void run_threads ()
 Run sensors in a threads. This is a non-blocking call. More...
 
GAZEBO_VISIBLE bool running ()
 Return true if the manager is running. More...
 
void stop ()
 Stop the sensor generation loop. More...
 

Detailed Description

A set of sensor classes, functions, and definitions.

Depth camera sensor This sensor is used for simulating standard monocular cameras

Macro Definition Documentation

◆ 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
nameSensor type name, as it appears in the world file.
classnameC++ class name for the sensor.

Function Documentation

◆ create_sensor()

std::string gazebo::sensors::create_sensor ( sdf::ElementPtr  _elem,
const std::string &  _worldName,
const std::string &  _parentName,
uint32_t  _parentId 
)

Create a sensor using SDF.

Parameters
[in]_elemThe SDF element that describes the sensor.
[in]_worldNameName of the world in which to create the sensor.
[in]_parentNameThe fully scoped parent name (model::link).
Returns
The name of the new sensor.

◆ disable()

void gazebo::sensors::disable ( )

Disable sensors.

◆ enable()

void gazebo::sensors::enable ( )

Enable sensors.

◆ fini()

bool gazebo::sensors::fini ( )

shutdown the sensor generation loop.

Returns
True if successfully finalized, false if not

◆ get_sensor()

SensorPtr gazebo::sensors::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]_nameName 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()

bool gazebo::sensors::init ( )

initialize the sensor generation loop.

Returns
True if successfully initialized, false if not

◆ load()

bool gazebo::sensors::load ( )

Load the sensor library.

Returns
True if successfully loaded, false if not.

◆ remove_sensor()

void gazebo::sensors::remove_sensor ( const std::string &  _sensorName)

Remove a sensor by name.

Parameters
[in]_sensorNameName of sensor to remove

◆ remove_sensors()

bool gazebo::sensors::remove_sensors ( )

Remove all sensors.

Returns
True if all successfully removed, false if not

◆ run_once()

void gazebo::sensors::run_once ( bool  _force = false)

Run the sensor generation one step.

Parameters
_forceIf true, all sensors are forced to update. Otherwise a sensor will update based on it's Hz rate.

◆ run_threads()

void gazebo::sensors::run_threads ( )

Run sensors in a threads. This is a non-blocking call.

◆ running()

GAZEBO_VISIBLE bool gazebo::sensors::running ( )

Return true if the manager is running.

Returns
True if manager is running.

◆ stop()

void gazebo::sensors::stop ( )

Stop the sensor generation loop.