Skip to content
This repository has been archived by the owner on Dec 30, 2024. It is now read-only.

Commit

Permalink
fix total heading issue in PinpointLocalizer
Browse files Browse the repository at this point in the history
  • Loading branch information
AnyiLin committed Nov 26, 2024
1 parent 6d4cd0f commit 659a22b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ public void setPose(Pose setPose) {
@Override
public void update() {
odo.update();
totalHeading += MathFunctions.getSmallestAngleDifference(odo.getHeading(), previousHeading);
previousHeading = odo.getHeading();
totalHeading += MathFunctions.getSmallestAngleDifference(MathFunctions.normalizeAngle(odo.getHeading()), previousHeading);
previousHeading = MathFunctions.normalizeAngle(odo.getHeading());
}

/**
Expand Down

0 comments on commit 659a22b

Please sign in to comment.