Loading...
Searching...
No Matches
Public Member Functions | List of all members
sdf::SDF_VERSION_NAMESPACE::Lidar Class Reference

Lidar contains information about a Lidar sensor. More...

#include <Lidar.hh>

Public Member Functions

 Lidar ()
 Default constructor.
 
sdf::ElementPtr Element () const
 Get a pointer to the SDF element that was used during load.
 
gz::math::Angle HorizontalScanMaxAngle () const
 Get the maximum angle for horizontal scan.
 
gz::math::Angle HorizontalScanMinAngle () const
 Get the minimum angle for horizontal scan.
 
double HorizontalScanResolution () const
 Get the resolution for horizontal scan.
 
unsigned int HorizontalScanSamples () const
 Get the number of lidar rays horizontally to generate per laser sweep.
 
const NoiseLidarNoise () const
 Get the noise values for the lidar sensor.
 
Errors Load (ElementPtr _sdf)
 Load the lidar based on an element pointer.
 
bool operator!= (const Lidar &_lidar) const
 Return true this Lidar object does not contain the same values as the passed in parameter.
 
bool operator== (const Lidar &_lidar) const
 Return true if both Lidar objects contain the same values.
 
double RangeMax () const
 Get maximum distance for each lidar ray.
 
double RangeMin () const
 Get minimum distance for each lidar ray.
 
double RangeResolution () const
 Get linear resolution of each lidar ray.
 
void SetHorizontalScanMaxAngle (const gz::math::Angle &_max)
 Set the maximum angle for horizontal scan.
 
void SetHorizontalScanMinAngle (const gz::math::Angle &_min)
 Set the minimum angle for horizontal scan.
 
void SetHorizontalScanResolution (double _res)
 Set the resolution for horizontal scan.
 
void SetHorizontalScanSamples (unsigned int _samples)
 Set the number of lidar rays horizontally to generate per laser sweep.
 
void SetLidarNoise (const Noise &_noise)
 \biref Set the noise values for the lidar sensor.
 
void SetRangeMax (double _max)
 Set maximum distance for each lidar ray.
 
void SetRangeMin (double _min)
 Set minimum distance for each lidar ray.
 
void SetRangeResolution (double _range)
 Set linear resolution of each lidar ray.
 
void SetVerticalScanMaxAngle (const gz::math::Angle &_max)
 Set the maximum angle for vertical scan.
 
void SetVerticalScanMinAngle (const gz::math::Angle &_min)
 Set the minimum angle for vertical scan.
 
void SetVerticalScanResolution (double _res)
 Set the resolution for vertical scan.
 
void SetVerticalScanSamples (unsigned int _samples)
 Set the number of lidar rays vertically to generate per laser sweep.
 
void SetVisibilityMask (uint32_t _mask)
 Set the visibility mask of a lidar.
 
sdf::ElementPtr ToElement () const
 Create and return an SDF element filled with data from this lidar.
 
gz::math::Angle VerticalScanMaxAngle () const
 Get the maximum angle for vertical scan.
 
gz::math::Angle VerticalScanMinAngle () const
 Get the minimum angle for vertical scan.
 
double VerticalScanResolution () const
 Get the resolution for vertical scan.
 
unsigned int VerticalScanSamples () const
 Get the number of lidar rays vertically to generate per laser sweep.
 
uint32_t VisibilityMask () const
 Get the visibility mask of a lidar.
 

Detailed Description

Lidar contains information about a Lidar sensor.

This sensor can be attached to a link. The Lidar sensor can be defined SDF XML using either the "ray" or "lidar" types. The "lidar" type is preffered as "ray" is considered legacy.

Example SDF XML using lidar type:

<sensor name="lidar_sensor" type="lidar">
<pose>1 2 3 0 0 0</pose>
<lidar>
<scan>
<horizontal>
<samples>320</samples>
<resolution>0.9</resolution>
<min_angle>1.75</min_angle>
<max_angle>2.94</max_angle>
</horizontal>
<vertical>
<samples>240</samples>
<resolution>0.8</resolution>
<min_angle>2.75</min_angle>
<max_angle>3.94</max_angle>
</vertical>
</scan>
<range>
<min>1.23</min>
<max>4.56</max>
<resolution>7.89</resolution>
</range>
<noise type="gaussian">
<mean>0.98</mean>
<stddev>0.76</stddev>
</noise>
</lidar>
</sensor>

Example SDF XML using ray type:

