undistort points
narutojxl opened this issue · 2 comments
Hi doctor jiao @gogojjh,
Thanks for your excellent work and sharing to the community ! I download the smaller bag RHD
to test.
- Q1: When we undistort points, is it a typo
pose_undist[IDX_REF]
, it seems thatpose_undist[n]
?
In config yaml file, IDX_REF default value is 0. So the pose_undist[0] is laser0 from k frame to k+1 frame delta transform, pose_undist[1] is the laser1 sensor.
M-LOAM/estimator/src/estimator/estimator.cpp
Lines 403 to 405 in 2276310
- Q2: When we assign
cur_feature_
to theprev_feature_
, wherecur_feature_
is the raw current feature points, not be deskewed. I found in theEstimator::undistortMeasurements()
function, we evently convert current feature points intocurrent end
instant according to the estimated relative transform from k to k+1 frame. If we after this moment assigncur_feature_
to theprev_feature_
, theprev_feature_
is current feature points incurrent end instant
. Then for next frame loop, we convert current feature points intocurrent start instant
using the linearly and slerp interpolation of last estimated delta transform, accordint to every point's time ratio,
feature_extract.hpp#L154 && #292: TransformToStart(cloud_data.points[i], point_sel, pose_local, false, SCAN_PERIOD);
it seems make sense as prev_feature
kd-tree points and the cur_feature_
points in the same frame. I'm not sure i correctly understand code totally.
M-LOAM/estimator/src/estimator/estimator.cpp
Lines 532 to 543 in 2276310
M-LOAM/estimator/src/lidarTracker/lidar_tracker.cpp
Lines 58 to 59 in 2276310
-
Q3: In the above,
TransformToStart(cloud_data.points[i], point_sel, pose_local, false, SCAN_PERIOD);
feature_extract.hpp#L292, why we callTransformToStart()
withb_distortion = false
. According to my understanding, i think we should call withb_distortion = true
, because current feature points is raw points, not be deskewed. I don't understand this code. -
BTW: should we comment this line?
M-LOAM/estimator/src/rosNodeRHD.cpp
Line 213 in 2276310
If i don't describle my problem clearly, please tell me, i will add more info. Look forward to discuss with you, thanks for your help and time in advance!
Best regards
jxl
Q1: should be n, I have fixed this issue, but not tested...
Q2: In our design, the deskewed points are only used in lidar mapping, and not fed to the odometry.
Q3: setting b_distortion=true may not get good results .... so we set b_distortion=false. May two reasons make the results worse: 1. since the timestamp is given to each point according to its relative horizontal angle to the starting angle, this assumption may be not always correct; 2. the undistortMeasurements()
may exist some bugs that we haven't figured out ...
Q4: you cannot comment this line. When NUM_OF_LASER=1
, this line can give a valid pointer to sublidar[1]
. This can prevent the segmentation fault of line 216.