Public Member Functions | List of all members
sdf::v9::Lidar Class Reference

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

#include <Lidar.hh>

Public Member Functions

 Lidar ()
 Default constructor. More...
 
 Lidar (const Lidar &_lidar)
 Copy constructor. More...
 
 Lidar (Lidar &&_lidar) noexcept
 Move constructor. More...
 
 ~Lidar ()
 Destructor. 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...
 
Lidaroperator= (const Lidar &_lidar)
 Assignment operator. More...
 
Lidaroperator= (Lidar &&_lidar) noexcept
 Move assignment operator. 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)
 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...
 
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...
 

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() [1/3]

sdf::v9::Lidar::Lidar ( )

Default constructor.

◆ Lidar() [2/3]

sdf::v9::Lidar::Lidar ( const Lidar _lidar)

Copy constructor.

Parameters
[in]_lidarLidar to copy.

◆ Lidar() [3/3]

sdf::v9::Lidar::Lidar ( Lidar &&  _lidar)
noexcept

Move constructor.

Parameters
[in]_lidarLidar to move.

◆ ~Lidar()

sdf::v9::Lidar::~Lidar ( )

Destructor.

Member Function Documentation

◆ Element()

sdf::ElementPtr sdf::v9::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::v9::Lidar::HorizontalScanMaxAngle ( ) const

Get the maximum angle for horizontal scan.

Returns
Maximum angle for horizontal scan.

◆ HorizontalScanMinAngle()

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

Get the minimum angle for horizontal scan.

Returns
Minimum angle for horizontal scan.

◆ HorizontalScanResolution()

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

Get the resolution for horizontal scan.

Returns
Resolution for horizontal scan.

◆ HorizontalScanSamples()

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

Get the noise values for the lidar sensor.

Returns
Noise values for the lidar sensor.

◆ Load()

Errors sdf::v9::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::v9::Lidar::operator!= ( const Lidar _lidar) const

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

Parameters

◆ operator=() [1/2]

Lidar& sdf::v9::Lidar::operator= ( const Lidar _lidar)

Assignment operator.

Parameters
[in]_lidarThe lidar to set values from.
Returns
*this

◆ operator=() [2/2]

Lidar& sdf::v9::Lidar::operator= ( Lidar &&  _lidar)
noexcept

Move assignment operator.

Parameters
[in]_lidarThe lidar to set values from.
Returns
*this

◆ operator==()

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

Return true if both Lidar objects contain the same values.

Parameters

◆ RangeMax()

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

Get maximum distance for each lidar ray.

Returns
Maximum distance for each lidar ray.

◆ RangeMin()

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

Get minimum distance for each lidar ray.

Returns
Minimum distance for each lidar ray.

◆ RangeResolution()

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

Get linear resolution of each lidar ray.

Returns
Linear resolution for each lidar ray.

◆ SetHorizontalScanMaxAngle()

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

Set the maximum angle for horizontal scan.

Parameters
[in]Maximumangle for horizontal scan.

◆ SetHorizontalScanMinAngle()

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

Set the minimum angle for horizontal scan.

Parameters
[in]Minimumangle for horizontal scan.

◆ SetHorizontalScanResolution()

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

Set the resolution for horizontal scan.

Parameters
[in]Resolutionfor horizontal scan.

◆ SetHorizontalScanSamples()

void sdf::v9::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::v9::Lidar::SetLidarNoise ( const Noise _noise)

Set the noise values for the lidar sensor.

Parameters
[in]_noiseNoise values for the lidar sensor.

◆ SetRangeMax()

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

Set maximum distance for each lidar ray.

Parameters
[in]Maximumdistance for each lidar ray.

◆ SetRangeMin()

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

Set minimum distance for each lidar ray.

Parameters
[in]Minimumdistance for each lidar ray.

◆ SetRangeResolution()

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

Set linear resolution of each lidar ray.

Parameters
[in]Linearresolution for each lidar ray.

◆ SetVerticalScanMaxAngle()

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

Set the maximum angle for vertical scan.

Parameters
[in]Maximumangle for vertical scan.

◆ SetVerticalScanMinAngle()

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

Set the minimum angle for vertical scan.

Parameters
[in]Minimumangle for vertical scan.

◆ SetVerticalScanResolution()

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

Set the resolution for vertical scan.

Parameters
[in]Resolutionfor vertical scan.

◆ SetVerticalScanSamples()

void sdf::v9::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.

◆ VerticalScanMaxAngle()

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

Get the maximum angle for vertical scan.

Returns
Maximum angle for vertical scan.

◆ VerticalScanMinAngle()

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

Get the minimum angle for vertical scan.

Returns
Minimum angle for vertical scan.

◆ VerticalScanResolution()

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

Get the resolution for vertical scan.

Returns
Resolution for vertical scan.

◆ VerticalScanSamples()

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

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

Returns
Number of lidar rays vertically per laser sweep.

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