<sensor name="ray_sensor" type="lidar">
<pose>1 2 3 0 0 0</pose>
<ray>
<scan>
<horizontal>
<samples>320</samples>
<resolution>0.9</resolution>
<min_angle>1.75</min_angle>
<max_angle>2.94</max_angle>
</horizontal>
<vertical>
<samples>240</samples>
<resolution>0.8</resolution>
<min_angle>2.75</min_angle>
<max_angle>3.94</max_angle>
</vertical>
</scan>
<range>
<min>1.23</min>
<max>4.56</max>
<resolution>7.89</resolution>
</range>
<noise type="gaussian">
<mean>0.98</mean>
<stddev>0.76</stddev>
</noise>
</ray>
</sensor>

Constructor & Destructor Documentation

◆ Lidar()

sdf::SDF_VERSION_NAMESPACE::Lidar::Lidar ( )

Default constructor.

Member Function Documentation

◆ Element()

sdf::ElementPtr sdf::SDF_VERSION_NAMESPACE::Lidar::Element ( ) const

Get a pointer to the SDF element that was used during load.

Returns
SDF element pointer. The value will be nullptr if Load has not been called.

◆ HorizontalScanMaxAngle()

gz::math::Angle sdf::SDF_VERSION_NAMESPACE::Lidar::HorizontalScanMaxAngle ( ) const

Get the maximum angle for horizontal scan.

Returns
Maximum angle for horizontal scan.

◆ HorizontalScanMinAngle()

gz::math::Angle sdf::SDF_VERSION_NAMESPACE::Lidar::HorizontalScanMinAngle ( ) const

Get the minimum angle for horizontal scan.

Returns
Minimum angle for horizontal scan.

◆ HorizontalScanResolution()

double sdf::SDF_VERSION_NAMESPACE::Lidar::HorizontalScanResolution ( ) const

Get the resolution for horizontal scan.

Returns
Resolution for horizontal scan.

◆ HorizontalScanSamples()

unsigned int sdf::SDF_VERSION_NAMESPACE::Lidar::HorizontalScanSamples ( ) const

Get the number of lidar rays horizontally to generate per laser sweep.

Returns
Number of lidar rays horizontally per laser sweep.

◆ LidarNoise()

const Noise & sdf::SDF_VERSION_NAMESPACE::Lidar::LidarNoise ( ) const

Get the noise values for the lidar sensor.

Returns
Noise values for the lidar sensor.

◆ Load()

Errors sdf::SDF_VERSION_NAMESPACE::Lidar::Load ( ElementPtr  _sdf)

Load the lidar based on an element pointer.

This is not the usual entry point. Typical usage of the SDF DOM is through the Root object.

Parameters
[in]_sdfThe SDF Element pointer
Returns
Errors, which is a vector of Error objects. Each Error includes an error code and message. An empty vector indicates no error.

◆ operator!=()

bool sdf::SDF_VERSION_NAMESPACE::Lidar::operator!= ( const Lidar _lidar) const

Return true this Lidar object does not contain the same values as the passed in parameter.

Parameters
[_in]_lidar Lidar value to compare.
Returns
True if 'this' != _lidar.

◆ operator==()

bool sdf::SDF_VERSION_NAMESPACE::Lidar::operator== ( const Lidar _lidar) const

Return true if both Lidar objects contain the same values.

Parameters
[_in]_lidar Lidar value to compare.
Returns
True if 'this' == _lidar.

◆ RangeMax()

double sdf::SDF_VERSION_NAMESPACE::Lidar::RangeMax ( ) const

Get maximum distance for each lidar ray.

Returns
Maximum distance for each lidar ray.

◆ RangeMin()

double sdf::SDF_VERSION_NAMESPACE::Lidar::RangeMin ( ) const

Get minimum distance for each lidar ray.

Returns
Minimum distance for each lidar ray.

◆ RangeResolution()

double sdf::SDF_VERSION_NAMESPACE::Lidar::RangeResolution ( ) const

Get linear resolution of each lidar ray.

Returns
Linear resolution for each lidar ray.

◆ SetHorizontalScanMaxAngle()

void sdf::SDF_VERSION_NAMESPACE::Lidar::SetHorizontalScanMaxAngle ( const gz::math::Angle &  _max)

Set the maximum angle for horizontal scan.

Parameters
[in]Maximumangle for horizontal scan.

◆ SetHorizontalScanMinAngle()

void sdf::SDF_VERSION_NAMESPACE::Lidar::SetHorizontalScanMinAngle ( const gz::math::Angle &  _min)

Set the minimum angle for horizontal scan.

