Public Member Functions | List of all members
sdf::v12::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...
 
ignition::math::Angle HorizontalScanMaxAngle () const
 Get the maximum angle for horizontal scan. More...
 
ignition::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 ignition::math::Angle &_max)
 Set the maximum angle for horizontal scan. More...
 
void SetHorizontalScanMinAngle (const ignition::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 ignition::math::Angle &_max)
 Set the maximum angle for vertical scan. More...
 
void SetVerticalScanMinAngle (const ignition::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...
 
ignition::math::Angle VerticalScanMaxAngle () const
 Get the maximum angle for vertical scan. More...
 
ignition::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::v12::Lidar::Lidar ( )

Default constructor.

Member Function Documentation

◆ Element()

sdf::ElementPtr sdf::v12::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()

ignition::math::Angle sdf::v12::Lidar::HorizontalScanMaxAngle ( ) const

Get the maximum angle for horizontal scan.

Returns
Maximum angle for horizontal scan.

◆ HorizontalScanMinAngle()

ignition::math::Angle sdf::v12::Lidar::HorizontalScanMinAngle ( ) const

Get the minimum angle for horizontal scan.

Returns
Minimum angle for horizontal scan.

◆ HorizontalScanResolution()

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

Get the resolution for horizontal scan.

Returns
Resolution for horizontal scan.

◆ HorizontalScanSamples()

unsigned int sdf::v12::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::v12::Lidar::LidarNoise ( ) const

Get the noise values for the lidar sensor.

Returns
Noise values for the lidar sensor.

◆ Load()

Errors sdf::v12::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::v12::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::v12::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::v12::Lidar::RangeMax ( ) const

Get maximum distance for each lidar ray.

Returns
Maximum distance for each lidar ray.

◆ RangeMin()

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

Get minimum distance for each lidar ray.

Returns
Minimum distance for each lidar ray.

◆ RangeResolution()

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

Get linear resolution of each lidar ray.

Returns
Linear resolution for each lidar ray.

◆ SetHorizontalScanMaxAngle()

void sdf::v12::Lidar::SetHorizontalScanMaxAngle ( const ignition::math::Angle &  _max)

Set the maximum angle for horizontal scan.

Parameters
[in]Maximumangle for horizontal scan.

◆ SetHorizontalScanMinAngle()

void sdf::v12::Lidar::SetHorizontalScanMinAngle ( const ignition::math::Angle &  _min)

Set the minimum angle for horizontal scan.

Parameters
[in]Minimumangle for horizontal scan.

◆ SetHorizontalScanResolution()

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

Set the resolution for horizontal scan.

Parameters
[in]Resolutionfor horizontal scan.

◆ SetHorizontalScanSamples()

void sdf::v12::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::v12::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::v12::Lidar::SetRangeMax ( double  _max)

Set maximum distance for each lidar ray.

Parameters
[in]Maximumdistance for each lidar ray.

◆ SetRangeMin()

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

Set minimum distance for each lidar ray.

Parameters
[in]Minimumdistance for each lidar ray.

◆ SetRangeResolution()

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

Set linear resolution of each lidar ray.

Parameters
[in]Linearresolution for each lidar ray.

◆ SetVerticalScanMaxAngle()

void sdf::v12::Lidar::SetVerticalScanMaxAngle ( const ignition::math::Angle &  _max)

Set the maximum angle for vertical scan.

Parameters
[in]Maximumangle for vertical scan.

◆ SetVerticalScanMinAngle()

void sdf::v12::Lidar::SetVerticalScanMinAngle ( const ignition::math::Angle &  _min)

Set the minimum angle for vertical scan.

Parameters
[in]Minimumangle for vertical scan.

◆ SetVerticalScanResolution()

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

Set the resolution for vertical scan.

Parameters
[in]Resolutionfor vertical scan.

◆ SetVerticalScanSamples()

void sdf::v12::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::v12::Lidar::SetVisibilityMask ( uint32_t  _mask)

Set the visibility mask of a lidar.

Parameters
[in]_maskvisibility mask

◆ ToElement()

sdf::ElementPtr sdf::v12::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()

ignition::math::Angle sdf::v12::Lidar::VerticalScanMaxAngle ( ) const

Get the maximum angle for vertical scan.

Returns
Maximum angle for vertical scan.

◆ VerticalScanMinAngle()

ignition::math::Angle sdf::v12::Lidar::VerticalScanMinAngle ( ) const

Get the minimum angle for vertical scan.

Returns
Minimum angle for vertical scan.

◆ VerticalScanResolution()

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

Get the resolution for vertical scan.

Returns
Resolution for vertical scan.

◆ VerticalScanSamples()

unsigned int sdf::v12::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::v12::Lidar::VisibilityMask ( ) const

Get the visibility mask of a lidar.

Returns
visibility mask

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