Fixed wrongly yaw reset instead of pitch when resetting odometry to a pose with Force2D enabled

This commit is contained in:
matlabbe
2015-12-07 10:19:08 -05:00
parent 60f34fe994
commit 6c452137b2

View File

@@ -124,13 +124,13 @@ void Odometry::reset(const Transform & initialPose)
if(_force2D)
{
if(z != 0.0f || roll != 0.0f || yaw != 0.0f)
if(z != 0.0f || roll != 0.0f || pitch != 0.0f)
{
UWARN("Force2D=true and the initial pose contains z, roll or pitch values (%s). They are set to null.", initialPose.prettyPrint().c_str());
}
z = 0;
roll = 0;
yaw = 0;
pitch = 0;
Transform pose(x, y, z, roll, pitch, yaw);
_pose = pose;
}