Clear Filters
Clear Filters

Velodyne Lidar Code Generation

3 views (last 30 days)
Ahmed Tamer
Ahmed Tamer on 27 Nov 2023
Hi, I am using this tutorial to deploy my velodyne from MATLAB to Nvidia Jetson Nano Developer Kit, now. How do I access the data on Nvidia Jetson Nano Developer Kit?
I run ./readPointCloudFrame.elf, nothing happens.
  1 Comment
Ahmed Tamer
Ahmed Tamer on 27 Nov 2023
Also, is there a way to modify the code so I can actually visualize the pointclouds?

Sign in to comment.

Answers (1)

Abhishek Kumar Singh
Abhishek Kumar Singh on 5 Feb 2024
Hello Ahmed,
I understand you're navigating through the process of working with your Velodyne LiDAR sensor and the NVIDIA Jetson Nano Developer Kit. It seems there might be some confusion regarding your workflow and whether you require real-time I/O capabilities with MATLAB or if you're looking to run a standalone application on the Jetson device.
When you execute the ELF file on your Jetson Nano, the readPointCloudFrame function is likely performing as intended. However, because the code was initially set up for deployment purposes, it might not be configured to automatically output or save the captured data.
To resolve this, you'll need to adjust the readPointCloudFrame function to include a data storage feature, enabling it to write the point cloud data to a file, preferably in MAT format for easy retrieval and analysis within MATLAB.
Here's what you should do after modifying your function:
  1. Recompile the code to reflect these changes.
  2. Run the updated executable on your Jetson Nano. It should now create a MAT file containing the LiDAR data.
If you wish to analyze this data back in MATLAB on your host system, you can transfer the MAT file using the getFile function from MATLAB Coder Support Package for NVIDIA Jetson. For detailed instructions using getFile, please visit the MATLAB documentation here: https://www.mathworks.com/help/coder/nvidia/ref/getfile.html
Once you have the MAT file on your host computer, you can visualize the point cloud data in MATLAB with the following script:
% Load the point cloud data from MAT file
loadedData = load('yourSavedData.mat');
pointCloudData = loadedData.outStruct;
%Visualize the point cloud data
pcshow(pointCloudData);
Also, please note that if real-time I/O is a crucial aspect of your workflow, deploying the application to the Jetson Nano might not be necessary. :)
You can execute the readPointCloudFrame function directly from MATLAB to capture and process the data in real time:
sensorModel = 'VLP16';
calibrationFile = fullfile(pwd, 'VLP16CalibFile.xml');
port = 2368;
pointCloudData = readPointCloudFrame(sensorModel, calibrationFile, port);
This method facilitates an interactive experience with the data, which is particularly useful for development, debugging, and conducting real-time analysis.
I trust this information will assist you in successfully accessing and visualizing your point cloud data.
Best regards.

Categories

Find more on Introduction to Installation and Licensing 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!