This is a primitive version of recording intel LiDAR data to local, using realsense2 c++ API.
Reference : https://github.com/IntelRealSense/librealsense/tree/master/examples
To record 3 groups of data, one every 10 seconds, record all files including point cloud .ply, together with the rgb, depth and infrared photos):
./datasaving -n 3 -i 10
To record in infinite mode, no waiting time between 2 records, using the resolution of 424*240, and recording JUST the PLY files
./datasaving -n -1 -i 0 -f 0 -r 0 -d 0 -l 6
Navigate to librealsense root directory
mkdir build && cd build
cmake ../ -DCMAKE_BUILD_TYPE=Release
sudo make uninstall && make clean && make && sudo make install
Navigate to librealsense root directory
mkdir build && cd build
cmake .. -DBUILD_EXAMPLES=true -DCMAKE_BUILD_TYPE=Release -DFORCE_LIBUVC=true
make -j1
sudo make uninstall && make clean && make && sudo make install
$ cmake .
$ make
./datasaving -n -1 -i 10
$ chmod 777 monitorProcess.sh
./monitorProcess.sh
-n : Numbers of data to record, use -1 to launch an endless record. Default value = -1,
-i : Time period in which we make one record, default value = 0
-p : Use 1 to record point cloud .ply file and 0 to skip it, default value = 1
-r : Use 1 to record real rgb photo and 0 to skip it, default value = 1
-d : Use 1 to record photo colored by the depth and 0 to skip it, default value = 1
-f : Use 1 to record infrared photo and 0 to skip it, default value = 1
-l :
For L515 :
Use 1 to record .ply files in the highest reslution of 1024\*768
Use 2 to record .ply files in a medium resolution of 640\*480 (default mode)
Use 3 to record .ply files in the lowest resolution of 320\*240 in order to save the time and gain a faster data processing.
For D455 :
Use 4 to record .ply files in the highest reslution of 1280\*720
Use 5 to record .ply files in a medium resolution of 848\*480
Use 6 to record .ply files in the lowest resolution of 424\*240 in order to save the time and gain a faster data processing.
-c : Use 0 to record the .ply files without colors and 1 to record the .ply files with colors, default value = 0.
Now support the lowerd resolution 424*240 (FOR D455) for the point cloud files, which saves more time.
A brief benchmark on the resolution 424*240 and .ply files only, platform : LINUX 5.4.0, cpu: Intel(R) Core(TM) i5-1035G7 CPU @ 1.20GHz, stockage NVME SSD
Saving bandwidth : 24.3Mb / s , which is about 7 .ply files per second.
Now support the fast saving mode : save the .ply files without colors will be faster
Time interval is more accurate now : it calculates the time to halt according to the time spent on the las record
All designed parameters are now supported, choose any type of data to be recorded
Continuous record time is shortened to 2 seconds / entire group of data
monitorProcess.sh : a bash program which overlooks the process of datasaving and restarts it when face a crash (Linux)
use chmod command to give the needed authority
time for saving 1 group of data : 6 - 7 seconds
the line of code which makes the program wait for 30 frames is now deleted, but almost no influence on the time a
Parameters' Values : -n : Any value, use -1 to lance an infinite loop. -i : > 10, according to the cpu and stockage
Specify the parameters : -n : total number of picture groups -i : interval between 2 groups
Saving a videoclip under the .bag format
Saving a dotcloud to a .ply file.