-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nav2 Regulated Pure Pursuit set with Ackermann model skips driving maneuvers given by path planner #4757
Comments
This is a really helpful comment. Can you look at the path pruning behavior between them and identify the difference? I assume there's some cusp detection in MPPI that isn't in RPP (yet) and it may be just as easy as porting it over to RPP as well. MPPI's path handler was originally based on RPP's, so any changes should be pretty straight forward to migrate over and test! Highly relevant files: |
@SteveMacenski you got the point (of course I would say). I'm checking it but in the meantime I found this while MPPI has path_handler.cpp in humble branch. Does it is supposed to be like that? |
It looks like it is in the controller still in Humble (https://github.com/ros-navigation/navigation2/blob/humble/nav2_regulated_pure_pursuit_controller/src/regulated_pure_pursuit_controller.cpp) - so I'd recommend doing it on You could, in concept, work on humble, but then we'd need to forward port it to |
To me looks like the RPP clamps the furthest point of local plan with this
while MPPI use basically the same approach but make use of navigation2/nav2_mppi_controller/src/path_handler.cpp Lines 57 to 60 in e52ea5d
with this:
and parameters should be added to RPP as well as we find in MPPI: navigation2/nav2_mppi_controller/src/path_handler.cpp Lines 40 to 44 in e52ea5d
|
Seems reasonable! Can you test that out and submit a PR if it resolves your issue? :- ) |
yes, let me try. |
@SteveMacenski in regulated_pure_pursuit_controller.cpp I found this: navigation2/nav2_regulated_pure_pursuit_controller/src/regulated_pure_pursuit_controller.cpp Lines 494 to 536 in e52ea5d
it seems the cusp detection in RPP is handled by controller.cpp and not by path_handler.cpp. I will work on this rather than path_handler.cpp |
ok, made it. I attached a short video in PR to show how things works. |
Hi @andreacelani! I reviewed your PR but it needs some updates. Can you take a look and revise the PR so we can get this merged :-) |
Bug report
Required Info:
Issue Description:
Nav2 Regulated Pure Pursuit set with Ackermann model skips driving maneuvers given by path planner. It jumps to the farthest point in the lookahaed radius skipping fundamental maneuvers to follow global path .
Steps to reproduce issue
1- Configure an Ackermann steering vehicle with the Nav2 stack, kinematically feasible planner, like Smac Planner, and RPP controller. In my case the robot model is an Ackermann based robot of a real agricultural tractor. Wheel base around 2 meters, minimum turning radius 4.2 meters, track 1.6 meters rear and 1.4 meters front.
2- Plan a path without re-planning (one single plan).
3- Observe the vehicle's behavior while executing the planned path, particularly during the reverse segments.
Here are the parameters of controller.
Note: these settings turn on the
use_regulated_linear_velocity_scaling
and themin_lookahead_dist
has been set to very low value. The aim is to show that even if the controller could search with very limited horizon it will skip large portion of planned path.And parameters of planner
Expected behavior
The controller should follow more strictly every single segments (points) of planned path in forward direction and reversed direction.
Actual behavior
the purple point is the lookahead target.
The simulation is pretty large and the realtime ratio is 15%. This explains the somewhat chomping progress of the video
The robot start going backward, then try to follow strictly the planned forward path but at given point it skips to the longest segment.
The final trajectory is far from what has been planned by Smac planner and it hits the obstacles (actually it stops since
use_collision_detection
is set to True)test2.webm
Additional information
It looks like the lookahead algorithm push the controller to choose a shortcut over the complete planned path. It ignores the chronological order of planned points. The pruning to the closest point could be the source of the unexpected behavior.
I tested also MPPI and it follows the driving maneuvers "more strictly". By the way I prefer RPP since MPPI is too complex to tune. At this time I didn't find a set of parameters that reduce the noisy steering behavior that MPPI has. Don't get me wrong the MPPI is far more complex and I suppose far better than RPP but I cannot make it to work efficenty.
The text was updated successfully, but these errors were encountered: