mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 17:40:23 +08:00
IMU: changed members from Eigen to cv to avoid seg faults about Eigen memory alignment when copying IMU object created dynamically (#270)
This commit is contained in:
@@ -121,13 +121,13 @@ void IMUThread::mainLoop()
|
||||
std::string nanoseconds = s.substr(s.size() - 9, 9);
|
||||
std::string seconds = s.substr(0, s.size() - 9);
|
||||
|
||||
Eigen::Vector3d gyr;
|
||||
cv::Vec3d gyr;
|
||||
for (int j = 0; j < 3; ++j) {
|
||||
std::getline(stream, s, ',');
|
||||
gyr[j] = uStr2Double(s);
|
||||
}
|
||||
|
||||
Eigen::Vector3d acc;
|
||||
cv::Vec3d acc;
|
||||
for (int j = 0; j < 3; ++j) {
|
||||
std::getline(stream, s, ',');
|
||||
acc[j] = uStr2Double(s);
|
||||
|
||||
@@ -200,7 +200,9 @@ Transform OdometryOkvis::computeTransform(
|
||||
data.imu().angularVelocity()[2]);
|
||||
if(okvisEstimator_ != 0)
|
||||
{
|
||||
imuUpdated = okvisEstimator_->addImuMeasurement(timeOkvis, data.imu().linearAcceleration(), data.imu().angularVelocity());
|
||||
Eigen::Vector3d acc(data.imu().linearAcceleration()[0], data.imu().linearAcceleration()[1], data.imu().linearAcceleration()[2]);
|
||||
Eigen::Vector3d ang(data.imu().angularVelocity()[0], data.imu().angularVelocity()[1], data.imu().angularVelocity()[2]);
|
||||
imuUpdated = okvisEstimator_->addImuMeasurement(timeOkvis, acc, ang);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user