Main Content

UAV Scenario Lidar

Simulate lidar measurements based on meshes in scenario

Since R2021b

  • UAV Scenario Lidar block

Libraries:
UAV Toolbox / UAV Scenario and Sensor Modeling

Description

Use this block to simulate lidar measurements by outputting point cloud data based on meshes in a UAV Scenario. To add meshes to your UAV Scenario, use the addMesh function to add it to the uavScenario object included by your UAV Scenario Configuration block. See UAV Scenario Tutorial for more information on adding meshes.

To use this block, ensure that UAV Scenario Configuration block is in your model.

Examples

Limitations

The UAV Scenario blocks do not support:

In addition, the execution order is important when using these blocks in a closed loop simulation. The UAV Scenario Configuration block must execute first. The UAV Scenario Motion Write block must execute before the UAV Scenario Motion Read, UAV Scenario Lidar, and UAV Scenario Scope blocks.

Ports

Output

expand all

Point cloud data reported in the Sensor Frame. When Output organized point cloud locations is checked, the point cloud data is specified as a N-by-M-by-3 double matrix, where N is the number of vertical scans, and M is the number of horizontal scans. When Output organized point cloud locations is unchecked, the point cloud data is specified as an N-by-3 double matrix, where N is the number of points in the point cloud.

Parameters

expand all

Specify lidar sensor name as a string scalar.

To choose an existing lidar sensor from the UAV Scenario in the MATLAB® workspace, click Select. The UAV Scenario Lidar block sets the parameters with the current values of the properties of specified lidar sensor.

To add lidar sensors to the UAV Scenario, create uavSensor objects with a uavLidarPointCloudGenerator as the specified sensor model and attach the uavSensor to a uavPlatform in UAV Scenario. This scenario must be imported into Simulink® using the UAV Scenario Configuration block. The available sensors will be listed as 'platform name/sensor name'.

Specify max range of lidar as a double scalar in meters.

If you use Select to specify the Sensor name parameter, the UAV Scenario Lidar block sets the value of the Max range parameter to the MaxRange property of the specified lidar sensor.

Specify range accuracy of lidar as a double scalar in meters.

If you use Select to specify the Sensor name parameter, the UAV Scenario Lidar block sets the value of the RangeAccuracyparameter to the value of the RangeAccuracy property of the specified lidar sensor.

Specify azimuthal limits of lidar as a two-element vector in degrees.

If you use Select to specify the Sensor name parameter, the UAV Scenario Lidar block sets the value of the Azimuthal limits parameter to the value of the AzimuthLimits property of the specified lidar sensor.

Specify azimuthal resolution of lidar as a double scalar in degrees.

If you use Select to specify the Sensor name parameter, the UAV Scenario Lidar block sets the value of the Azimuthal resolution parameter to the value of the AzimuthResolution property of the specified lidar sensor.

Specify elevation limits of lidar as a two element vector in degrees.

If you use Select to specify the Sensor name parameter, the UAV Scenario Lidar block sets the value of the Elevation limits parameter to the value of the ElevationLimits property of the specified lidar sensor.

Specify elevation resolution of lidar as a double scalar in degrees.

If you use Select to specify the Sensor name parameter, the UAV Scenario Lidar block sets the value of the Elevation resolution resolution parameter to the value of the ElevationResolution property of the specified lidar sensor.

Check this box to add noise to measurement of lidar. The noise generation of this block currently does not allow for a user-specified seed.

If you use Select to specify the Sensor name parameter, the UAV Scenario Lidar block sets the value of the Add noise to measurement parameter to the value of the HasNoise property of the specified lidar sensor.

Check this box to output organized point cloud locations specified as N-by-M-by-3, where N is the number of vertical scans, and M is the number of horizontal scans. If set to 'off', the output of the block is an N-by-3 double matrix, where N is the number of points in the point cloud.

If you use Select to specify the Sensor name parameter, the UAV Scenario Lidar block sets the value of the Output organized point cloud locations parameter to the value of the HasOrganizedOutput property of the specified lidar sensor.

Specify sample time of the lidar as a double scalar in seconds. Sample time must be a multiple of the sample time specified in the UAV Scenario Configuration block.

If you use Select to specify the Sensor name parameter, the UAV Scenario Lidar block sets the value of the Sample Time parameter to 1/UpdateRate. UpdateRate is the UpdateRate property of the specified lidar sensor.

Version History

Introduced in R2021b