prl-mushr/mushr

Going in reverse

Opened this issue · 3 comments

Hi, I want the car to switch behavior from going forward to going in reverse based on the path that I give. Right now, the car goes all the time forward and I am not sure how to switch to the reverse behavior automatically based on the path the controller receives.

Would you be able to help me with this?

Many thanks for considering my request.

Hi!

You may using an older version of the mushr_rhc. In the old version, only forward velocities were being sampled. In the noetic branch, it should sample forward, 0, and reverse. This is how it is currently implemented.

If you wish to not change branches, you can take the logic used in the noetic branch and sample forward, 0 and reverse actions.

Hope this helps.

Thanks,
Regards,
Sid.

Not sure I am following. I have noetic branch and mushr_base and then I have my own controller implemented that is just a simple controller to follow the path that I am giving. I am not s sure if it supposed to just go in reverse automatically if I give negative velocity and backward waypoints (and right now this is not happening) and I am not sure if the problem is mine or if there is something I need to set up in the vesc to make the reverse maneuver happening

I see. If you're doing this on a real car, could you place it on a block such that the tires don't touch the ground, and hardcode the commanded velocity in your controller to always be negative? If the wheels move backwards, it may be a bug in your code.

Thanks,
Regards,
Sid