mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
Fixed wrongly yaw reset instead of pitch when resetting odometry to a pose with Force2D enabled
This commit is contained in:
@@ -124,13 +124,13 @@ void Odometry::reset(const Transform & initialPose)
|
|||||||
|
|
||||||
if(_force2D)
|
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());
|
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;
|
z = 0;
|
||||||
roll = 0;
|
roll = 0;
|
||||||
yaw = 0;
|
pitch = 0;
|
||||||
Transform pose(x, y, z, roll, pitch, yaw);
|
Transform pose(x, y, z, roll, pitch, yaw);
|
||||||
_pose = pose;
|
_pose = pose;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user