Skip to content

Commit 941b0c5

Browse files
gennartanenricosutera
authored andcommitted
[RotationShimController] rotate also on short paths (ros-navigation#4290)
When the path is shorter than ´forward_sampling_distance´ the rotatitonShimController would directly give control to the primary controller to navigate to the goal. This would lead to the exact behavior that was tried to be fixed by the rotationShimController: "The result is an awkward, stuttering, or whipping around behavior" [1]. It often resulted in navigation failure. In this case, the controller should try to rotate towards the last point of the path, so that the primary controller can have a better starting orientation. [1] https://navigation.ros.org/tuning/index.html#rotate-in-place-behavior Signed-off-by: enricosutera <[email protected]>
1 parent 32df134 commit 941b0c5

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

nav2_rotation_shim_controller/src/nav2_rotation_shim_controller.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,7 @@ geometry_msgs::msg::PoseStamped RotationShimController::getSampledPathPt()
195195
}
196196
}
197197

198-
throw nav2_core::ControllerException(
199-
std::string(
200-
"Unable to find a sampling point at least %0.2f from the robot,"
201-
"passing off to primary controller plugin.", forward_sampling_distance_));
198+
return current_path_.poses.back();
202199
}
203200

204201
geometry_msgs::msg::Pose

0 commit comments

Comments
 (0)