Skip to content

Commit

Permalink
Update winding angle to take the safe angle between two angles.
Browse files Browse the repository at this point in the history
  • Loading branch information
oscardegroot committed Jan 9, 2025
1 parent 463d847 commit 2c41883
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/homotopy_comparison/winding_angle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ namespace GuidancePlanner
double angle = std::atan2(relative_position(1), relative_position(0)); // Current angle

if (k > 1)
lambda += angle - prev_angle; // Relative angle
lambda += RosTools::angularDifference(prev_angle, angle); // angle - prev_angle, but safe

prev_angle = angle;
}
Expand Down

0 comments on commit 2c41883

Please sign in to comment.