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

Rover: support vehicles that cannot reverse #8838

Open
rmackay9 opened this issue Jul 6, 2018 · 1 comment
Open

Rover: support vehicles that cannot reverse #8838

rmackay9 opened this issue Jul 6, 2018 · 1 comment

Comments

@rmackay9
Copy link
Contributor

rmackay9 commented Jul 6, 2018

Rover supports driving towards waypoints in reverse and also reversing the throttle output to slow the vehicle more quickly. In the case of vectored-thrust vehicles (wiki) the steering response should also (probably) be reversed when the throttle is reversed.

We should add support for detecting vehicles that cannot reverse. This could be implemented by adding a new "has_reverse()" method to the AP_MotorsUGV class. Within this method we could check that SERVOx_MIN is less than SERVOx_TRIM.

Features that should check this value include:

  • the DO_SET_REVERSE mission command should only be processed if the vehicle "has_reverse()". This check is probably best done in the mode_auto.cpp's set_reversed() function.
  • Loiter mode should only attempt to backup towards the target if "has_reverse()" is true. This check should probably be done in mode_loiter.cpp (search for, "if destination is behind vehicle").
  • perhaps AR_AttitudeControl's _brake_enable member should be forced to 0/false if "!has_reverse()". This could be done by adding a new accessor to AR_AttitudeControl called, "set_brake_enabled(bool)" and then update it from Rover's one_second_loop() based on the motor library's has_reverse()" function. Perhaps there are other ways as well.

we should document on the wiki how users can specify that the vehicle does not support reversing. I.e manually set SERVOx_MIN to set SERVOx_TRIM.

@goatboy29
Copy link

Has this feature been added yet? I'm looking into making a catamaran style airboat that uses two props with differential thrust for steering. I've heard that a workaround is to just buy RC car esc's that are reversible, but I'd prefer to not have to.
Thanks

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

No branches or pull requests

2 participants