Interface class that allows for communication with a single Lidar instance.
More...
#include <LidarRaycasterBus.h>
|
static void | ValidateRayRange ([[maybe_unused]] float range) |
|
static void | ValidateRayOrientations ([[maybe_unused]] const AZStd::vector< AZ::Vector3 > &orientations) |
|
Interface class that allows for communication with a single Lidar instance.
◆ CanHandlePublishing()
virtual bool ROS2::LidarRaycasterRequests::CanHandlePublishing |
( |
| ) |
|
|
inlinevirtual |
Can the raycaster handle publishing? This function should be called after the raycaster has been configured. The raycaster may not be able to handle point-cloud publishing in certain configurations (e.g. when the maxPointAddition is selected) in which case publishing must be handled somewhere else (e.g. by the ROS2LidarComponent).
◆ ConfigureIgnoredCollisionLayers()
virtual void ROS2::LidarRaycasterRequests::ConfigureIgnoredCollisionLayers |
( |
[[maybe_unused] ] const AZStd::unordered_set< AZ::u32 > & |
layerIndices | ) |
|
|
inlinevirtual |
Configures which collision layers should be ignored.
- Parameters
-
layerIndices | Indices of collision layers to be ignored. |
◆ ConfigureMaxRangePointAddition()
virtual void ROS2::LidarRaycasterRequests::ConfigureMaxRangePointAddition |
( |
[[maybe_unused] ] bool |
addMaxRangePoints | ) |
|
|
inlinevirtual |
Configures max range point addition.
- Parameters
-
includeMaxRange | Should the raycaster add points at max range for rays that exceeded their range? |
◆ ConfigureMinimumRayRange()
virtual void ROS2::LidarRaycasterRequests::ConfigureMinimumRayRange |
( |
float |
range | ) |
|
|
inlinevirtual |
Configures ray minimum travel distance.
- Parameters
-
range | Ray range in meters. |
◆ ConfigureNoiseParameters()
virtual void ROS2::LidarRaycasterRequests::ConfigureNoiseParameters |
( |
[[maybe_unused] ] float |
angularNoiseStdDev, |
|
|
[[maybe_unused] ] float |
distanceNoiseStdDevBase, |
|
|
[[maybe_unused] ] float |
distanceNoiseStdDevRisePerMeter |
|
) |
| |
|
inlinevirtual |
Configures ray Gaussian Noise parameters. Each call overrides the previous configuration. This type of noise is especially useful when trying to simulate real-life lidars, since its noise mimics the imperfections arising due to various physical factors e.g. fluctuations in rotary motion of the lidar (angular noise) or distance accuracy (distance noise). For the the details about Gaussian noise, please refer to https://en.wikipedia.org/wiki/Gaussian_noise.
- Parameters
-
angularNoiseStdDev | Angular noise standard deviation. |
distanceNoiseStdDevBase | Base value for Distance noise standard deviation. |
distanceNoiseStdDevRisePerMeter | Value by which the distance noise standard deviation increases per meter length from the lidar. |
◆ ConfigurePointCloudPublisher()
virtual void ROS2::LidarRaycasterRequests::ConfigurePointCloudPublisher |
( |
[[maybe_unused] ] const AZStd::string & |
topicName, |
|
|
[[maybe_unused] ] const AZStd::string & |
frameId, |
|
|
[[maybe_unused] ] const QoS & |
qoSPolicy |
|
) |
| |
|
inlinevirtual |
Enables and configures raycaster-side Point Cloud Publisher. If not called, no publishing (raycaster-side) is performed. For some implementations it might be beneficial to publish internally (e.g. for the RGL gem, published points can be transformed from global to sensor coordinates on the GPU and published without unnecessary data copying or CPU manipulation) This API enables raycaster implementations that also handle publishing and provides them with necessary publisher configuration.
- Parameters
-
topicName | Name of the ROS 2 topic the pointcloud is published on. |
frameId | Id of the ROS 2 frame of the sensor. |
qoSPolicy | QoS policy of published pointcloud messages. |
◆ ConfigureRaycastResultFlags()
virtual void ROS2::LidarRaycasterRequests::ConfigureRaycastResultFlags |
( |
RaycastResultFlags |
flags | ) |
|
|
inlinevirtual |
Configures result flags.
- Parameters
-
flags | Raycast result flags define set of data types returned by lidar. |
◆ ConfigureRayOrientations()
virtual void ROS2::LidarRaycasterRequests::ConfigureRayOrientations |
( |
const AZStd::vector< AZ::Vector3 > & |
orientations | ) |
|
|
pure virtual |
Configures ray orientations.
- Parameters
-
orientations | Vector of orientations as Euler angles in radians. Each ray direction is computed by transforming a unit vector in the positive z direction first by the y, next by the z axis. The x axis is currently not included in calculations. |
◆ ConfigureRayRange()
virtual void ROS2::LidarRaycasterRequests::ConfigureRayRange |
( |
float |
range | ) |
|
|
pure virtual |
Configures ray maximum travel distance.
- Parameters
-
range | Ray range in meters. |
◆ ExcludeEntities()
virtual void ROS2::LidarRaycasterRequests::ExcludeEntities |
( |
[[maybe_unused] ] const AZStd::vector< AZ::EntityId > & |
excludedEntities | ) |
|
|
inlinevirtual |
Excludes entities with given EntityIds from raycasting.
- Parameters
-
excludedEntities | List of entities marked for exclusion. |
◆ PerformRaycast()
virtual RaycastResult ROS2::LidarRaycasterRequests::PerformRaycast |
( |
const AZ::Transform & |
lidarTransform | ) |
|
|
pure virtual |
Schedules a raycast that originates from the point described by the lidarTransform.
- Parameters
-
lidarTransform | Current transform from global to lidar reference frame. |
flags | Used to request different kinds of data returned by raycast query |
- Returns
- Results of the raycast in the requested form including 3D space coordinates and/or ranges.
◆ UpdatePublisherTimestamp()
virtual void ROS2::LidarRaycasterRequests::UpdatePublisherTimestamp |
( |
[[maybe_unused] ] AZ::u64 |
timestampNanoseconds | ) |
|
|
inlinevirtual |
Updates the timestamp of the messages published by the raycaster.
- Parameters
-
timestampNanoseconds | timestamp in nanoseconds (Time.msg: sec = timestampNanoseconds / 10^9; nanosec = timestampNanoseconds mod 10^9). |
The documentation for this class was generated from the following file:
- Gems/ROS2/Code/Include/ROS2/Lidar/LidarRaycasterBus.h