Reading PointCloud Frames from LIDAR Deployed

1 Ansicht (letzte 30 Tage)
Ahmed Tamer
Ahmed Tamer am 20 Dez. 2023
Beantwortet: Garmit Pant am 5 Jan. 2024
Hello. I tried deploying LIDAR Reading from MATLAB to Jetson Nano using GPU Coder, from this link:
I just edited this code to print the Location + Intensity:
for i = 1:lenOut
fprintf('Frame %d:\n', int32(i));
% Print XYZ coordinates
fprintf('XYZ coordinates:\n');
for j = 1:size(outStruct{1, i}, 1)
fprintf('%.4f %.4f %.4f\n', outStruct{1, i}(j, 1), outStruct{1, i}(j, 2), outStruct{1, i}(j, 3));
end
% Print Intensity values
fprintf('Intensity values:\n');
for j = 1:size(outStruct{2, i}, 1)
fprintf('%u\n', outStruct{2, i}(j)); % Change %d to %u for unsigned integers
end
fprintf('\n'); % Add a separator between frames
pause(0.1);
end
When I tried to run the .elf deployed on Jeson Nano, It keeps printing:
0.00 0.00 0.00 0.00
I keep getting all zeros, so what's the issue now? Does it mean that It's not reading from my LIDAR?

Antworten (1)

Garmit Pant
Garmit Pant am 5 Jan. 2024
Hello Ahmed,
I understand that you are trying to deploy a MATLAB application to a Jetson Nano to read data from a Velodyne LIDAR sensor, but the output shows only zeros when you try to print the location coordinates and intensity.
The issue that you are encountering can be because of the following reasons:
  1. Sensor connection
  • To ensure that the sensor is connected properly and is communicating with your Jetson Nano device, you can try to capture the “timestamps” data from the “read” function as follows:
[pcFrame,timestamps] = read(obj);
  • Print the “timestamps”. If the “timestamps” data is not being captured, there might be an issue with the connection to the sensor. Check if the “port” and “calibrationFile” variables are set properly.
2. Faulty sensor
  • If through the above method, you are able to capture and print the “timestamps” data, then there can be an issue with your sensor since it is not able to capture the point cloud data.
For further understanding on using Velodyne sensors with MATLAB, you can refer to the following MATLAB documentations:
  1. MATLAB ‘velodynelidar’ system object - https://www.mathworks.com/help/releases/R2023a/supportpkg/nvidia/ref/velodynelidar.html
  2. Function to read point cloud data from ‘velodynelidar’ object - https://in.mathworks.com/help/releases/R2023a/supportpkg/nvidia/ref/velodynelidar.read.html
I hope you find the above explanation and suggestions useful!

Produkte


Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by