livox_scanner
livox_scanner copied to clipboard
One single scan and timestamp saving filename
Hi everyone, I am not a developer, btw after many attempts I was able to use 360 degree livox scans. Now I would like to edit the source code to perform Just one single full scan and save the point clouds with a time stamp name.
With the original code, the lidar scan back and forth and it never stops.
I'd like to: 1 - make just one revolution of the servo (one time back and forth) 2- save the point cloud file with timestamp in the name.
-
For the first one, It is correct to modify the code in this file https://github.com/Livox-SDK/livox_scanner/blob/master/scanner_publisher/src/pointcloud_publisher.cpp as below?
-
For the second one please help me where to start.
Thanks in advance
#in the first part of the file, at line n. 43 I put this
X = glb_angle -3
Y = glb_angle -2
#in the loop part at line n. 153 I put this instead of the existing loop
#in the beginning the servo start clockwise:
if (glb_angle != X)
target_rpm = setting_speed;
#if it arrives near the starting position, it came back counterclockwise
if (glb_angle = X)
target_rpm = -setting_speed;
#when It finally arrive to the end point, It have to stop
if (glb_angle = Y)
target_rpm = 0;
#here I would like that It exit and save the cloudpoint with a timestamp.