22#include <gz/math/Pose3.hh>
23#include <gz/utils/ImplPtr.hh>
34 inline namespace SDF_VERSION_NAMESPACE {
47 struct PoseRelativeToGraph;
48 template <
typename T>
class ScopedGraph;
156 public: std::string
Name()
const;
161 public:
void SetName(
const std::string &_name);
184 public:
const gz::math::Pose3d &
RawPose()
const;
243 public:
bool SetType(
const std::string &_typeStr);
455 private:
void SetXmlParentName(
const std::string &_xmlParentName);
461 private:
void SetPoseRelativeToGraph(
474 GZ_UTILS_IMPL_PTR(dataPtr)
AirPressure contains information about a general purpose fluid pressure sensor.
Definition: AirPressure.hh:35
AirSpeed contains information about a general purpose air speed sensor.
Definition: AirSpeed.hh:35
Altimeter contains information about an altimeter sensor.
Definition: Altimeter.hh:34
Information about a monocular camera sensor.
Definition: Camera.hh:61
ForceTorque contains information about a force torque sensor.
Definition: ForceTorque.hh:65
Imu contains information about an imu sensor.
Definition: Imu.hh:34
Lidar contains information about a Lidar sensor.
Definition: Lidar.hh:106
Magnetometer contains information about a magnetometer sensor.
Definition: Magnetometer.hh:35
NavSat contains information about a NavSat sensor.
Definition: NavSat.hh:76
Definition: Collision.hh:43
SemanticPose is a data structure that can be used by different DOM objects to resolve poses on a Pose...
Definition: SemanticPose.hh:55
Information about an SDF sensor.
Definition: Sensor.hh:141
const gz::math::Pose3d & RawPose() const
Get the pose of the sensor.
void SetImuSensor(const Imu &_imu)
Set the IMU sensor.
void SetMagnetometerSensor(const Magnetometer &_mag)
Set the magnetometer sensor.
sdf::Plugins & Plugins()
Get a mutable vector of plugins attached to this object.
AirPressure * AirPressureSensor()
Get a mutable air pressure sensor, or nullptr if this sensor type is not an AirPressure sensor.
Altimeter * AltimeterSensor()
Get a mutable altimeter sensor, or nullptr if this sensor type is not an Altimeter.
void SetName(const std::string &_name)
Set the name of the sensor.
ForceTorque * ForceTorqueSensor()
Get a mutable force torque sensor, or nullptr if the sensor does not contain a force torque sensor.
bool operator!=(const Sensor &_sensor) const
Return true this Sensor object does not contain the same values as the passed in parameter.
void SetEnableMetrics(bool _enableMetrics)
Set flag to enable publishing performance metrics.
const ForceTorque * ForceTorqueSensor() const
Get a pointer to a force torque sensor, or nullptr if the sensor does not contain a force torque sens...
void SetPoseRelativeTo(const std::string &_frame)
Set the name of the coordinate frame relative to which this object's pose is expressed.
Magnetometer * MagnetometerSensor()
Get a mutable magnetometer sensor, or nullptr if this sensor type is not a Magnetometer.
const AirPressure * AirPressureSensor() const
Get the air pressure sensor, or nullptr if this sensor type is not an AirPressure sensor.
sdf::ElementPtr Element() const
Get a pointer to the SDF element that was used during load.
bool operator==(const Sensor &_sensor) const
Return true if both Sensor objects contain the same values.
void SetAirPressureSensor(const AirPressure &_air)
Set the air pressure sensor.
void SetNavSatSensor(const NavSat &_navsat)
Set the NAVSAT sensor.
const NavSat * NavSatSensor() const
Get a pointer to a NAVSAT sensor, or nullptr if the sensor does not contain an NAVSAT sensor.
const AirSpeed * AirSpeedSensor() const
Get the air speed sensor, or nullptr if this sensor type is not an AirSpeed sensor.
const Imu * ImuSensor() const
Get a pointer to an IMU sensor, or nullptr if the sensor does not contain an IMU sensor.
const Altimeter * AltimeterSensor() const
Get the altimeter sensor, or nullptr if this sensor type is not an Altimeter.
void SetAirSpeedSensor(const AirSpeed &_air)
Set the air pressure sensor.
void SetCameraSensor(const Camera &_cam)
Set the camera sensor.
bool EnableMetrics() const
Get flag state for enabling performance metrics publication.
void AddPlugin(const Plugin &_plugin)
Add a plugin to this object.
const Lidar * LidarSensor() const
Get the lidar sensor, or nullptr if this sensor type is not a Lidar.
void SetRawPose(const gz::math::Pose3d &_pose)
Set the pose of the sensor.
std::string Name() const
Get the name of the sensor.
Camera * CameraSensor()
Get a mutable camera sensor, or nullptr if the sensor does not contain a camera sensor.
void SetForceTorqueSensor(const ForceTorque &_ft)
Set the force torque sensor.
const std::string & PoseRelativeTo() const
Get the name of the coordinate frame relative to which this object's pose is expressed.
std::string TypeStr() const
Get the sensor type as a string.
sdf::ElementPtr ToElement(sdf::Errors &_errors) const
Create and return an SDF element filled with data from this sensor.
void SetTopic(const std::string &_topic)
Set the topic on which sensor data should be published.
void SetType(const SensorType _type)
Set the sensor type.
std::string Topic() const
Get the topic on which sensor data should be published.
const sdf::Plugins & Plugins() const
Get the plugins attached to this object.
void SetAltimeterSensor(const Altimeter &_alt)
Set the altimeter sensor.
Lidar * LidarSensor()
Get a mutable lidar sensor, or nullptr if this sensor type is not a Lidar.
void SetUpdateRate(double _hz)
Set the update rate.
NavSat * NavSatSensor()
Get a mutable NAVSAT sensor, or nullptr if the sensor does not contain an NAVSAT sensor.
void SetLidarSensor(const Lidar &_lidar)
Set the lidar sensor.
Errors Load(ElementPtr _sdf)
Load the sensor based on a element pointer.
sdf::ElementPtr ToElement() const
Create and return an SDF element filled with data from this sensor.
AirSpeed * AirSpeedSensor()
Get a mutable air speed sensor, or nullptr if this sensor type is not an AirSpeed sensor.
Imu * ImuSensor()
Get a mutable IMU sensor, or nullptr if the sensor does not contain an IMU sensor.
SensorType Type() const
Get the sensor type.
const Magnetometer * MagnetometerSensor() const
Get the magnetometer sensor, or nullptr if this sensor type is not a Magnetometer.
const Camera * CameraSensor() const
Get a pointer to a camera sensor, or nullptr if the sensor does not contain a camera sensor.
double UpdateRate() const
Get the update rate in Hz.
bool SetType(const std::string &_typeStr)
Set the sensor type from a string.
Sensor()
Default constructor.
sdf::SemanticPose SemanticPose() const
Get SemanticPose object of this object to aid in resolving poses.
void ClearPlugins()
Remove all plugins.
std::vector< Plugin > Plugins
A vector of Plugin.
Definition: Plugin.hh:245
SensorType
The set of sensor types.
Definition: Sensor.hh:55
@ AIR_SPEED
An air speed sensor.
@ ALTIMETER
An altimeter sensor.
@ SONAR
A sonar tag sensor.
@ WIRELESS_TRANSMITTER
A wireless transmitter.
@ GPU_LIDAR
A GPU based lidar sensor.
@ NAVSAT
A NavSat sensor, such as GPS.
@ LOGICAL_CAMERA
A logical camera sensor.
@ WIRELESS_RECEIVER
A wireless receiver.
@ AIR_PRESSURE
An air pressure sensor.
@ THERMAL_CAMERA
A thermal camera sensor.
@ BOUNDINGBOX_CAMERA
A boundingbox camera sensor.
@ WIDE_ANGLE_CAMERA
A wide angle camera sensor.
@ RGBD_CAMERA
An RGBD sensor, which produces both a color image and a depth image.
@ SEGMENTATION_CAMERA
A segmentation camera sensor.
@ FORCE_TORQUE
A force-torque sensor.
@ NONE
An unspecified sensor type.
@ CONTACT
A contact sensor.
@ MULTICAMERA
A multicamera sensor.
@ MAGNETOMETER
A magnetometer sensor.
@ LIDAR
A CPU based lidar sensor.
@ CAMERA
A monocular camera sensor.
@ DEPTH_CAMERA
A depth camera sensor.
std::vector< Error > Errors
A vector of Error.
Definition: Types.hh:95
std::shared_ptr< Element > ElementPtr
Definition: Element.hh:55
namespace for Simulation Description Format parser
Definition: Actor.hh:35
#define SDFORMAT_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system_util.hh:25