[ROS][refact] Improve conversion node
Goal
Previously, LiDAR conversion node considered pointclouds from LiDAR driver provides points sorted by time. The goal of this MR is to adapt LiDAR conversion node to manage the ill situation. Here is an example of a bad frame from Ouster driver which contains NaN value and bad timestamp order: frame1844.475309.csv
An issue has been mentioned in the Ouster driver repo.
Changes
- Find the min and max value of time in the pointcloud to compute duration
- Use valid points to estimate time and rotation sense
- Check SLAM pointcloud before publishing it
Results
Reproduce
Data
ousterTest.bag
Build
catkin_make --cmake-args -DCMAKE_BUILD_TYPE=Release
Run
roslaunch lidar_slam slam_ouster.launch outdoor:=false
roslaunch ouster_ros replay.launch bag_file:='/path/to/OusterTest.bag' metadata:='/path/to/OusterTest2.json' viz:=false
Checklist
-
Camel case everywhere except for ROS variables/parameters -
Lower case for local variables and lambda functions -
Upper case for members, methods and tool functions (in Utils) -
Precise namespace when calling a function (or this->X or classe.X) -
Align code (for multiline if and while, "&&" or "||" go in upper line to ensure alignement) -
Check your spaces -
between if, while, for and parenthesis -
between operators and variables: e.g. a + b -
after ","
-
-
Mind your commit titles/desc (plurals, he/she + "s", correct tags, title should begin by a verb...) -
Function names should start with a verb, variable names should start with a name -
Macros should be between {} -
Do not use negative boolean (i.e. noJoe) -
Check minimal size of the types (double -> float -> int -> uint) -
Check const and ref in functions arguments -
References should be written "type& name", not "type &name" -
Update documentation -
Add MR labels [ROS]/[ROS2]/[PV] -
If ros/ros2, update task table here -
Add a comment over each non trivial function in header files -
Add a header to each new file
What remains to solve
Edited by Julia Sanchez