Steering rate PID tuning, further developments

Hi
I still have problems getting this kayak to sail straight lines. I have now followed the recommendations described in the “Steering Turn Rate Control tuning video”, so that I have measured the ACRO_TURN_RATE to 5°/s. Also in MANUAL MODE I have taken the kayak through a full circle and seen that the turning diameter is about 8m. Thus, I have started out with an FF_Gain=8. I have then steered it in ACRO Mode and seen that PIDACHIEVED actually follows the PIDDESIRED quite well.

But still, the rudder is going from one side to the other, and the kayak is ‘dancing’ down the line - it actually looks quite funny…

Here is a logfile where I have taken it through different settings (and the turning diameter circles) without much result than described above.

https://drive.google.com/open?id=1wsbPR_7IIvkSHlK6k6Hfdimk7biNI9sb

Can anybody tell me what I’m doing wrong ?
Best Regards
Bo

Can you post a log of it in auto? You do not seem to have any compasses on board or calibrated. CRUISE_THROTTLE seems high . You also do not appear to be logging RCIN and RCOUT for some reason.

Hi David
Yes, I can, but not before next Tuesday. But actually, there is some in AUTO later in that log file.

It could very well be that ArduPilot hasn’t ‘seen’ the compass. I get the heading from the GPS (a Hemisphere V103), where we read the NMEA “$GPHDT,96.65,T*39” string. This is a hydrographic survey vessel, so it is not good enough to use magnetic compasses.

I will check up on
RCIN and RCOUT.

Brgds

Bo

I will look at the log again but I did not see any auto. There is no Desired yaw vs. Actual yaw to view. I viewed it on an older version of MP. I don’t think that matters but will update and look again. Why can’t you use a compass with your GPS plus the available accelerometers? All these options should work in harmony with each other.

1 Like

I have uploaded a new set of log files herehttps://drive.google.com/open?id=1JkiFCh_CMbyP9wfeZDtxxIXepYSeQ30B

Here I run it in AUTO. I was never able to calibrate the magnetic compasses, most probably due to the proximity of 4 car batteries. I read both position and heading into ArduRover with these NMEA messages: GPRMC and GPHDT. In Mandatory Hardware I have turned on Compass #1 as Externally mounted.

I have followed the procedure described here: https://ardupilot.org/rover/docs/rover-tuning-steering-rate.html. I have measure the turning diameter to 8m, and when I set the ACRO_TURN_RATE to 5°, I can get PIDACHIEVED to follow PIDDESIRED pretty good. I have tried all sorts of values of FF_GAIN, P, I and D, but the kayak still overshoots. It simply throws the rudder from one side to the other. But MP does say “Bad Gyro health”.

What can I be doing wrong ?

I can’t access your log. Bad gyro health is bad. And I really think you need a calibrated compass. I have a good deal of boat experience although only on one platform. Need a log a can look at. Are you leaving the boat stable and not moving when you first boot up. Maybe you have bad vibrations causing gyro problems. Really can’t say much without some log.

You can past the link into a browser to access the log. Yes, no compass offsets shown and as David says that definitely has to be addressed. This is probably related to the Bad Gyro Health message because the EKF fuses both compass and Gyro Z-axis. I have not had occasion to try this feature but it would seem to be appropriate for yours.

And here is the correct link to my GoogleDrive folder with the log files:

https://drive.google.com/open?id=1JkiFCh_CMbyP9wfeZDtxxIXepYSeQ30B

Hope this works OK for you - and thanks for your help so far :slight_smile:

But how do you access the page you are showing ? On my MissionPlanner it looks like this:

Update Mission Planner to latest Beta. On Help screen, button on the bottom.

In trying to install the MissianPlanner Beta version, I get this error message:


But that is not at my computer, right ?

Not sure. I just updated to Latest beta and it worked.

Thanks, Dave
I found out how to upgrade to latest Beta. Am now running a newer build than you, but how did you get it to show the Compass Priority section. Mine does have the Large Vehicle MagCal button, but that is it…???

I found the list with the of compasses under HW ID, but that does not show any NMEA compass. Any idea how to get that included ?

That feature seems to be a work in progress. The latest beta doesn’t include it.What GPS/compass module do you have that’s being identified as an AK8963 mag?

That is a Drotek M8P RTK XL


On the issue of supporting the GPHDT input, back in June’19 we had this reply from rmackay9:
@bok555, so I guess the GPS_TYPE parameter has already been set to “5” (for NMEA)? Re adding support for the GPHDT message, our driver is here . I don’t immediately see that we accept “GPHDT” but I’m not much of an expert in this area. I guess the driver could be enhanced. The first step for that would be to create an enhancement request in our issues list … or if you’re a developer we’re happy to accept pull requests!

And my ‘Linux’ friend Knaldgas replied:
@rmackay9,
I could extend the AP_GPS_NMEA module to accept GPHDT messages, but I don’t know how to pass it on to the back-end of ardupilot.

We implemeted the driver linked to, and it worked - obviously apart from adding the compass to the HW ID list…

Does that bring you any further ?

That Drotek module is supposed to have a LIS3MDL magnetometer and the one being identified is a AK8963 so I suppose the magnetometer in that module is not being recognized.