Hello,

I've recently gotten into HIL simulation with Arducopter. After not being able to get FlightGear to work, I got a copy of Xplane 9. Below I will describe in as much detail as possible what I have done to get HILS working, and then front the current roadblock I am up against.

***

All links are either to separate pages with downloads in them, or to screenshots. None of them will auto-start a download on you.

***

What I've done so far:

Computer Setup:

Windows 7 x64, Intel Core2Duo 2.9Ghz, 3Gb of RAM, Radeon 5500 card

--

Gotten some hardware. Right now I have an Ardupilot 2.5.1, Spektrum receiver, 3DR GPS, and Spektrum DX8 Transmitter.

--

Set up hardware. The GPS board is connected to the APM via the 'old' SP1 connector.

Inputs are as follows:

SPEKTRUM -----> APM

THRO (throttle) --> 3

AILE (aileron) ----> 1

ELEV (elevator) -> 2

RUDD (rudder) --> 4

GEAR --------------> 7

AUX 2 --------------> 5

--

Downloaded Software.

I updated Xplane to 9.70 via the updater available on their website (the built in updater failed).

I installed Mission Planner 1.2.53 (well, actually updated from 1.2.50)

I downloaded and extracted the Start Pack for Xplane HILS.

--

Got everything set up in Mission Planner.

Loaded the Quad HIL firmware (2.9.b1) to the APM (screenshot)

Loaded the .param from the starter kit (screenshot)

Set copter to 'x' in Mission Planner (because the 3D model looks like a 'x') (screenshot)

Picked one mode to be 'auto' and the others set as 'stabilize'

Set gains for simulation. (screenshot)

--

Set up Xplane. Open separately to adjust these settings.

Set up output (Settings -> Data Input & Output) (screenshot)

Set up network (Settings -> Net Connections) (screenshot)

Change flight models per frame (Settings -> Operations & Warnings) (screenshot)

--

Connect to APM

Start Sim Link

Launch Xplane

So far, I have gotten 'stabilize' mode to work fairly reliably. However, if I set a way point and then switch to 'auto' mode, the copter will aim toward the waypoint and then tilt toward it and travel until the copter loses all altitude and crashes. It also seems to do the same thing in other modes (like guided).

Another screenshot of the death spiral. And again with text overlay.

Before takeoff I can set several waypoints (alt 300), set the home altitude to 0 (ground level), and verify height is checked. I'll manually bring the copter up to about 100 meters and then release to auto mode. The copter will then fly the waypoints, but depending on what I have set as the Speed (Flight Data -> Actions -> Change Speed) the copter will either infinitely rise or fall. It appears as though the device is sacrificing altitude to match whatever speed I give it. At a speed of '6' it will crash, at a speed of '4' it will never land (even in 'land' mode it just continuously rises).

I'm thoroughly confused by the situation, especially after having arduPilot work so well without tinkering..

Thank you for any and all input,

-Chris

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • I want to ask you I've done as you do ,but my MP simulation's Ardupilot output (throttle) still 0 all the time.

    What do I need to do?

  • Have you checked what altitude you have set for the waypoints in your mission, and have you tried a frame rate of more than 3, maybe 4 or 5.

This reply was deleted.

Activity