Rover S-Curves alpha testing

I’ll venture a guess that weather/surf conditions were significantly different between your previous, very clean results, and the more recent, uglier nav tracking.

It’s very possible that under calmer conditions, you were able to aggressively increase the position controller gains without penalty. I’m guessing you had a northeasterly or southwesterly wind on the subsequent run, which caused enough disturbance to set up the observed oscillation.

If the wind/weather conditions were near identical, are there other factors that changed between the two sessions? Physical changes to the vehicle, other parameters changed?

Before we simply blame the firmware, we have to look at factors that may have contributed to the observed difference in behavior.

Hey Yuri,

  • From the photo of the first test you will notice a light 5knt breeze blowing while yesterday it was dead calm so we can scratch that off the list.
  • Physically nothing was changed on the craft.
  • The only thing that was changed was an issue where the script wouldn’t run so we changed the SCR_HEAP_SIZE from 102,400 to 44,032

Another difference - your first test was nearly all sharp corners, and I’m assuming they were pivot turns, whereas the second included many shallower turns. Perhaps the pivot turn parameters are well defined but the acceleration values for shallower turn angles need some attention.

1 Like

Hi @John_Easton,

Sorry I haven’t looked at your log yet (it is “golden week” here in Japan so I’m not around as much). I’m pretty sure this is just going to be “disturbance rejection” issue. So we may need a big more P, I and maybe some D in either the turn rate controller or the position controller parameters.

I’m sure we can make it better.

1 Like

Thank you Randy, I will give it a try in the morning.

Hi @John_Easton,

Sorry again about the delay.

So I had a look and here are few suggestions:

  • reduce PSC_VEL_I and PSC_VEL_D to 0
  • reduce ATC_TURN_MAX_G from 0.6 to 0.2
  • enable vectored thrust by setting MOT_VEC_ANGLEMAX = 35 or whatever the angle between steering’s middle position and maximum position is.

This last step though could require that we re-tune the ATC_STR_RAT_FF, P and I so I’m happy to do another voice call to re-do that.

BTW, if FRAME_CLASS is set to 2 (Boat) the vehicle will switch to Loiter when it is done a mission.

1 Like

Thank you Randy, I will certainly give it another go this coming week.

1 Like

Which parameter controls the ‘path wobble’ as seen in image?

With the help of Randy giving assistance live on the water we managed to get AIMy to run much better on the straights with minimal ‘wobble’ less than 0,7m.

On a larger more complex mission the turns to starboard (right) seem pretty good …

But the port (left) turns seem to create a bit of inaccuracy …

Any suggestions from the pros?

1 Like

@rmackay9,

I think I’ve discovered the root cause for the sometimes violent oscillation that happens when my mower exits pivot turns and I’ve got the position controller tuned a bit more aggressively. The front wheels are on casters. When there is a pivot turn of any significant angle, those wheels are still canted when forward motion resumes, resulting in a “nudge” to one side as they straighten. It’s that nudge that seems to set up the oscillation.

I wonder if better results might be possible if I use a Lua script to dynamically update the position controller’s D term? In other words, set it near zero when speed is near zero, then set it to a more appropriately tuned value once the speed increases a bit (which would presumably be after that front wheel nudge).

1 Like

Are your props counter-rotating? If not, I suspect turns in one direction might perform slightly differently than turns in the other, and you may be stuck with finding a happy medium.

Love the video. Perhaps try using your right big toe instead of your left big toe to hold the telemetry radio? :slight_smile: Maybe that will fix it.

1 Like

Decided to take AIMy (SKII) for a quick test before being sent off on a project, and the results were terrible.
Nothing has been changed (at least that I know of).
Something I did notice is that she was slowing down unnecessarily for slight heading change wpts, where she was only doing that on tight acute angle heading changes before.

LOG here - Dropbox - 00000025.BIN - Simplify your life

This is the previous test I did when all seemed fine - Dropbox - 00000005.BIN - Simplify your life

You can hear the throttle shut down excessively, then totally over throttle when it realises it has over corrected for the wpt.

Hi everyone,

I’ve been trying to get an AgileX Scout Mini working with S-Curve, but I seem to be having issues with the L1 controller. The heading for the next goal wanders all over the place in Mission Planner, which seems to be causing the robot to wander around. Usually it heads up heading in a southerly direction, but I don’t know if this is simply coincidental: I don’t have access to a larger area at the moment to run larger scale tests.

The params I’m using have worked before, with some simple waypoint following around some small copses of trees and performed reasonably well with the rover-42dev-scurves-matekh743-05Mar2022 firmware, so I’m not sure what I’ve messed up for the robot to display this behaviour.

I tried the params @Yuri_Rage suggested, but didn’t seem to have an appreciable effect. If someone wouldn’t mind have a glance over the attached logs, I’d much appreciate their input on the problem!

https://ftp.gmv.com/pydio/data/public/cd1705

First, update your firmware to the latest. SCurve nav has been incorporated into master.

ArduPilot firmware : /Rover/latest

1 Like

Hi Yuri, and thanks for the quick reply!

Updated, and the rover reversed immediately, as soon as I allowed the flight controller to command the motors to start the plan (separate switch on the joystick, by-passing the flight controller). This happens even when it is disarmed in Mission Planner.

I inspected the servo data, and the throttle seems to be sitting at 0, ignoring the trim being set at 1500 and the min value. I can’t confirm if this behaviour is the same in both auto and manual, as manual is not in the mode list (I noticed that sometimes the modes are what I believe to be ArduCopter, instead of ArduRover. It sometimes corrects itself after a little while, but not all the time, and updates the mode list.).

With the throttle being set to 0, that is full reverse, and it doesn’t seem to be updated at all during plan execution, though the Ground Steering seems to be working. Same params loaded.

ARMING_REQUIRE is set to 1, so when disarmed it should be sitting at THR_MIN_PWM… But this doesn’t seem to be the case.

Something in your basic setup is misconfigured. Are you sure you loaded the Rover firmware?

I have also noticed a quirk with some RC protocols and the throttle channel (drove us nuts on @ktrussell’s new build last weekend).

Try swapping your pitch and throttle channels in the transmitter, and use the RCMAP parameters to match the transmitter settings as desired.

I believe I’m using the Rover firmware…
image
Unless Mission Planner is reporting the incorrect version.
I’ll try your suggestion with the channels