laboshinl / loam_velodyne

Laser Odometry and Mapping (Loam) is a realtime method for state estimation and mapping using a 3D lidar.
http://wiki.ros.org/loam_velodyne
Other
1.71k stars 952 forks source link

Question about relSweepTime and _imuPositionShift #162

Open sus71 opened 3 years ago

sus71 commented 3 years ago

Dear all,

A question about these two variables. Please correct me if I am wrong. The relSweepTime, from my understanding, is the current time relative to the sweep start time, as calculated by toSec(_scanTime - _sweepStart) + relTime; relTime is the point time stamp relative to the scan start time. However, when calculating the _ImuPositionShift, the _imuPositionShift = _imuCur.position - _imuStart.position - _imuStart.velocity relSweepTime indicates that the _imuStart(which is the IMU state at scan start time) is multiplied by the relSweepTime. It results in: velocity from a scan start time duration from a sweep start to current. Why is it not *_imuStart.velocity relTime*? It is a velocity from a scan start time duration from a scan start to current.

And idea on this? Thanks!

sterngerlach commented 3 years ago

In BasicScanRegistration::reset(const Time&), both _scanTime (timestamp of the scan) and _sweepStart (timestamp of the sweep) are set to scanTime, which means that toSec(_scanTime - _sweepTime) is actually 0 in setIMUTransformFor(), and _imuPositionShift becomes _imuCur.position - (_imuStart.position + _imuStart.velocity * relTime).