Remove inclination warning (#231)

Resolves #194.
master
Juraj Oršulić 2017-03-30 16:39:53 +02:00 committed by Wolfgang Hess
parent 28da207c4d
commit cb0d1a6d5a
1 changed files with 0 additions and 10 deletions

View File

@ -258,16 +258,6 @@ void LocalTrajectoryBuilder::AddImuData(
Predict(time); Predict(time);
imu_tracker_->AddImuLinearAccelerationObservation(linear_acceleration); imu_tracker_->AddImuLinearAccelerationObservation(linear_acceleration);
imu_tracker_->AddImuAngularVelocityObservation(angular_velocity); imu_tracker_->AddImuAngularVelocityObservation(angular_velocity);
// Log a warning if the backpack inclination exceeds 20 degrees. In these
// cases, it's very likely that 2D SLAM will fail.
const Eigen::Vector3d gravity_direction =
imu_tracker_->orientation() * Eigen::Vector3d::UnitZ();
const double inclination = std::acos(gravity_direction.z());
constexpr double kMaxInclination = common::DegToRad(20.);
LOG_IF_EVERY_N(WARNING, inclination > kMaxInclination, 1000)
<< "Max inclination exceeded: " << common::RadToDeg(inclination) << " > "
<< common::RadToDeg(kMaxInclination);
} }
void LocalTrajectoryBuilder::AddOdometerData( void LocalTrajectoryBuilder::AddOdometerData(