Parameters
[in]Minimumangle for horizontal scan.

◆ SetHorizontalScanResolution()

void sdf::SDF_VERSION_NAMESPACE::Lidar::SetHorizontalScanResolution ( double  _res)

Set the resolution for horizontal scan.

Parameters
[in]Resolutionfor horizontal scan.

◆ SetHorizontalScanSamples()

void sdf::SDF_VERSION_NAMESPACE::Lidar::SetHorizontalScanSamples ( unsigned int  _samples)

Set the number of lidar rays horizontally to generate per laser sweep.

Parameters
[in]Numberof lidar rays horizontally per laser sweep.

◆ SetLidarNoise()

void sdf::SDF_VERSION_NAMESPACE::Lidar::SetLidarNoise ( const Noise _noise)

\biref Set the noise values for the lidar sensor.

Parameters
[in]_noiseNoise values for the lidar sensor.

◆ SetRangeMax()

void sdf::SDF_VERSION_NAMESPACE::Lidar::SetRangeMax ( double  _max)

Set maximum distance for each lidar ray.

Parameters
[in]Maximumdistance for each lidar ray.

◆ SetRangeMin()

void sdf::SDF_VERSION_NAMESPACE::Lidar::SetRangeMin ( double  _min)

Set minimum distance for each lidar ray.

Parameters
[in]Minimumdistance for each lidar ray.

◆ SetRangeResolution()

void sdf::SDF_VERSION_NAMESPACE::Lidar::SetRangeResolution ( double  _range)

Set linear resolution of each lidar ray.

Parameters
[in]Linearresolution for each lidar ray.

◆ SetVerticalScanMaxAngle()

void sdf::SDF_VERSION_NAMESPACE::Lidar::SetVerticalScanMaxAngle ( const gz::math::Angle &  _max)

Set the maximum angle for vertical scan.

Parameters
[in]Maximumangle for vertical scan.

◆ SetVerticalScanMinAngle()

void sdf::SDF_VERSION_NAMESPACE::Lidar::SetVerticalScanMinAngle ( const gz::math::Angle &  _min)

Set the minimum angle for vertical scan.

Parameters
[in]Minimumangle for vertical scan.

◆ SetVerticalScanResolution()

void sdf::SDF_VERSION_NAMESPACE::Lidar::SetVerticalScanResolution ( double  _res)

Set the resolution for vertical scan.

Parameters
[in]Resolutionfor vertical scan.

◆ SetVerticalScanSamples()

void sdf::SDF_VERSION_NAMESPACE::Lidar::SetVerticalScanSamples ( unsigned int  _samples)

Set the number of lidar rays vertically to generate per laser sweep.

Parameters
[in]Numberof lidar rays vertically per laser sweep.

◆ SetVisibilityMask()

void sdf::SDF_VERSION_NAMESPACE::Lidar::SetVisibilityMask ( uint32_t  _mask)

Set the visibility mask of a lidar.

Parameters
[in]_maskvisibility mask

◆ ToElement()

sdf::ElementPtr sdf::SDF_VERSION_NAMESPACE::Lidar::ToElement ( ) const

Create and return an SDF element filled with data from this lidar.

Note that parameter passing functionality is not captured with this function.

Returns
SDF element pointer with updated sensor values.

◆ VerticalScanMaxAngle()

gz::math::Angle sdf::SDF_VERSION_NAMESPACE::Lidar::VerticalScanMaxAngle ( ) const

Get the maximum angle for vertical scan.

Returns
Maximum angle for vertical scan.

◆ VerticalScanMinAngle()

gz::math::Angle sdf::SDF_VERSION_NAMESPACE::Lidar::VerticalScanMinAngle ( ) const

Get the minimum angle for vertical scan.

Returns
Minimum angle for vertical scan.

◆ VerticalScanResolution()

double sdf::SDF_VERSION_NAMESPACE::Lidar::VerticalScanResolution ( ) const

Get the resolution for vertical scan.

Returns
Resolution for vertical scan.

◆ VerticalScanSamples()

unsigned int sdf::SDF_VERSION_NAMESPACE::Lidar::VerticalScanSamples ( ) const

Get the number of lidar rays vertically to generate per laser sweep.

Returns
Number of lidar rays vertically per laser sweep.

◆ VisibilityMask()

uint32_t sdf::SDF_VERSION_NAMESPACE::Lidar::VisibilityMask ( ) const

Get the visibility mask of a lidar.

Returns
visibility mask

The documentation for this class was generated from the following file: