loam_velodyne icon indicating copy to clipboard operation
loam_velodyne copied to clipboard

Question about relSweepTime and _imuPositionShift

Open sus71 opened this issue 2 years ago • 1 comments

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!

sus71 avatar Jul 10 '21 20:07 sus71

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).

sterngerlach avatar Aug 20 '21 01:08 sterngerlach