Project Chrono: chrono::sensor::ChLidarSensor Class Reference

Public Member Functions | List of all members
chrono::sensor::ChLidarSensor Class Reference
SENSOR module » Sensors

## Description

Lidar class. This corresponds to a scanning lidar.

`#include <ChLidarSensor.h>`

Inheritance diagram for chrono::sensor::ChLidarSensor:
[legend]
Collaboration diagram for chrono::sensor::ChLidarSensor:
[legend]

## Public Member Functions
| ChLidarSensor (std::shared_ptr< chrono::ChBody > parent, float updateRate, chrono::ChFrame< double > offsetPose, unsigned int w, unsigned int h, float hfov, float max_vertical_angle, float min_vertical_angle, float max_distance, LidarBeamShape beam_shape=LidarBeamShape::RECTANGULAR, unsigned int sample_radius=1, float vert_divergence_angle=.003f, float hori_divergence_angle=.003f, LidarReturnMode return_mode=LidarReturnMode::MEAN_RETURN, float clip_near=1e-3f)
| Constructor for the base lidar class, defaulting to using a single ray per beam.
| ~ChLidarSensor ()
| Class destructor.
float | GetHFOV () const
| Gives the horizontal field of view of the lidar (angle between right-most and left-most ray for a "frame").
float | GetMaxVertAngle () const
| returns the lidar's horizontal field of view
float | GetMinVertAngle () const
| Returns the lowest vertical angle of any ray in the lidar.
float | GetMaxDistance () const
| Returns the maximum range of the lidar.
float | GetClipNear () const
| Returns the near clipping distance.
LidarBeamShape | GetBeamShape () const
| Returns the beam cross section shape.
unsigned int | GetSampleRadius () const
| Returns the beam sample radius.
float | GetHorizDivAngle () const
| Returns the horizontal beam divergence angle.
float | GetVertDivAngle () const
| Returns the vertical beam divergence angle.
bool | DualReturnFlag () const
Public Member Functions inherited from chrono::sensor::ChOptixSensor
| ChOptixSensor (std::shared_ptr< chrono::ChBody > parent, float updateRate, chrono::ChFrame< double > offsetPose, unsigned int w, unsigned int h)
| Constructor for the base camera class that defaults to a pinhole lens model.
virtual | ~ChOptixSensor ()
| camera class destructor
PipelineType | GetPipelineType ()
unsigned int | GetWidth ()
unsigned int | GetHeight ()
CUstream | GetCudaStream ()
Public Member Functions inherited from chrono::sensor::ChSensor
| ChSensor (std::shared_ptr< chrono::ChBody > parent, float updateRate, chrono::ChFrame< double > offsetPose)
| Constructor for the base sensor class.
virtual | ~ChSensor ()
| Class destructor.
void | SetOffsetPose (chrono::ChFrame< double > pose)
| Set the sensor's relative position and orientation.
ChFrame< double > | GetOffsetPose ()
| Get the sensor's relative position and orientation.
std::shared_ptr< ChBody > | GetParent () const
| Get the object to which the sensor is attached.
void | SetName (std::string name)
| Set the sensor's name.
std::string | GetName () const
| Get the name of the sensor.
float | GetUpdateRate () const
| Get the sensor update rate (Hz).
void | SetLag (float t)
| Set the lag parameter.
float | GetLag () const
| Get the sensor lag (seconds).
void | SetCollectionWindow (float t)
| Set the collection window.
float | GetCollectionWindow () const
| Get the sensor data collection window (seconds).
void | SetUpdateRate (float updateRate)
| Set the sensor update rate (Hz).
unsigned int | GetNumLaunches ()
| Get the number of times the sensor has been updated.
void | IncrementNumLaunches ()
| Increments the count of number of updates.
std::list< std::shared_ptr< ChFilter > > | GetFilterList () const
| Get the sensor's list of filters.
void | PushFilter (std::shared_ptr< ChFilter > filter)
| Add a filter to the sensor.
void | PushFilterFront (std::shared_ptr< ChFilter > filter)
| Add a filter to the front of the list on a sensor.
void | LockFilterList ()
| Gives ability to lock the filter list to prevent race conditions.
template<class UserBufferType>
UserBufferType | GetMostRecentBuffer ()
| Get the last filter in the list that matches the template type.
template<>
CH_SENSOR_API UserR8BufferPtr | GetMostRecentBuffer ()
template<>
CH_SENSOR_API UserRGBA8BufferPtr | GetMostRecentBuffer ()
template<>
CH_SENSOR_API UserDepthBufferPtr | GetMostRecentBuffer ()
template<>
CH_SENSOR_API UserDIBufferPtr | GetMostRecentBuffer ()
template<>
CH_SENSOR_API UserXYZIBufferPtr | GetMostRecentBuffer ()
template<>
CH_SENSOR_API UserRadarBufferPtr | GetMostRecentBuffer ()
template<>
CH_SENSOR_API UserRadarXYZBufferPtr | GetMostRecentBuffer ()
template<>
CH_SENSOR_API UserAccelBufferPtr | GetMostRecentBuffer ()
template<>
CH_SENSOR_API UserGyroBufferPtr | GetMostRecentBuffer ()
template<>
CH_SENSOR_API UserMagnetBufferPtr | GetMostRecentBuffer ()
template<>
CH_SENSOR_API UserGPSBufferPtr | GetMostRecentBuffer ()
template<>
CH_SENSOR_API UserTachometerBufferPtr | GetMostRecentBuffer ()

