Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions about the interpolation of laser point. #159

Open
cpkingw opened this issue Sep 28, 2020 · 3 comments
Open

Questions about the interpolation of laser point. #159

cpkingw opened this issue Sep 28, 2020 · 3 comments

Comments

@cpkingw
Copy link

cpkingw commented Sep 28, 2020

It seems that _scanTime is the timestamp of the previous laser frame, because the update of the _scanTime or _sweepStart in the reset() is behind the the interpolation of laser point via projectPointToStartOfSweep(). When doing interpolation of point in current laser frame, Shouldn't it be the timestamp of the current frame?

void BasicScanRegistration::interpolateIMUStateFor(const float &relTime, IMUState &outputState)
{
  double timeDiff = toSec(_scanTime - _imuHistory[_imuIdx].stamp) + relTime;
  while (_imuIdx < _imuHistory.size() - 1 && timeDiff > 0) {
    _imuIdx++;
    timeDiff = toSec(_scanTime - _imuHistory[_imuIdx].stamp) + relTime;
  }
  ...
}
void BasicScanRegistration::reset(const Time& scanTime)
{
  _scanTime = scanTime;

  // re-initialize IMU start index and state
  _imuIdx = 0;
  if (hasIMUData()) {
    interpolateIMUStateFor(0, _imuStart);
  }

  // clear internal cloud buffers at the beginning of a sweep
  if (true/*newSweep*/) {
    _sweepStart = scanTime;
    ...
  }
}
@arshhhly
Copy link

arshhhly commented Jan 8, 2021

I think it is a mistake.

@gackes
Copy link

gackes commented Jul 26, 2021

Have you solved the problem? I have the same doubt. @cpkingw

@cpkingw
Copy link
Author

cpkingw commented Aug 3, 2021

Have you solved the problem? I have the same doubt. @cpkingw

I think you can try to update the _scanTime in projectPointToStartOfSweep() firstly by adding scanTime as a new argument like processScanlines(scanTime, _laserCloudScans)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants