Point Cloud Visualization using Lidar Sensor and Scenario Reader

35 views (last 30 days)
I have used driving scenario designer to make a test scenario, then exported the scenario and sensors to a simulink model. I have used three sensors, camera, radar, and lidar. Ignoring the first two as the lidar is what I am trying to get working.
This is the model that it generates, note that I added the Point Cloud Viewer block. Now this works fine and lets me visualize the point cloud, however, I want to use the Lidar Sensor from the Lidar Toolbox as it gives location AND intensity. Which brings me to how I have attempted to update the model:
From this documentation:
The Actors output from scenario reader should be able to input into the Lidar Sensor "ActorPoses" port.
However, when running the model this error is thrown:
Error:MATLAB System block 'simulation_test/Lidar Sensor' error occurred when invoking 'setupImpl' method of 'lidarsimulink.internal.LidarSensorBlock'. The error was thrown from '
'C:\Program Files\MATLAB\R2024a\toolbox\lidar\lidarsimulink\+lidarsimulink\+internal\LidarSensorBlock.m' at line 659
'C:\Program Files\MATLAB\R2024a\toolbox\lidar\lidarsimulink\+lidarsimulink\+internal\LidarSensorBlock.m' at line 522
'C:\Program Files\MATLAB\R2024a\toolbox\lidar\lidarsimulink\+lidarsimulink\+internal\LidarSensorBlock.m' at line 52
'C:\Program Files\MATLAB\R2024a\toolbox\simulink\ui\studio\config\m\+SLStudio\StartPauseContinue.p' at line 0
'C:\Program Files\MATLAB\R2024a\toolbox\simulink\ui\studio\config\m\+SLStudio\ToolBars.p' at line 0'.
Caused by:
Unable to find variable 'Actors' in the workspace.
I'm really at a loss here, as I have tried to import from workspace and that did not work either.

Answers (1)

Pavl M.
Pavl M. on 25 Nov 2024 at 5:09
Edited: Pavl M. on 25 Nov 2024 at 5:09
Study more, contact more, get to know better more:
You must specify the actor profiles generated from the scenario in the MATLAB or Model workspace Actor profiles variable name parameter. You can add noise, as well as simulate weather conditions such as rain and fog, using this block. The block outputs point cloud data along with the intensity and segmentation values of the points.
Generate the actor profiles from your driving scenario.
aProfiles = actorProfiles(scenario);
Why to import to the workspace if System Block pointed that can't find already in workspace. Try to export Actors to the workspace by to_workspace block and check which variables are the in workspace.
Pls. let me know.

Categories

Find more on Labeling, Segmentation, and Detection in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!