## Additional Inherited Members
Protected Attributes inherited from chrono::sensor::ChOptixSensor
PipelineType | m_pipeline_type
| the type of pipeline for rendering
Protected Attributes inherited from chrono::sensor::ChSensor
float | m_updateRate
| sensor update rate
float | m_lag
| sensor lag from the time all scene information is available (sensor processing time)
float | m_collection_window
| time over which data is collected.
float | m_timeLastUpdated
| time since previous update
std::shared_ptr< chrono::ChBody > | m_parent
| object to which the sensor is attached
chrono::ChFrame< double > | m_offsetPose
| position and orientation of the sensor relative to its parent
std::string | m_name
| name of the sensor
unsigned int | m_num_launches
| number of times the sensor has been updated
std::list< std::shared_ptr< ChFilter > > | m_filters
| filter list for post-processing sensor data
bool | m_filter_list_locked = false
| gives ability to lock the filter list to prevent race conditions

## Constructor & Destructor Documentation

## ◆ ChLidarSensor()

CH_SENSOR_API chrono::sensor::ChLidarSensor::ChLidarSensor | ( | std::shared_ptr< chrono::ChBody > | parent,
|  | float | updateRate,
|  | chrono::ChFrame< double > | offsetPose,
|  | unsigned int | w,
|  | unsigned int | h,
|  | float | hfov,
|  | float | max_vertical_angle,
|  | float | min_vertical_angle,
|  | float | max_distance,
|  | LidarBeamShape | beam_shape = LidarBeamShape::RECTANGULAR,
|  | unsigned int | sample_radius = 1,
|  | float | vert_divergence_angle = .003f,
|  | float | hori_divergence_angle = .003f,
|  | LidarReturnMode | return_mode = LidarReturnMode::MEAN_RETURN,
|  | float | clip_near = 1e-3f )

Constructor for the base lidar class, defaulting to using a single ray per beam.

Parameters

  parent | Body to which the sensor is attached.
  updateRate | Rate at which the sensor should update.
  offsetPose | Relative position and orientation of the sensor with respect to its parent object.
  w | Width in number of samples of a lidar scan
  h | Height in number of sample of a lidar scan (typical the same as laser channels)
  hfov | Horizontal field of view of the lidar
  max_vertical_angle | Maximum vertical angle of the lidar
  min_vertical_angle | Minimum vertical angle of the lidar
  max_distance | the maximum measurable distance for the lidar
  beam_shape | Shape of lidar beam, only rectangules and ellipse are supported currently.
  sample_radius | The radius in samples for multisampling beams (total samples per beam is 2*radius-1)
  vert_divergence_angle | The vertical divergence angle of the lidar's laser beam
  hori_divergence_angle | The horizontal divergence angle of the lidar's laser beam
  return_mode | The return mode for lidar data when multiple objects are visible
  clip_near | Near clipping distance so that lidar sensor can be easily placed inside a visualization object (sensor housing)

## Member Function Documentation

## ◆ GetBeamShape()

LidarBeamShape chrono::sensor::ChLidarSensor::GetBeamShape | ( |  | ) | const
| inline

Returns the beam cross section shape.

Returns
  the beam cross section shape

## ◆ GetClipNear()

float chrono::sensor::ChLidarSensor::GetClipNear | ( |  | ) | const
| inline

Returns the near clipping distance.

Returns
  the near clipping distance

## ◆ GetHFOV()

float chrono::sensor::ChLidarSensor::GetHFOV | ( |  | ) | const
| inline

Gives the horizontal field of view of the lidar (angle between right-most and left-most ray for a "frame").

Horizontal field of view should be 360-(angular resulution) in degrees for a full 360 degree scanning lidar.

Returns
  The horizontal field of view of the lidar sensor

## ◆ GetHorizDivAngle()

float chrono::sensor::ChLidarSensor::GetHorizDivAngle | ( |  | ) | const
| inline

Returns the horizontal beam divergence angle.

Returns
  the horizontal beam divergence angle

## ◆ GetMaxDistance()

float chrono::sensor::ChLidarSensor::GetMaxDistance | ( |  | ) | const
| inline

Returns the maximum range of the lidar.

Returns
  The maximum distance for the lidar

## ◆ GetMaxVertAngle()

float chrono::sensor::ChLidarSensor::GetMaxVertAngle | ( |  | ) | const
| inline

returns the lidar's horizontal field of view

Returns the highest vertical angle of any ray in the lidar

Returns
  The angle of the highest ray

## ◆ GetMinVertAngle()

float chrono::sensor::ChLidarSensor::GetMinVertAngle | ( |  | ) | const
| inline

Returns the lowest vertical angle of any ray in the lidar.

Returns
  The angle of the lowest ray

## ◆ GetSampleRadius()

unsigned int chrono::sensor::ChLidarSensor::GetSampleRadius | ( |  | ) | const
| inline

Returns the beam sample radius.

Returns
  the beam sample radius

## ◆ GetVertDivAngle()

float chrono::sensor::ChLidarSensor::GetVertDivAngle | ( |  | ) | const
| inline

Returns the vertical beam divergence angle.

Returns
  the vertical beam divergence angle

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

- D:/W/B/src/chrono-9.0.1/src/chrono_sensor/sensors/ChLidarSensor.h
- D:/W/B/src/chrono-9.0.1/src/chrono_sensor/sensors/ChLidarSensor.cpp