Skip to content
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

Going in reverse #116

Open
fb1812 opened this issue Feb 6, 2024 · 3 comments
Open

Going in reverse #116

fb1812 opened this issue Feb 6, 2024 · 3 comments

Comments

@fb1812
Copy link

fb1812 commented Feb 6, 2024

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.

@sidtalia
Copy link

sidtalia commented Feb 6, 2024

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.

@fb1812
Copy link
Author

fb1812 commented Feb 6, 2024

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

@sidtalia
Copy link

sidtalia commented Feb 6, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants