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
[feature request] add penalty for switching forward/reverse (carlike) #323
Comments
@VRichardJP Nice work Richard, is there a possibility to share with me the implementation to test it and give some feedback ? |
Hi, sorry I don't have much time to make a clean pull request, but the piece of code I showed above is pretty much the whole implementation, so it should not be very difficult to reproduce. I really just followed the existing code design to fit in the new function/variables/parameters |
Thank you Vincent, i'll implement and test it and give some feedback ! |
Currently, teb_local_planner assumes it is possible to instantly switch from going forward to going backward (and from backward to forward) with no penalty (e.g. with constant acceleration from +1.0 to -1.0)
However for carlike robots it is not the case most of the time: because of the mechanical gear change, the robot needs first to stop, handle the gear change then can drive backward.
Because of that, the teb_local_planner may select very impracticable paths for the carlike robot.
For instance, if the robot is asked to turn around in place, the planner may find that doing many mini-turns going back and forth in place is a good solution, while a more practical (and way faster) way would be to do some kind of 3-point turn.
For example, this problem could be solved by adding a new parameter "reverse_gear_switch_time", which would be added to the path time travel whenever the robot's velocity would change sign.
The text was updated successfully, but these errors were encountered: