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

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: