Logging PID Data

I’ve started the throttle to speed tuning and find it difficult to watch the tuning screen while driving the Rover. Is there a way to log the pidachieved and piddesired values?

Chuck

@chuckl74, yes, I think they will appear in PIDS (PID Steering) and PIDA (PID Acceleration which is really PID speed - but we couldn’t use PIDS)… although from a quick check of my own logs it seems the “Act” (for Actual) is always being set to zero. We should fix this for the next version but in any case, another alternative is to check the THR.DesSpeed vs THR.Speed and STER.DesTurnRate and STER.TurnRate values.

Thanks for the quick reply. I’ve been struggling trying to figure out how to use the log browser for a couple of days, now that I have chosen the two parameters you listed, how do I zoom in to see the results?
Chuck

@chuckl74, it looks like MP is having some issues displaying the data properly so feel free to raise an issue in the MP’s issues list. In the short-term I think unchecking “Use Time” will get around the problem.

It took some doing and was able to record the PID desired/achieved graph. There have been several times while in the Acro mode, the rover went full throttle. During the first attempt to record the graph, the video captured it going full throttle. The attached video shows it happening, make sure your volume is turned up so you can hear it go full throttle. All so attached are the log and parameters. Can someone review these and help me figure out what is going on? Is this possibly a failsafe issue? When it happened in the video, I quickly disarmed the rover which seem to function.

Chuck

6 6-11-2019 1-24-42 PM.bin (114.4 KB)

Parameters - 6-11-19.param (13.1 KB)

I tried to have a look at the logs but most of the logging has been disabled (LOG_BITMASK = 16) so it’s hard to see what’s going on…

Ok, I just changed the LOG_BITMASK to 65535 and will try to duplicate the problem tomorrow.

Chuck

1 Like

I couldn’t duplicate the runway throttle like yesterday, but the steering servo today had a mind of its own in the Acro mode. While sitting still, it would oscillate between different directions, at a moderate speed. Switching out of the Acro mode back to manual would give control back to the transmitter. I did notice the light on the Spectrum satellite receiver was flashing. I’m going to switch out the satellite receiver for the full receiver and see if anything changes. Attached is the log during this event. 20mb.

Chuck

Charles,

I guess it’s a vehicle with separate steering and throttle (aka Ackerman steering) but it’s traveling very slowly (less than 0.5m/s) which may cause some issues with tuning the steering controller.

In any case, the vehicle’s turn rate is not able to keep up with the desired so we should increase the ATC_STR_RAT_FF from 0.2 to something higher (0.8?) and perhaps also drop the maximum desired turn rate. So reduce ATC_STR_RAT_MAX from 360 to perhaps 90 and do the same for ACRO_TURN_RATE (reduce from 180 to 90).

The speed controller is doing OK although it’s a bit noisy… Perhaps reducing ATC_SPEED_P and ATC_SPEED_I from 0.2 to 0.1 might be good. At least reducing ATC_SPEED_P is probably a good idea.

Hopefully this helps a bit but I guess we shall see…

I’ve started setting up way points and was having success. After a while when either setting way points or following them in Auto mode, the Rover would suddenly stop and not respond. The light on the Spectrum satellite receiver was flashing, which required a total reboot. I’m still learning how to use the logs, but did manage to find two ERR’s that said Failsafe_EKF-1 and EKF_check-2. Having the receiver go into a failsafe mode is disconcerting. Can you look at the two logs and see what might have happened. Batteries were fully charged and it was about 95 degrees with full sun here in Goodyear, AZ.

Chuck



The log analyzer showed this error:
Test: Compass = FAIL - FAIL: Large compass offset params (X:978.91, Y:415.04, Z:-819.13)
FAIL: Large compass offset in MAG data (X:978.00, Y:415.00, Z:-819.00)
Large change in mag_field (77.14%)

I recalibrated the external compass while outside using the default setting and got a slight improvement:
X:945, Y:372, Z:-785. What would good number be?

Also, I’m printing out a mount for the satellite receiver to raise it up and allow the antennas to be mounted vertically.