I have a 12 volt geared motor driving my power steering on a John Deere 5055e. The Pixhawk channel 1 output is going into a JRK12V12 motor controller which is receiving angle sensor input from my AG Leader steering angle sensor. I have consistent RTK float GPS status coming from my ComNav K501G receiver.
I’m looking for suggestions on how to improve cross track error. I have adjusted 3 steering related settings to find the best fit (i.e. NAV1_PERIOD = 24; STEER2SRV_P = 19 and STEER2SRV_D = 0.00625). My min and max xtrack error is -0.19 and 0.20 respectively after waypoint 1 on a 150 yard test run at a ground speed about 1.3 m/s.
Video URLs with 3 tests with different STEER2SRV_D are below. Visually there is not much difference between the three settings. Graphing the xtrack error and steering channel shows:
I’m wondering what additional settings might smooth my servo 1 output and make my steering control motor oscillate less with the result being a tighter xtrack error.
Credit and thanks to Matthew Reimer and Wayne at http://deepsouthrobotics.com/ for inspiration and support.
Help please!
Replies
If it's steady in MANUAL mode, then that looks like your Pololu is pretty well configured. You were doing some nice slow movements. See if it oscillates if you do some fast short-travel oscillations (like the Pixhawk is commanding it to do).
3.7s from lock to lock is MUCH slower than a standard servo. Try bumping up the TCONST. I don't know the precise maths behind it (maybe someone else can answer) but the doco refers to that "slowing" the steering system response.
You say your speed varies from 1.1 to 1.5m/s. Do you think your speed is ACTUALLY changing that much? Try increasing "GPS_MINSPEED" (or something like that) to 2.0m/s. You may lose some precision in your speed control, but it might smooth out the steering. The system (IIRC) commands a steering angle to get the right yaw rate based on your speed. A sudden 50% change in speed might be throwing that off.
To fix STEERING mode, go into the RC input config and "reverse" the roll channel. That should sort steering mode. STEERING mode should let you tweak the yaw rate controller (STEER2SRV) parameters separately from the L1 and PERIOD.
I think you need to look at two things - the rapid oscillation in the steering, as well as your cross track deviation. When you were running low P values and getting higher cross-track error, was the steering behaving more sensibly?
Hi, what's your steering actuator - is that off the shelf?
I'm far from an expert on the tractor side, but here are a few thoughts. Also, I don't know your background so apologies if any of this is telling you how to suck eggs.
1) What's the mapping between steering wheel angle and wheel angle? Is it direct? It looks like you're getting a lot of steering wheel movement with not much wheel movement. Is it just a really high gearing ratio, or is there something that's not direct in there (like a deadband or slop)?
If you jack up the front of the tractor and turn the wheel, is it a direct relationship - should 30 degrees of steering wheel always correspond to 5 degrees of wheel movement? Have you confirmed the tuning and the response of the steering controller itself? Is there any slop between the steering wheel, the wheels, and the sensor? Is there any non-linearity in the linkage between the wheels and the angle sensor?
2) Are you able to log ACTUAL steering position against command? If it's an analog position sensor you may be able to feed it back into the Pixhawk through one of the ADC inputs. One possible problem could be that the pixhawk is commanding movements that are faster than the steering can respond to and "winding up" the integral. How does it behave when you are driving it in MANUAL with the RC controller - do you notice much of a lag or an oscillation?
Any oscilation in MANUAL mode would point to the tuning of the Pololu controller.
In the second and third videos there's a bit of slop in the steering actuator - the motor housing moves back and forth. Can you tighten that up? It's not much movement so it may not be a problem, but potentially a quick thing to eliminate.
https://en.wikipedia.org/wiki/Slew_rate
The tuning docs - http://ardupilot.org/rover/docs/tuning-steering-and-navigation-for-... - refer to TCONST. I see you've tweaked that - how did you get to that value?
3) Where are the pixhawk and GPS located in relation to the centre of gravity (or maybe centre of steering?) for the tractor? If you're chasing super high precision an offset between the GPS, Pixhawk, and tractor centre might be problematic - image the extreme case of your GPS being on a 20 foot pole out the front - any deviation would be magnified.
4) Have you looked at your speed plot? My understanding of the Pixhawk steering controller is that it commands a desired yaw rate which is a function of speed. If there's any variation in your speed measurement (which could be a large % at such low speeds) that may be throwing off the rates. Does RTK give you high accuracy speed at low velocities?
If your RTK velocity isn't up to scratch, maybe wheel speed encoders would help.
5) How well do you understand PID controllers? The Pixhawk steering output looks (to my untrained eye) like your P term is too high.
6) Have you tested it in STEERING mode? My understanding is that uses the same steering rate controller so can help you isolate the steering PID values from the navigation Period and L1 parameter effects.