Doppler velocity log (DVL) sensor, built as a custom rendering sensor to leverage GPU shaders for speed. More...
#include <DopplerVelocityLog.hh>
Public Member Functions | |
DopplerVelocityLog () | |
~DopplerVelocityLog () | |
virtual bool | HasConnections () const override |
Inherits documentation from parent class. | |
virtual bool | Load (const sdf::Sensor &_sdf) override |
Inherits documentation from parent class. | |
virtual bool | Load (sdf::ElementPtr _sdf) override |
Inherits documentation from parent class. | |
virtual void | PostUpdate (const std::chrono::steady_clock::duration &_now) |
Perform any sensor updates after the rendering pass. | |
std::vector< gz::rendering::SensorPtr > | RenderingSensors () const |
Yield rendering sensors that underpin the implementation. | |
void | SetEntity (uint64_t entity) |
Set this sensor's entity ID (for world state lookup). | |
void | SetEnvironmentalData (const EnvironmentalData &_data) |
Set environmental _data to support DVL water-tracking. | |
void | SetScene (gz::rendering::ScenePtr _scene) override |
Inherits documentation from parent class. | |
void | SetWorldState (const WorldState &_state) |
Set world _state to support DVL water and bottom-tracking. | |
virtual bool | Update (const std::chrono::steady_clock::duration &_now) override |
Inherits documentation from parent class. | |
Public Member Functions inherited from RenderingSensor | |
virtual | ~RenderingSensor () |
destructor | |
bool | ManualSceneUpdate () const |
Get whether the scene graph is updated manually. Defaults to false. | |
void | Render () |
Render update. This performs the actual render operation. | |
rendering::ScenePtr | Scene () const |
Get the rendering scene. | |
void | SetManualSceneUpdate (bool _manual) |
Set whether to update the scene graph manually. If set to true, it is expected that rendering::Scene::PreRender is called manually before calling Render() | |
virtual void | SetScene (rendering::ScenePtr _scene) |
Set the rendering scene. | |
Public Member Functions inherited from Sensor | |
virtual | ~Sensor () |
destructor | |
void | AddSequence (gz::msgs::Header *_msg, const std::string &_seqKey="default") |
Add a sequence number to a gz::msgs::Header. This function can be called by a sensor that wants to add a sequence number to a sensor message in order to have improved accountability for generated sensor data. | |
bool | EnableMetrics () const |
Get flag state for enabling performance metrics publication. | |
std::string | FrameId () const |
FrameId. | |
bool | HasPendingTrigger () const |
Whether the sensor has a pending trigger. | |
SensorId | Id () const |
Get the sensor's ID. | |
virtual bool | Init () |
Initialize values in the sensor This will set the next update time to zero. This is particularly useful if simulation time has jumped backward, for example during a seek backward in a log file. | |
bool | IsActive () const |
Get whether the sensor is enabled or not. | |
bool | IsTriggered () const |
Whether the sensor trigger mode is enabled. | |
std::string | Name () const |
Get name. | |
std::chrono::steady_clock::duration | NextDataUpdateTime () const |
Return the next time the sensor will generate data. | |
std::string | Parent () const |
Get parent link of the sensor. | |
gz::math::Pose3d | Pose () const |
Get the current pose. | |
void | PublishMetrics (const std::chrono::duration< double > &_now) |
Publishes information about the performance of the sensor. This method is called by Update(). | |
sdf::ElementPtr | SDF () const |
Get the SDF used to load this sensor. | |
void | SetActive (bool _active) |
Enable or disable the sensor. Disabled sensors will not generate or publish data unless Update is called with the '_force' argument set to true. | |
void | SetEnableMetrics (bool _enableMetrics) |
Set flag to enable publishing performance metrics. | |
void | SetFrameId (const std::string &_frameId) |
Set Frame ID of the sensor. | |
void | SetNextDataUpdateTime (const std::chrono::steady_clock::duration &_time) |
Manually set the next time the sensor will generate data Useful for accomodating jumps backwards in time as well as specifying updates for non-uniformly updating sensors. | |
virtual void | SetParent (const std::string &_parent) |
Set the parent of the sensor. | |
void | SetPose (const gz::math::Pose3d &_pose) |
Update the pose of the sensor. | |
bool | SetTopic (const std::string &_topic) |
Set topic where sensor data is published. | |
bool | SetTriggered (bool _triggered, const std::string &_triggerTopic="") |
Enable or disable triggered mode. In this mode,. | |
void | SetUpdateRate (const double _hz) |
Set the update rate of the sensor. An update rate of zero means that the sensor is updated every cycle. It's zero by default. | |
std::string | Topic () const |
Get topic where sensor data is published. | |
bool | Update (const std::chrono::steady_clock::duration &_now, const bool _force) |
Update the sensor. | |
double | UpdateRate () const |
Get the update rate of the sensor. | |
Additional Inherited Members | |
Protected Member Functions inherited from RenderingSensor | |
RenderingSensor () | |
constructor | |
void | AddSensor (rendering::SensorPtr _sensor) |
Add a rendering::Sensor. Its render updates will be handled by this base class. | |
Protected Member Functions inherited from Sensor | |
Sensor () | |
constructor | |
Detailed Description
Doppler velocity log (DVL) sensor, built as a custom rendering sensor to leverage GPU shaders for speed.
By default, this sensor uses an x-forward, y-left, z-up coordinate frame to report all measurements. All acoustic beams' lobes are expected to face downwards.
/// <sensor type="custom" gz:type="dvl"> /// <gz:dvl> /// <arrangement degrees="true"> /// <beam id="1"> /// <aperture></aperture> /// <rotation></rotation> /// <tilt></tilt> /// </beam> /// </arrangement> /// <tracking> /// <bottom_mode> /// <when></when> /// <noise type="gaussian"> /// <stddev></stddev> /// </noise> /// <visualize></visualize> /// </bottom_mode> /// <water_mass_mode> /// <when></when> /// <water_velocity> /// <x></x> /// <y></y> /// <z></z> /// </water_velocity> /// <boundaries> /// <near>20.</near> /// <far>60.</far> /// </boundaries> /// <bins>10</bins> /// <noise type="gaussian"> /// <stddev></stddev> /// </noise> /// <visualize></visualize> /// </water_mass_mode> /// <minimum_range></minimum_range> /// <maximum_range></maximum_range> /// <resolution></resolution> /// <reference_frame></reference_frame> /// </gz:dvl> /// </sensor> ///
- `<arrangement>` describes the arrangement of acoustic beams in the DVL sensor frame. It may include a `degrees` attribute to signal use of degrees instead of radians for all angles within, defaulting to radians if left unspecified. - `<arrangement><beam>` describes one acoustic beam in the arrangement. May include an `id` attribute, defaulting to the last specified id plus 1 if left unspecified (or 0 if it's the first). - `<arrangement><beam><aperture>` sets the aperture angle for the acoustic beam's main lobe (modelled as a cone). Defaults to 90 degrees if left unspecified. - `<arrangement><beam><rotation>` sets the rotation angle of the acoustic beam's symmetry axis about the sensor frame z axis. Defaults to 0 degrees if left unspecified. - `<arrangement><beam><tilt>` sets the inclination angle of the acoustic beam's symmetry axis w.r.t. the sensor frame -z axis (ie. rotation about the -y axis). Defaults to 0 degrees if left unspecified. - `<arrangement><visualize>` enables visual aids to evaluate acoustic beam arrangements. Beam lobes' are rendered and adjusted in size to match range measurements. - `<tracking>` configures velocity tracking modes for the DVL. - `<tracking><bottom_mode>` configures the bottom tracking mode. - `<tracking><bottom_mode><when>` enables (or disables) the bottom tracking mode. Supported values are 'never', to disable it completely (as if no <bottom_mode> configuration had been specified), 'always' to enable it at all times, and 'best' to track at all times but only publish estimates when it performs best among all configured modes. Defaults to 'always' if left unspecified. - `<tracking><bottom_mode><noise>` sets the noise model for velocity estimates. Only 'gaussian' noise is currently supported. Defaults to none if left unspecified. - `<tracking><bottom_mode><visualize>` enables visual aids to validate bottom tracking. Acoustic beam reflection paths are depicted, where the color scales linearly in hue with measured speed and low opacity sections depict range uncertainty (+/- 2 standard deviations). - `<tracking><water_mass_mode>` configures the water-mass tracking mode. - `<tracking><water_mass_mode><when>` enables (or disables) the water-mass tracking mode. Supported values are 'never', to disable it completely (as if no <water_mass_mode> configuration had been specified), 'always' to enable it at all times, and 'best' to track at all times but only publish estimates when it performs best among all configured modes. Defaults to 'always' if left unspecified. - `<tracking><water_mass_mode><water_velocity>` set the variables in world environmental data to be used to sample water velocity w.r.t. the world frame in each axis. At least one axis must be specified. - `<tracking><water_mass_mode><water_velocity><x>` set the variable in world environmental data to be used to sample water velocity w.r.t. the world frame along the x-axis (that is, towards east). Defaults to none (and thus zero water velocity in this axis) if left unspecified. - `<tracking><water_mass_mode><water_velocity><y>` set the variable in world environmental data to be used to sample water velocity w.r.t. the world frame along the y-axis (that is, towards north). Defaults to none (and thus zero water velocity in this axis) if left unspecified. - `<tracking><water_mass_mode><water_velocity><z>` set the variable in world environmental data to be used to sample water velocity w.r.t. the world frame along the z-axis (that is, upwards). Defaults to none (and thus zero water velocity in this axis) if left unspecified. - `<tracking><water_mass_mode><boundaries>` sets water-mass layer boundaries. These boundaries are planar at given z-offsets in the sensor frame. - `<tracking><water_mass_mode><boundaries><near>` sets the water-mass layer boundary that is the closest to the sensor. - `<tracking><water_mass_mode><boundaries><far>` sets the water-mass layer boundary that is the farthest to the sensor. - `<tracking><water_mass_mode><bins>` sets the number of bins to use for water-mass velocity sampling. Each bin is a slab of water between boundaries. - `<tracking><water_mass_mode><noise>` sets the noise model for velocity estimates. Only 'gaussian' noise is currently supported. Defaults to none if left unspecified. - `<tracking><water_mass_mode><visualize>` enables visual aids to validate bottom tracking. Acoustic beam reflection paths are depicted, where the color scales linearly in hue with measured speed and low opacity sections depict range uncertainty (+/- 2 standard deviations). - `<type>` sets the sensor type, either 'piston' or 'phased_array'. Defaults to unspecified. - `<resolution>` sets the resolution of the beam for bottom tracking at a 1 m distance. Defaults to 1 cm if left unspecified. - `<minimum_range>` sets a lower bound for range measurements. Defaults to 1 cm if left unspecified. - `<maximum_range>` sets an upper bound for range measurements. Defaults to 100 m if left unspecified. - `<reference_frame>` sets a transform from the sensor frame to the reference frame in which all measurements are reported. Defaults to the identity transform. Note the tethys::DopplerVelocityLogSystem plugin must be loaded for these custom sensors to be picked up and setup.
Constructor & Destructor Documentation
◆ DopplerVelocityLog()
◆ ~DopplerVelocityLog()
~DopplerVelocityLog | ( | ) |
Member Function Documentation
◆ HasConnections()
|
overridevirtual |
Inherits documentation from parent class.
Reimplemented from Sensor.
◆ Load() [1/2]
|
overridevirtual |
Inherits documentation from parent class.
Reimplemented from Sensor.
◆ Load() [2/2]
|
overridevirtual |
Inherits documentation from parent class.
Reimplemented from Sensor.
◆ PostUpdate()
|
virtual |
Perform any sensor updates after the rendering pass.
◆ RenderingSensors()
std::vector< gz::rendering::SensorPtr > RenderingSensors | ( | ) | const |
Yield rendering sensors that underpin the implementation.
◆ SetEntity()
void SetEntity | ( | uint64_t | entity | ) |
Set this sensor's entity ID (for world state lookup).
◆ SetEnvironmentalData()
void SetEnvironmentalData | ( | const EnvironmentalData & | _data | ) |
Set environmental _data
to support DVL water-tracking.
◆ SetScene()
|
override |
Inherits documentation from parent class.
◆ SetWorldState()
void SetWorldState | ( | const WorldState & | _state | ) |
Set world _state
to support DVL water and bottom-tracking.
◆ Update()
|
overridevirtual |
Inherits documentation from parent class.
Implements Sensor.
The documentation for this class was generated from the following file: