Rover Steering Setup for Big Craft / Vehicles

@John_Easton,

By the way, the 64.BIN log looks like it comes from a vehicle running 4.1.0-dev but I’d recommend upgrading to 4.1.3. This older version doesn’t have the improved Vectored Thrust feature (e.g. MOT_VEC_ANGLEMAX parameter is missing).

1 Like

I am absolutely petrified to do this, but I will do so now and post results tomorrow.

1 Like

NAVL1_PERIOD=7 is probably fine. Damping=4 seems excessive. Try 0.8.

1 Like

I will be honest Yuri and Randy, I was very sceptical driving to the lake today with your parameters.

However, it was like a whole different craft. I believe we are now definitely going in the right direction thanks to the both of you.

Have a look at the last section of the log where I reduced the WPT_RADIUS to 10m, and I believe could go even lower.

You guys are rock stars, thank you

2 Likes

@John_Easton,

Great news!

The steering turn rate desired vs actual is looking much better than before.

It’s actually slightly overshooting now so it might help a little to reduce the ATC_STR_RAT_FF from 2.0 to about 1.4.

Also ATC_STR_RAT_P=0 but I think this could safely be increased to 0.2 (to match ATC_STR_RAT_I) but I suspect you won’t see much difference.

Re speed tuning, you could reduce ATC_ACCEL_MAX from 2 to 1.5 or even 1.2. This will just make the vehicle speed up and slow down a little less aggressively during missions.

Really nicely done. Here’s an example of a couple of nice corners. I agree that WP_RADIUS could be reduced even further.

1 Like

Thank you Randy, I think for the first time I’m actually starting to understand what does what.
I have made those changes and will make my way to the lake again tomorrow and let you know.
This is really exciting.

1 Like

Jan9
It was slightly choppy, but very typical of your average mapping day.

Log - Dropbox - File Deleted - Simplify your life

Basic parameters
Jan9 Parameters

Video from 06h50 (wpt 38 to wpt43)

Map - WPT 38 - 43

1 Like

Summary to date: 9 Jan
Still not perfect but we are well on our way I believe.

Parameter changes from the original (yellow) AIMy to now -
Steer:
P was 1,00 now 0,2 (definite improvement)
FF was 0,1 now 1,4 (huge improvement)
Speed:
ACCEL MAX was 1,00 now 1,2
Cruise speed was 0 now 3,2
Cruise throttle was 0 now 45
Navigation:
Turn-G was 0,6 now 0,15 (big improvement)
NavL1 damper was 4,00 now 0,8 (this is the biggest improvement)
Mot Ver Angle was 0 now 25 (definite improvement)
Other:
ATC STR RAT MAX was 360 now 50

Remarks:

  • I think more time should be spent setting parameters in Acro before even starting with Auto as I believe a lot of incorrect parameters are set but are merely being masked by the L1 controller.
  • The current Rover setup in Acro does not work, unless I am doing something wrong, even though I follow Randy’s video step by step but simply cannot get it right.
1 Like

I made that mistake once when Randy made some suggestions. I had worked SO HARD on getting to the point where I thought things were beginning to behave well, and it was extremely difficult to undo some of that work.

However…Randy was 100% correct in his analysis of my situation at the time, and I learned a ton from the experience. I had what amounted to a bunch of offsetting errors in my parameters, and Randy set me on the path to get the controllers to quit arguing with one another :smiley:

2 Likes

Ok, now that the original ‘little AIMy’ is running at about 90%, what parameters should be changed first, and to what for the bigger and heavier 4 meter AIMy?

Stop changing things. Run it for a while. Find the quirks. Hone in on those.

Transfer the experience to the next iteration (or wait for S-Curve navigation to be released and enjoy starting from scratch :slight_smile: )

This is a whole new boat with it’s own controller.

What would be your top 3 changes?

Hi @John_Easton,

I think most of the settings from the other AIMy will work (e.g. ATC_ACCEL_MAX, ATC_TURN_MAX_G and NAVL1_PERIOD and NAVL1_DAMPING) but these few are more specific to the frame:

  • set MOT_VEC_ANGLEMAX to the motor’s max angle offset from center
  • tune ATC_STR_RAT_FF (the turn rate controller’s feed forward value)
  • CRUISE_SPEED and CRUISE_THROTTLE. The original AIMy’s might work for this too or you can send me a long and I’ll give an estimate on what should work. It can also be captured using the “Learn Cruise” auxiliary switch option
1 Like

Thank you Randy, I will do exactly that.
Going to the lake again on Thursday.

1 Like

That did not go well at all.

Here is the log - Dropbox - 00000079.BIN - Simplify your life

Hi John,

Txs for the log, here are a few things I noticed:

  • The steering tuning looked quite good for the first mission in Auto but then things went very badly for the 2nd mission.


    It looks like maybe all the parameters were re-written from a file? In general this isn’t a good thing to do especially if you’re using a file from another vehicle because sensor offsets will also be copied and these are very much autopilot specific. If this is what happened then it would be good to re-do the accelerometer and compass calibration.

    Also I think as part of this some parameters were set to unhelpful values:

    • MOT_VEC_ANGLEMAX was changed from 25 (a good value) back to zero which disabled vectored thrust.
    • ATC_TURN_MAX_G was increased from 0.15 (a good value) to 1.6 (impossibly high). This should be set back to between 0.15 and 0.2
    • ATC_STR_RAT_MAX was increased from 50 (a good value) to 360 (impossibly high). This should be reduced back to 50. ACRO_TURN_RATE should also be reduced to 50.
    • WP_SPEED_MIN was increased from 0 to 2.5 (m/s). This should be reduced back to 0 for now at least. At 2.5 this meant that the vehicle won’t slow down much for corners.

Some other suggestions:

  • CRUISE_SPEED of 3.5 (m/s) and CRUISE_THROTTLE of about 36 should work.
  • ATC_STR_RAT_P and I should be set to 0.2 for now
  • I’m really unsure what the very important ATC_STR_RAT_FF should be set to. It looks like just before the good auto mission it was set to 0.1 which seems really low but maybe the steering mechanism is very different from the other AIMy?
  • LOG_DISARMED = 1 (saves logs when disarmed) but “0” would be better for now because it will mean logs are smaller.

By the way, it does no harm I think but you can remove the “takeoff” command at the beginning of the mission.

Anyway, here’s hoping the next test goes better.

Hi Randy,
First BIG red flag for me - how do I export settings from one craft to the other without the “sensor offsets”?

The steering tuning on the log browser might look good, but this is what AIMy003 on Mission 1 at 06H30 looks like with the settings from AIMy001.

Video -

This is what the ‘Bad’ mission looks like … with the old original settings
07h23 wpt 14 to 17

Video …

Hi @John_Easton,

Re copying parameters, when using MP’s Full Parameter Tree (or Full Parameter List) screen

  • Push the “Compare Params” button
  • Select the parameter file
  • In the ParamCompare window:
    • uncheck the “Check/Uncheck All” button
    • select just the parameters that are important (e.g. those start with ATC_, CRUISE_)
    • press “Continue”
  • Back on the main screen press “Write Params”

1 Like

@John_Easton,

Txs very much for the pictures and video. Those really made it easy to understand.

So the crazy turns in the 1st part of the mission are caused by:

  • ATC_STR_RAT_FF of 1.4 is too high leading to overshoot in the turn rate
  • NAVL1_PERIOD (aka “Lat Acc Cntl Period”) of “6” is too low (i.e. too aggressive)

So the higher level navigation controller was aggressively trying to keep the vehicle on the path and the lower level turn rate controller was overshooting.

In the 2nd part of the mission you got it partially correct by:

  • reducing the ATC_STR_RAT_FF to 0.8
  • increasing NAVL1_PERIOD to 9 ← this could be raised even higher to 12

… but some of the other changes were counter productive:

  • increasing the ATC_TURN_MAX_G to 1.6G
  • setting MOT_VEC_ANGLEMAX = 0 to disable vectored thrust

So I think these parameter settings would be an improvement:

  • MOT_VEC_ANGLEMAX = 25 ← this is really important
  • ATC_TURN_MAX_G = 0.15 ← raising this too high hides other problems
  • ATC_STR_RAT_MAX = 50 ← raising this too high hides other problems
  • ACRO_TURN_RATE = 50
  • WP_SPEED_MIN = 0

Txs again for your patience and feedback. I’ve become more motivated to create an autotune feature…