How to solve ROVER meandering?

ok, I just updated to the “beta5”
now I’m just waiting for a new motor so I can test it again
I let you know soon

Thank you

2 Likes

Hello Randy

ok, I did what you asked,
here are my log files
thank you

https://drive.google.com/drive/folders/1mXwIMkAz1bWGA4fQTFZURXB0RLkuvQH4?usp=sharing

@luigi,

Thanks for the log.

  • top speed is about 8.5m/s
  • maximum forward-back acceleration is about 2m/s/s
  • max turn rate is about 50deg/sec

Here are some more paramter changes that may help:

  • ACRO_TURN_RATE,50 (was 80)
  • ATC_STR_RAT_MAX,50 (was 80)
  • ATC_ACCEL_MAX,1 (was 0.5)

The speed controller looks pretty OK but the vehicle isn’t turning well. In particular it sometimes doesn’t seem able to turn left. Here is a graph showing a moment where the pilot is command a left turn, the right motor is at full speed, the left motor is near neutral but the vehicle does not turn left. I suspect this is a mechanical issue of some sort, do you have any idea why this might happen?

By the way, have you tried the motor test to confirm that the motors spin at the same throttle percentage? Try using the motor test screen and confirm that both motors start spinning at the same throttle percentage (e.g. 2%). You may need to lower MOT_THR_MIN back to zero to check when each motor starts spinning.

It also might be interesting to set the minimum servo output for both servo1 and servo2 to 1400. I suspect this won’t make any difference though.

  • SERVO1_MIN,1400 (was 1100)
  • SERVO2_MIN,1400 (was 1100)

Please remember to be safe and take the propellers off when making these parameter changes. After changing the SERVOx_ parameter reboot the autotpilot and test it again (with the propellers still off) to make sure the motors seems to be turning correctly.

Thanks for the help, I appreciate it a lot.
I’ll make the changes and go out to test it again soon.

“suspect, this is a mechanical issue of some sort, do you have any idea why this might happen?”

I don’t know what’s going here, but the ESC I’m using might don’t be the right one for this type of vehicle. any recommendation on ESC that could work better on this type vehicle

@luigi,

Re ESCs I don’t have any particular suggestions but perhaps use a BLHeli compatible ESC or just a regular PWM ESC meant for multicopters.

… if it spins it should work though…

maybe it would be good to setup battery monitoring as well so we can see if the battery voltage is stable or not.

Hello Randy
I made the changes suggested:
1.- I did redo the Motor calibration: both motors spin at 15%
2.- I changed the SERVO1/2_MIN to1400, for some reason, everything went crazy ( I don’t know what happen, I reloaded old params without servo change)
3.- everything works fine on manual: NO overheating
4.- motors overheat on autopilot: I’m using a multicopters ESC, should I be using an ESC for a car? since the autopilot is for a rover, Is there any difference between the multicopters and car ESC?
5.- I did test the autopilot: right now autopilot is nonexisting
6.- boat over accelerate on autopilot
7.- acceleration rate for turning very choppy (no smooth transition between left and right motor)

I’m including my log files and a video of the boat

https://drive.google.com/drive/folders/1mXwIMkAz1bWGA4fQTFZURXB0RLkuvQH4?usp=sharing

I think the choppy-ness may be caused by the ESCs or maybe the range that AP using when sending PWM values to the ESCs is incorrect. In particular I think that MOT_THR_MIN is too high at 0.15.

Have you watched the video on the motor test page that shows how to account for the deadzone?

If possible could you try reducing MOT_THR_MIN to 0 and try again?

Thanks for the log and video by the way. It really makes it more clear what the issue is… and it’s fun to watch!

Yes, I have watched the video several times and performed motor test, the MOT_THR_MIN comes to 15%, the only thing I could think that might be causing that is the ESC, however the boat work fine on manual as you can see in the log file

1 Like

Hello Randy

what type of ESC should I use rover/boat?

@luigi,

