ArduCopter in action: Testing the QuadCopter (HIL mode) on X-Plane v9
Here a video a the ArduMega board (2560 or 1280) with the firmware ArduCopter v2.1.1b (JLN update for X-Plane) connected on the X-Plane simulator throught the APM Planner in HIL mode. The QuadCopter QRO has been modelized for X-Plane v9.0 (or greater) so as get a closest replication of a true QuadCopter UAV.
This is a very good method for testing all the features of the ArduCopter firmware. For conducting a such test, only an ArduMega board (APM1280, APM2560, APM2) is used, no IMU shield or sensor are required here...
Setup:
- Receiver: Turnigy 9X8C v2 connected to the APM board
- Transmitter: Turnigy 9x
- APM planner v1.1.1x
- ArduMega board (APM v1 or APM v2)
- firmware ArduCopter v2.x.x + the JLN mod for X-Plane
- Software: X-Plane v9 or greater
- QRO_X: the quadcopter model (by JLN) for X-Plane
More infos at:
Comments
Has anyone tested this with the new version of X-plane 10.33??
Does the HIL simulation work with the latest code of ArduCopter? and how?
hmmm, I don't have any screen recorder running, but it seems from what I read on some articles and posts, that HIL simulation parameters (gains) vary between computers, so there might be a high impact on the performance of the system, meaning I should ensure to close all unnecessary aaplications and try again. In my case throttle gain must be low as 3000 in order to launch the quad on x-plane. maybe itnwould also be a way to tweak motor data of the model...
would be great if someone could post a few steps to follow in order to adjust parameters to a certain system.
thanks a lot,
christian
Christian, what are the gains you're using ? I got the stable simulation at Throttle gain of 12000, and all other gains at 10000. Another thing to check is if you're running any screen recorders simultaneously with X-Plane. That severly effects the commands to X-Plane even causing the flight to destabilize.
hi there!
I am trying to get HIL Simulation for Quadcopter working on my APM 2.5 with MissionPlanner 1.2.28 and x-plane 9.7
I have loaded the QRO_X from the starter package and it basically flies, but I am struggling quite heavy with PID and Simulator Roll/Pitch/Rudder/Throttle Gains.
the values seem to drift somehow. When I get values for a more or less stable copter, after some while it starts wobbling or I cannot reduce or increase throttle in a proper way anymore.
also the graphs for the servo outputs on the MP's simulator tab show heavy bouncing.
does please anyone have a hint how to get a proper stable quadcopter simulation working with X-Plane?
I would like to experiment a bit before playing with the real copter lateron.
thanks a lot in advance!
Greetings from rainy vienna!
Christian
So thanks to Anant we finally figured out our problem with our quadcopter not flying waypoints in a HIL sim. First what we did is upload the firmware 2.1.1 r3. After that we downloaded the starter pack to make sure we hade the quadcopter for xplane and also the pids. We also used arduino relaxpatch .0022. My recommendation is that everyone has someone double check what you are doing because at first we couldn't get it to run waypoints and the reason is that I was not uploading the firmware correctly. In your arduino folder make sure you make a new folder and put all of your libraries and such in it. I want to thank @anant once again for taking the time to help me.
Regards,
Parker Jones
Anant,
Thank you so much for your help so far and it is parkerjones11@verizon.net. I will not be able to do much with it tonight since all my materials are at work so I will keep you updated tomorrow at work.
Parker
i made a small readme file for the HIL simulation (mostly adapted from this blog post; some minor modifications)....i use the mission script from mission planner for an autonomous mission with take-off, switching mode to auto, moving to other waypoint, n loitering there...if u gimme ur mail id i can send the file to u...
I meant the trajectory in X-Plane (don't remember the exact shortcuts, probably pressing 'x' or 'c' twice u can see the trajectory with altitude on the screen of X-Plane).....that would give an idea of what the copter is exactly trying to do....if u use the gains from "AC211r6_Xplane.param" file n selected only input boxes 3,4,17,18,19,20 in XPlane configuration parameters window (with no other parameters selected; others mess with simulated positions in arducopter firmware) the trajectory following should work fine.....