-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Feature request
Feature description
Problem:
The rotation shim controller uses normal tolerance-based goal checking for the x-y goal. Once the tolerance is matched, it starts the rotation cycle.
Code: https://github.com/ros-navigation/navigation2/blob/5423eba732ed16b4f97a7353027c1f444b6edc60/nav2_rotation_shim_controller/include/nav2_rotation_shim_controller/tools/utils.hpp#L33C1-L33C41
The problem we are facing is that due to localisation shifts, it goes back into primary controller mode if the x-y shift is outside the tolerance, causing back-and-forth Rotation and translation switches.
Implementation considerations
Solution:
Since goal_checker already implements the stateful feature, and goal_checker pointer is available in the withinPositionGoalTolerance, we can use isGoalReached function of the goal checker instead of comparing ourselves. isGoalReached will take care of the stateful feature. Ref:
| // If we are stateful, change the state. |