Pixhawk autopilot does not execute mission in 'auto' mode

I installed a PixHawk autopilot (with external compass/gps) in a Skywalker airframe for collecting imagery for mapping. The plane flies nicely in manual and stabilize mode, but when I switch to auto it doesn’t go to the first waypoint (or any waypoint?). The GCS FlightData (HUD?) confirms I’m in auto mode, and I see my waypoints in the map display. In auto mode, I see the orange line pointing in the direction of the first waypoint, but the airplane doesn’t turn that way. The compass heading indicated on HUD appears correct. Any suggestion as to how to debug this problem? My logfiles are attached.

The HUD shows a invalid or no current nav cmd.

Can you post your waypoint file here?

Here are the waypoints, extracted from the tlog. I also downloaded from the autopilot via Mavlink --just to be sure they were the same–they are.

Graham,
From looking at the logs, I think the “invalid nav” message showed up as a result of clicking the restart mission button on the ‘Actions’ tab of Mission Planner. We clicked that because after switching to ‘Auto’ using the RC radio, the plane had not turned to the first waypoint in several seconds (I think it had actually turned away). Don’t understand the HUD message, but about 6 seconds earlier (11:33:33.962) was when I entered auto mode—and from the dataflash log, the waypoint that appears to be loaded then, does match my first waypoint (lat/lon/alt). I can’t understand why the airplane doesn’t turn toward the first waypoint.

Note that when I look at the dataflash log in Misson Planner, the switch to ‘Auto’ actually says ‘Loiter’. I’m guessing that’s a bug in the log viewer, as it also indicates the ModeNum is 10, which corresponds to ‘Auto’ everywhere else in MP (e.g. the HUD, the Flight Modes display, etc.)

Since I have a similar issue I was looking to your logs. I am not an expert on logs, just trying to learn.
I did notice you have COMPASS_AUTODEC=1 and COMPASS_LEARN=0. Any reason for those values?

Have you flown missions before with this plane? It’s possible that the do_set_cam command is not allowing the mission to progress, so try a simple mission without the cam command, also try a dummy waypoint before the cam command?

criro1999: No, I believe that’s how the params defaulted. I think I set a declination value during setup; not sure why auto declination would be set – I’ll re-check my value, then set auto to zero before the next flight.

Graham: No, the plane/pixhawk are new, and have not yet successfully flown to a waypoint. I’ll do the simple tests you suggested, albeit not today --inhospitable weather! Note that I do have access to a 2nd plane that works fine with these waypoints–but it’s an APM 2.6 autopilot and the firmware is a version or two earlier.

I re-flew with just 3 waypoints – no camera commands: same behavior. The airplane doesn’t go to the waypoints. I also tried loiter and RTL, and it doesn’t seem to me they’re working properly either. The plane does fly fine in FBWA, Stabilize, and Manual. It just doesn’t seem to know how to navigate, even though the compass heading in the Mission Planner HUD is correct.

It seems to point to a GPS problem as only the modes that use GPS are affected? Can you confirm that the GPS is functioning 100% ie >10 sats and low HDOP?

HDop is between 1.5 & 1.7 and number of satellites is typically 11, sometimes 12; very infrequent drops to 10.

I believe the failure to navigate was because my rudder-to-aileron mix was set to 0.5, but should have been -0.5, since one of the two (rudder or aileron) is reversed. I made some other param changes at the same time, but I believe this was the change that got things working.

Don’t change KFF_RDDMIX to a negative number, instead leave it positive and change RC4_REV to -1
See this documentation:
http://plane.ardupilot.com/wiki/arduplane-setup/first-time-apm-setup/reversing-servos-and-setting-normalelevon-mode/#Getting_the_rudder_direction_right
Cheers, Tridge

Thank you – I’ll make the changes.