Input dataset preperation to groundTruthLidar

Hi there,
I have done a clustering-based 3D object detection based on Lidar point cloud, with a result of [x, y, z, h, w, l, yaw]. I can append two 0 to make it a N*9 array. However, it seems for Cuboid, groundTruthLidar only accepts [xmin, ymin, zmin, width, height, depth, 0, 0, 0], i.e., no yaw. Is it true? Is there a way to include yaw for 3D bounding boxes? The error message is attached below:
Invalid entry in label data table for Cuboid labelType. Table entries for column must be M-by-9 matrices of [xmin, ymin, zmin, width, height, depth, 0, 0, 0]. Please refer to groundTruthLidar object.
Thank you for your time.
Kind regards,
Chenyu

4 Comments

That is odd. The definition for labeldata Cuboid https://www.mathworks.com/help/lidar/ref/groundtruthlidar.html#mw_4ba93ad9-d2ac-4454-a74c-315d2fcf4824 does not mention any restriction on the rotation angles.
Which MATLAB release are you using?
Hi Walter,
I am using R2024b.
Besides that, could it be the dataSource issue? It seems a bit weird. I have extracted a folder of .pcd files from a ros2 bag, and I am using the code below to create the dataSource:
sourceName = '/home/chenyu/Data/lidar_pcd'; % full path to your local bag file
sourceParams = struct();
sourceParams.TopicName = '/ouster/points'; % replace with the actual topic from your bag
dataSource = vision.labeler.loading.PointCloudSequenceSource;
dataSource.loadSource(sourceName,sourceParams);
The dataSource variable content is attached, it seems nothing has been loaded. Could you give me some instructions?
Chenyu
Hi Chenyu,
Can you share your code for initializing the groundTruthLidar object?
Thanks!

Sign in to comment.

Answers (0)

Asked:

on 4 Jul 2025

Commented:

on 7 Jul 2025

Community Treasure Hunt

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

Start Hunting!