Xplane 10, Xplane-heli, SITL and Mission Planner Problem

Hello people!

I am trying to run SITL with Xplane’s Bell Ranger and Mission Planner, following carefully the instructions and video from @tridge given here http://ardupilot.org/dev/docs/sitl-with-xplane.html

With Mission Planner version 1.3.48 build 1 and SITL’s Arducopter 3.6 dev, I was not able to successfully run the SITL - at least not everything.

  • Connection with Xplane (v 10.51 r2, via Steam) was good
  • I was at least able to get to AltHold and Loiter and have the helicopter somewhat loitering / hovering (horrible swaying but it stayed aloft).
  • I’m using the param file from here http://uav.tridgell.net/XPlane/

The problem comes when I tried to get the helicopter into AUTO mode, it stubbornly refuses - throwing up errors like “Failsafe: Terrain Data Missing” and then disarm (even though I’ve disabled the param TERRAIN_ENABLE) and “Missing Takeoff Cmd” (even though I’ve included a takeoff command).

I’ve also tried a few things:

  • With the exact same setup, I was able to get SITL to work with Xplane’s SITL. Getting into Auto and running the mission wasn’t a problem. Flew beautifully.
  • Get the heli up in the air Loitering and then switch to auto - however, error “Failsafe: Terrain Data Missing” comes up
  • I tried running exact version of MIssion Planner in Tridge’s video here https://www.youtube.com/watch?v=JNNSoMrAFn4 and older MP versions as well, BUT mission planner still downloaded ArduCopter 3.6 dev ; same problem persisted
  • I tried looking around for way to change MP’s SITL firmware version but to no avail.

Could someone point to a direction that I can debug or figure out? I’ve kinda ran out of options here.

Thank you!

OngTianChangYonah

  • Flight Mode Change Failed Error

  • Flight Mode Change Failed Error due to Missing Takeoff Cmd

  • Failsafe: Terrain Data Missing error

  • The sample flight plan that I’m using

  • Flight Plan received confirmation

  • Loiter Hover at 71 meters with no issue

If it can fly Loiter mode then it should also be able to fly AUTO.

My guess is that the mission hasn’t been uploaded correctly to the virtual vehicle. From MP’s flight planner screen try downloading the mission (i.e. Read WPS button) and make sure it’s just what you expect.

For example, the “mission takeoff” error messages clearly means the first mission command is not a takeoff.
The “missing terrain data” is most often caused by the altitude type for the mission commands is set to “Terrain” although in the screen shot above it’s pretty clearly “Relative” so I can’t explain that except to think maybe you haven’t pushed the “Write WPs” button… although that seems unlikely.

I’ve reproduced the issue with AUTO mode, and I’ll look at a fix. I have found a workaround though - change your AHRS_EKF_TYPE to 2 and you can takeoff in AUTO fine. EKF 10 works fine once you are flying, but there is a bug (related to EKF origin I think) that stops an AUTO takeoff.

I’ve pushed a fix to master. Auto now works again with EKF 10

Tridge, this workaround works. We are seeing a lot of “Bad Accel” and “Bad Gyros” but auto now works.

I am also able to fly in AUTO with AHRS_EKF_TYPE set to 10.

Thank you!