Skidsteer Tank Tuning Help - Can't hit desired turn rate

Hi All,
I’m a bit stumped by my latest rovers steering tuning. I’ve spent about 8 hours trying every combination of parameters I can think of but just can’t get the steering rate fast enough.
My rover is using VESC with encoders in PID RPM control mode, so the throttle response should be very precise. In manual mode, control does indeed feel very precise. At 100% throttle and full turning input the vehicle is able to turn quite sharply. One track slows down to a near standstill while the other spins full speed. When throttle is 0% with full turning input, it pivot turns very quickly as expected.

In Acro mode, with any amount of forward throttle the steering is nowhere near as responsive as it is in manual mode. I’ve tried changing every steering related setting throughout the min/max range and everywhere in-between with no success. It seems no combination of parameters makes pidachieved reach piddesired.

Since its a relatively slow vehicle (0.5m/s) I thought perhaps the speed loop was saturating and not allowing enough bandwidth for turning but this does not seem to be the case.

Another issue is that in auto mode the vehicle does not skid steer even with WP_PIVOT_ANGLE set to 45 or lower.

Any help would be greatly appreciated!

Parameters and log: Rover 05/11/2022 - Google Drive

2 Likes

Hi @rctestflight,

Great to see you here. We all love your videos and in particular I found your solar boat an real inspiration. It opened my eyes to how useful solar could be for UGVs/USVs.

My guess is that there is an issue with the ESC in that it requires the output to both motors to momentarily go to neutral (1500 PWM) before it will allow them to spin in opposite directions.

Above is a graph of what should be similar responses in Manual (on the left) and Acro (on the right). In the left image we see the two motor outputs going to opposite extremes and the vehicle rotates at 200-ish deg/sec. On the right we see this happening in Acro but sadly the vehicle only rotates at about 40deg/sec.

I think the difference is that while in manual mode the motor outputs momentarily when to neutral while in acro mode, there’s no delay. I suspect you can reproduce the same behaviour in manual by giving full forward stick and then full right steering (keeping throttle at full), then pull the throttle down to neutral and I think you’ll find it doesn’t turn rapidly.

I didn’t answer what to do about it though… some ESCs have a setting or a jumper that allows removing this requirement for neutral-before-reversing.

If you can’t change the ESC’s settings (or replace them with a model that doesn’t have this restriction) then I think we could make a code change to handle it. I’d prefer not to of course but I had to do something similar for the Torqeedo motor driver recently so I probably know how to do it.

@rmackay9 You’re so right! I changed some VESC settings and within a minute or two was able to get my rover tuned perfectly. I’ll post a pic of the settings below for anyone who encounters the same issue.

I’m also using wheel encoders on this rover and was wondering if I should expect those to improve waypoint mission accuracy at all? Or are they only for GPSless navigation?

Thanks for the help!!

1 Like

@rctestflight,

I suspect using wheel encoders won’t help much outdoors but it probably won’t hurt either. I think the wheel encoder setup wiki page is relatively accurate but one thing it doesn’t mention is the setup to use both GPS and wheel encoders at the same time. To do this you should only need to set EK3_SRC2_VELXY = 7 (Wheel Encoder) and leave EK3_SRC_OPTIONS = 1 (fuse all velocities). Basically wheel encoders provide a velocity and the EKF can fuse these along with the GPS’s velocities.