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: add autotune for steering, throttle, navigation control #8851

Closed
rmackay9 opened this issue Jul 9, 2018 · 11 comments
Closed

Rover: add autotune for steering, throttle, navigation control #8851

rmackay9 opened this issue Jul 9, 2018 · 11 comments

Comments

@rmackay9
Copy link
Contributor

rmackay9 commented Jul 9, 2018

Although we have decent tuning guides for steering and speed it could be faster/more accurate if we added an autotune mode that captures/learns things including:

  • max rotation rate of the vehicle (ATC_STR_RAT_MAX)
  • maximum lateral acceleration (TURN_MAX_G)
  • steering rate control (ATC_STR_RAT_FF, ATC_STR_RAT_P, etc)
  • throttle/speed control (CRUISE_SPEED, CRUISE_THROTTLE, ATC_THR_P, etc)

This request first came up from RoboBill on this discussion.

@rmackay9 rmackay9 changed the title Rover: add autotune for steering and throttle control (at least) Rover: add autotune for steering, throttle, navigation control Jul 9, 2018
@vkrm1612
Copy link

vkrm1612 commented Apr 5, 2022

I would like to work on this issue for GSOC

@rajeck1234
Copy link

@rmackay9 Hlw I am Utkarsh Kumar from IIT Kharagpur 3rd year BTech student and I want to contribute to this gsoc 2023 project
please provide me information about where I should learn and grasp knowledge that should be benificial in the coming days. thankyou

@fibonacci35813
Copy link

@rmackay9 I have been working on this for some time and would like to work on this issue for GSoC 2023. I will try to create a PR related to this in some time.

@rmackay9
Copy link
Contributor Author

This is done now with the introduction of QuikTune https://ardupilot.org/rover/docs/quiktune.html

@bijuthaj
Copy link

bijuthaj commented Dec 22, 2024

Is there any plan to make autotune as a mode for rover? Requesting for controller with no lua script support

@rmackay9
Copy link
Contributor Author

Hi @bijuthaj,

No plans for that at the moment I'm afraid. It's certainly possible but some H7 based autopilots are relatively inexpensive and light so there are already hardware solutions out there i think.

@bijuthaj
Copy link

bijuthaj commented Jan 3, 2025

Hi @rmackay9
I was trying to add the auto tune as a mode for Rover. I have done the code changes by converting your lua script. I tested it with SITL and it seems working. But when I tested this with HITL on SpeedyBeeF405 board its getting crashed when switch to auto tune mode (17).
The code is here in this repo.
https://github.com/bijuthaj/ardupilot/blob/rover_autotune/Rover/mode.h
https://github.com/bijuthaj/ardupilot/blob/rover_autotune/Rover/mode_autotune.cpp

00000001.zip
00000002.zip

I couldn't download the crash dump its getting error. Not able to figure out the issue. Can you help me on this? Also like to know whether this approach is fine.

Below is the sequence of commands used from mavproxy.
MANUAL> rc 1 1500
MANUAL> rc 3 1500
MANUAL> arm throttle
MANUAL> mode circle
MANUAL> mode 17
CIRCLE> CIRCLE>
Mode(17)> Mode(17)>
Mode(17)>
Mode(17)>

@rmackay9
Copy link
Contributor Author

rmackay9 commented Jan 4, 2025

Hi @bijuthaj, ok, wow, that's quite impressive. I don't think I'll be able to go through it all and debug the issue. Instead I think you'll need to go through it and try and break down exactly where its failing. Sorry about that, it's just that I've already got quite a few thing on my plate at the moment

@bijuthaj
Copy link

bijuthaj commented Jan 4, 2025

Sure....I got it! Thanks @rmackay9 I will try to figure it out. I was thinking of making the auto tune run as a sub mode of circle mode. So from circle mode user can switch to auto tune mode and the tuning will happen. On SITL I could see that rover continues on circle after I switched to auto tune mode. But I'm not sure this the correct way to do it? Is it the correct way t do it and the approach possible? Any thing I need to consider?

@rmackay9
Copy link
Contributor Author

rmackay9 commented Jan 4, 2025

@bijuthaj,

I think testing with SITL is a much better idea than trying to use HITL.

@bijuthaj
Copy link

Hi @rmackay9
I have completed the changes and raised a PR #29032
When you get a chance can you or someone from team could review it?

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

5 participants