Re ESCs, I think if there’s no plan to use 3D propellers (that provide reverse thrust) then you could use any multicopter ESCs. I think at the moment these ESCs are calibrated to use a range from 1500 ~ 2000-ish for forward movement but I think it might be better to use a more normal range of 1000 ~ 2000 which should be possible by recalibrating the ESCs and then setting the SERVOx_TRIM values down to the same (or just slightly higher) than SERVOx_MIN.

It might be good to simplify the controller output by setting the speed and rate controller’s P, I and D terms all to zero.

  • ATC_SPEED_P = 0 (was 0.2)
  • ATC_SPEED_I = 0 (was 0.2)
  • ATC_STR_RAT_P = 0 (was 2.0)
  • ATC_STR_RAT_I = 0 (was 0.2)

… and then focus on getting the ATC_STR_RAT_FF value correct ideally using real-time feedback of the desired and actual turn rate by setting the GCS_PID_MASK parameter (see the turn rate controller tuning wiki page). This tuning should be done in acro mode and there is actually no need to make the vehicle move forward, you can tune it while just moving the RC’s steering input.

1 Like

Hello Randy
ok, I changed the Multicopter ESC I had for “Car ESC” with reverse, well the Boat it’s working a lot better now, no more overheating of the motors or choppiness. Now only one thing on autopilot after reaching the WP, the boat turns very slowly (almost no moving) to the next WP. if I change to manual and go back to auto the boat goes to the next WP with no problem but after reaching the next WP the problem starts again. I don’t know what parameter I need to increase to make the boat keep going after reaching a WP. Any recommendation?

I’m including the log file

I appreciate the help, I’m almost there

https://drive.google.com/drive/folders/1mXwIMkAz1bWGA4fQTFZURXB0RLkuvQH4?usp=sharing

1 Like

@luigi,

Good news.

I think the turn rate controller isn’t working too well. If we compare the desired and actual turn rate it is not turning quickly enough. See how the Desired Turn Rate (in red) is much higher than the (actual) Turn Rate (in green)?

Maybe try this:

  • ATC_STR_RAT_FF 4 (was 2)
  • ATC_STR_ACC_MAX 120 (was 180)

the ATC_STR_RAT_FF can only go up to 3, I’ll try 3

@luigi,

Ah, you can actually set it to larger values using the full parameter tree screen or full parameter list screen (if using mission planner). I might increase that maximum FF values to 5. Txs for he report.

@rmackay9,

Thanks for doing these walkthroughs to help people with tuning. I’ve learned a lot by watching you walk them through your process. Extremely helpful.

Cheers,

2 Likes

Hello Randy,
ok made the changes you suggested boat it’s working a lot better now (I had to change ESC because water got inside the boat and the ESC burned), now the boat it’s turning too aggressive, could you take a look at my log files, please

thank you

https://drive.google.com/drive/folders/1mXwIMkAz1bWGA4fQTFZURXB0RLkuvQH4?usp=sharing

1 Like

Hi @luigi,

That is looking much better, nicely done!

Here is a picture of the map showing the vehicle tracking the path between waypoints fairly well. The graph shows the desired vs actual speed which is also pretty good.

Things can be improved further by reducing the ATC_STR_RAT_FF from 3 to about 1. We can see the steering rate controller is overshooting a lot and the FF is the reason.

Hello Randy,
The boat works good, well I think

I made a video of the boat on autopilot
here is my log file just in case there its something that could make it better.

I have one question, all the parameters/boat was tuned using a 6S battery if I use a 3S battery do I need to retune all the parameter?

https://drive.google.com/drive/folders/1mXwIMkAz1bWGA4fQTFZURXB0RLkuvQH4?usp=sharing

Hi @luigi,

Thanks for the video, nice looking boat!

the speed control is looking quite good. This is a screen shot of desired vs actual speed and they are tracking very well.

The steering control is far better than before but there is still some room for improvement. In the picture below the desired turn rate is in blue and the actual is in green. The response is nearly always the same at each corner with the initial overshoot followed by the undershoot and then a really large overshoot.

I think the problem is that P is too large and I is too small. Could you try these values?

  • ATC_STR_RAT_P = 1 (was 3)
  • ATC_STR_RAT_I = 1 (was 0.2)

The values are a bit of a guess but I think keeping P and I the same value is a good idea.