Open 3D Engine ROS2 Gem API Reference  24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
ROS2::LidarTemplateUtils Namespace Reference

Utility class for Lidar model computations. More...

Functions

LidarTemplate GetTemplate (LidarTemplate::LidarModel model)
 
AZStd::vector< LidarTemplate::LidarModel > Get2DModels ()
 
AZStd::vector< LidarTemplate::LidarModel > Get3DModels ()
 
size_t TotalPointCount (const LidarTemplate &t)
 
AZStd::vector< AZ::Vector3 > PopulateRayRotations (const LidarTemplate &lidarTemplate)
 
AZStd::vector< AZ::Vector3 > RotationsToDirections (const AZStd::vector< AZ::Quaternion > &rotations, const AZ::Transform &rootTransform)
 

Detailed Description

Utility class for Lidar model computations.

Function Documentation

◆ Get2DModels()

AZStd::vector<LidarTemplate::LidarModel> ROS2::LidarTemplateUtils::Get2DModels ( )

Get all 2D lidar models.

Returns
2D lidar models.

◆ Get3DModels()

AZStd::vector<LidarTemplate::LidarModel> ROS2::LidarTemplateUtils::Get3DModels ( )

Get all 3D lidar models.

Returns
3D lidar models.

◆ GetTemplate()

LidarTemplate ROS2::LidarTemplateUtils::GetTemplate ( LidarTemplate::LidarModel  model)

Get the lidar template for a model.

Parameters
modellidar model.
Returns
the matching template which describes parameters for the model.

◆ PopulateRayRotations()

AZStd::vector<AZ::Vector3> ROS2::LidarTemplateUtils::PopulateRayRotations ( const LidarTemplate lidarTemplate)

Compute ray Rotation angles based on lidar model.

Parameters
lidarTemplateLidar model to use. Note that different models will produce different number of rays.
Returns
Ray rotations angles as Euler angles in radians.

◆ RotationsToDirections()

AZStd::vector<AZ::Vector3> ROS2::LidarTemplateUtils::RotationsToDirections ( const AZStd::vector< AZ::Quaternion > &  rotations,
const AZ::Transform &  rootTransform 
)

Compute ray directions from rotations.

Parameters
rotationsRotations as quaternions to compute directions from.
rootTransformroot transformation of Lidar sensor.
Returns
Ray directions constructed by transforming an X axis unit vector by the provided rotations.

◆ TotalPointCount()

size_t ROS2::LidarTemplateUtils::TotalPointCount ( const LidarTemplate t)

Get total point count for a given template.

Parameters
tlidar template.
Returns
total count of points that the lidar specified by the template would produce on each scan.