After a topic about GPS YAW, we succeed to get to the next step: Tuning of steering
(I now the throttle can be improved too, but we have an extra controller that makes a differential drive for both rear wheel motors, I have some extra functions in this code. For example drive slower when steering more, this will screw up the throttle tuning).
The mechanical steering of this rover takes like for ever, I have changed the setup of the actuator, but still slower than standard rovers.
Currently it steers nice and stable, but in my opinion I can see two parts of the steering tuning that can make it drive much better, but I can use some help with this:
but after a turn it just takes too long for it to get back to the yellow line. I think the rover doesnât steer enough at that moment. (PID: I?)
after the rover has reached the yellow line again, we do have a litte overshoot causes it to drive on the other side of the yellow line for a short time. (PID: P?)
Something to try: On our rover, using the same steering parameters as you are, we dropped the âLat Acc Ctrl Periodâ to a very low number (1) out of desperation and everything started working splendidly. We are mowing with a 4â overlap using a 60â deck without striping. You have a much different rover and our answer may not be the best solution, but itâs working. Good luck!
Consider using a large servo motor instead of that linear actuator. There are plenty of high torque motors that can operate in closed loop mode and provide better response.
Thank you @Swebre, I have lowered the Lat Accn Ctrl Period, and it completely changed the behavior of the rover. For us, if Iâm getting lower than 18, it gets very nervous, even when I try to match the P, I, FF settings.
Today I have found our best setup so far. But I would like to ask if you know how I can make the rover overshoot less? I think I can get the tuning for long straights right, but Iâm not happy with turns like 90 degrees or more. The start of steering is good, ofcourse there is a overshoot, but this is okay. Because of this, it has to steer more than 90 degrees to get back to the yellow line as soon as possible. At this point I have two questions:
Can you help me with getting back on the next yellow line while turning earlier? Maybe my driving velocity is too high (steering with linear actuator is very slow) at this moment?
After is reaches the yellow line again, the heading of the rover is having a big deviation related to the next waypoint, so it will get another overshoot, and after steering back, it will again have a (smaller) overshoot. so in my opinion, it should steer back earlier (way before the position of the rover reaches the yellow line). I have tried a lot to achieve this, but unfortunately witouth luck so farâŚ
â How can I upload a logfile to share this with you?
â If you have another idea of a possible improvement of a parameter, please also let me know 20-04-2022_2027uur.param (15.3 KB)
If Iâm looking to STER.DesTurnRate and STER.TurnRate, I can see the rover expects (red) to steer faster than it does (green). What parameter could this be? My steering isnât linear because it is done with ackerman linear actuator. Can we help the expected PID accelerate steering less with a parameter?
Txs for the logs. Tuning large slow vehicles with lag in the response is quite difficult⌠theyâre probably the most difficult vehicles to tune actually.
A few things I notice:
I guess the vehicle is actually a skid-steering vehicle but there is another controller in the middle which makes it appear to be an ackermann steering vehicle? This may be causing a few problems:
The vehicle wonât be able to do pivot turns
AP wonât be able to handle wheel output saturation. For example when one wheel is spinning at its maximum rate either turn rate or the speed (or both) must be sacrificed. If AP knows it is controlling a skid-steering vehicle it will tend to prioritise turn rate over speed meaning the vehicle will tend to stay on the path better (the MOT_STR_THR_MIX parameter controls the prioritisation)
Turn rate controller accuracy could be worse at higher speeds because Ackermann steering vehicle turn rate response changes with speed (and AP has compensation for this) while skid-steering vehicle response does not. My guess is that the vehicle is slow enough though that this doesnât matter (the vehicle is always below 1m/s which is the MOT_SPD_SCA_BASE param value)
TURN_RADIUS is quite large at 10m. It might help to reduce this
WP_OVERSHOOT = 0. This means the vehicle will constantly be reducing its speed trying to stay exactly on the line. This probably isnât helpful and it would be better to restore this to 2m.
the ATC_SPEED_FF is set to 0.1. This should probably be set back to â0â because CRUISE_SPEED and CRUISE_THROTTLE are essentially used as a feedforward so having both set is just a bit confusing.
NAVL1_PERIOD is very high (27). If set lower the vehicle will try to get back on the path more quickly
The speeed and turn rate controller tunes are pretty OK itâs just that the vehicleâs response is really slow.
ARMING_CHECK = 0. This is normally not a good idea because the arming checks will alert you to various setting that are incorrect. If possible it is better to resolve the errors or just disable one or two of the arming checks instead of all of them
ATC_STOP_SPEED = 0. This will mean the vehicle never stops trying to control the forward-back speed of the vehicel.
The RC failsafe has been disabled (FS_THR_ENABLE). I suspect you know what youâre doing but this can be a bit dangerous if the vehicle really is being controlled by RC (I suspect you have a ground station as well though)
Sorry I donât have a silver bullet response to fix the issue. I suspect the biggest issue is the controller in the middle though.
I also wonder if it might be worth trying Rover-4.3.0-DEV (aka âlatestâ) which has SCurve navigation which may work better although it is a bit bleeding edge and hasnât gone through beta testing yet.
Thank you, I will do some tests with your recommended numbers and come back to this topic!
I have the following:
From AP comes just a channel for throttle (PWM) and a channel for steering (PWM).
This goes into my arduino, this calculates differential for rear wheels (left and right) based on the steering. After this, the rear wheels are told to drive with 2 analog outputs of the arduino (0-5V) and the motorcontroller for our linear actuator (for steering) gets an analog output 0-5v too.
I couldnât find a differential drive and a forced steering option in AP, so I made it myself (with some help of others ofcourse). It should not get in the way of the AP calculations, for AP it is just a normal rover with RC channel for throttle and for steering
Iâm afraid it does make a difference in the controls for the reasons mentioned above. I canât say for sure that switching to skid-steering will improve things enough to resolve all problems but I think it would be an improvementâŚ
Hi,
We have put a lot of time into this but never get it to work perfectly, so we decided to stop with ardupilot for this project and we bought a much more expensive kit to make it work. Even they are struggling to get it to work with a âslowâ actuator for steering.
If faster Actuators could solve the issue you are facing, i can connect you with manufacturers who can do 30-50mm/s at any stroke length with loads upto 3000N the price is pretty decent ive got it for 110USD.
I think we are working on something similar and can help each other out. Would you be interested to connect?