Description
Lidar class.
This corresponds to a scanning lidar.
With OptiX enabled this routes through the OptiX backend. With Vulkan RT enabled and OptiX disabled it keeps the same public API and routes through the Vulkan RT backend, including depth/intensity and point-cloud filters.
#include <ChLidarSensor.h>


Public Member Functions | |
| ChLidarSensor (std::shared_ptr< ChBody > parent, float updateRate, 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. More... | |
| float | GetHFOV () const |
| Gives the horizontal field of view of the lidar (angle between right-most and left-most ray for a "frame"). More... | |
| float | GetMaxVertAngle () const |
| Returns the highest vertical angle of any ray in the lidar. More... | |
| float | GetMinVertAngle () const |
| Returns the lowest vertical angle of any ray in the lidar. More... | |
| float | GetMaxDistance () const |
| Returns the maximum range of the lidar. More... | |
| float | GetClipNear () const |
| Returns the near clipping distance. More... | |
| LidarBeamShape | GetBeamShape () const |
| Returns the beam cross section shape. More... | |
| unsigned int | GetSampleRadius () const |
| Returns the beam sample radius. More... | |
| float | GetHorizDivAngle () const |
| Returns the horizontal beam divergence angle. More... | |
| float | GetVertDivAngle () const |
| Returns the vertical beam divergence angle. More... | |
| LidarReturnMode | GetReturnMode () const |
| bool | DualReturnFlag () const |
Public Member Functions inherited from chrono::sensor::ChSensor | |
| ChSensor (std::shared_ptr< ChBody > parent, float updateRate, ChFrame< double > offsetPose) | |
| Constructor for the base sensor class. More... | |
| void | SetOffsetPose (ChFrame< double > pose) |
| Set the sensor's relative position and orientation. More... | |
| ChFrame< double > | GetOffsetPose () |
| Get the sensor's relative position and orientation. More... | |
| std::shared_ptr< ChBody > | GetParent () const |
| Get the object to which the sensor is attached. More... | |
| void | SetName (std::string name) |
| Set the sensor's name. More... | |
| std::string | GetName () const |
| Get the name of the sensor. More... | |
| float | GetUpdateRate () const |
| Get the sensor update rate (Hz). More... | |
| void | SetLag (float t) |
| Set the lag parameter. More... | |
| float | GetLag () const |
| Get the sensor lag (seconds). More... | |
| void | SetCollectionWindow (float t) |
| Set the collection window. More... | |
| float | GetCollectionWindow () const |
| Get the sensor data collection window (seconds). More... | |
| void | SetUpdateRate (float updateRate) |
| Set the sensor update rate (Hz). More... | |
| unsigned int | GetNumLaunches () |
| Get the number of times the sensor has been updated. More... | |
| void | IncrementNumLaunches () |
| Increments the count of number of updates. | |
| std::list< std::shared_ptr< ChFilter > > | GetFilterList () const |
| Get the sensor's list of filters. More... | |
| void | PushFilter (std::shared_ptr< ChFilter > filter) |
| Add a filter to the sensor. More... | |
| void | PushFilterFront (std::shared_ptr< ChFilter > filter) |
| Add a filter to the front of the list on a sensor. More... | |
| void | LockFilterList () |
| Gives ability to lock the filter list to prevent race conditions. More... | |
| unsigned int | GetRngSensorOrdinal () const |
| This sensor's registration ordinal within its manager, used to give it RNG streams distinct from every other sensor's. More... | |
| unsigned int | GetRngManagerId () const |
| The id of the manager this sensor is registered with. More... | |
| template<class UserBufferType > | |
| UserBufferType | GetMostRecentBuffer () |
| Get the last filter in the list that matches the template type. More... | |
| template<> | |
| CH_SENSOR_API UserAccelBufferPtr | GetMostRecentBuffer () |
Additional Inherited Members | |
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. More... | |
| float | m_timeLastUpdated |
| time since previous update | |
| std::shared_ptr< ChBody > | m_parent |
| object to which the sensor is attached | |
| 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()
| chrono::sensor::ChLidarSensor::ChLidarSensor | ( | std::shared_ptr< ChBody > | parent, |
| float | updateRate, | ||
| 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 rectangles 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()
|
inline |
Returns the beam cross section shape.
- Returns
- the beam cross section shape
◆ GetClipNear()
|
inline |
Returns the near clipping distance.
- Returns
- the near clipping distance
◆ GetHFOV()
|
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 resolution) in degrees for a full 360 degree scanning lidar.
- Returns
- The horizontal field of view of the lidar sensor
◆ GetHorizDivAngle()
|
inline |
Returns the horizontal beam divergence angle.
- Returns
- the horizontal beam divergence angle
◆ GetMaxDistance()
|
inline |
Returns the maximum range of the lidar.
- Returns
- The maximum distance for the lidar
◆ GetMaxVertAngle()
|
inline |
Returns the highest vertical angle of any ray in the lidar.
- Returns
- The angle of the highest ray
◆ GetMinVertAngle()
|
inline |
Returns the lowest vertical angle of any ray in the lidar.
- Returns
- The angle of the lowest ray
◆ GetSampleRadius()
|
inline |
Returns the beam sample radius.
- Returns
- the beam sample radius
◆ GetVertDivAngle()
|
inline |
Returns the vertical beam divergence angle.
- Returns
- the vertical beam divergence angle
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono_sensor/sensors/ChLidarSensor.h
- /builds/uwsbel/chrono/src/chrono_sensor/sensors/ChLidarSensor.cpp
Public Member Functions inherited from