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...
- 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:
We are using X-plane as our simulator. And just tested it this morning and we do have yaw/pitch/roll values along with lat/long. Then tested the trajectory of the quadcopter in the simulation tab, and as we were going away from the next way point we switched it from stabilize to autopilot mode and the trajectory did not change.
Thanks for your time,
Which simulator are you using ? Do you see continuously changing yaw/pitch/roll values and lat/long values in Simulation tab ? If yes, the interface between Mission Planner and Simulator is working fine....then you can check the actual trajectory in simulator n find out what's the copter trying to do (like does just fall off the moment you switch the mode, etc. )...
In mission planner under simulation we see it go from stabilize to auto where it says mode. Since we have started we have been able to see it change modes. In the flight data tab we can see the orange line point to the first waypoint, so we know that it is calculating the bearing to the first waypoint, but the copter never makes any attempt to change direction in the hil sim. The bearing is never re-calculated when it drifts from its original spot.So the only time we ever see the autopilot calculating a bearing to a waypoint is when we first switch to auto mode or press the restart mission in the flight data tab of mission planner.
@ Parker: Do you see the MODE field value change to AUTO in flight planner, when u flip the radio switch ?
We are working with arducopter's running waypoints. We can get the stabilize mode working fine but when we flip the switch to go to auto mode it will not follow the waypoints. We have been trying everything to try and get this to work. In the flight data tab where you can choose which waypoint you want the copter to go to, it only recognizes 0 home. Even though you can see the waypoints we have written and read them in flight planner. Any ideas?
Finally got it working.......had wrongly selected field 21 (loc, vel, distance travelled) as well XPlane, that caused the problem....
nice to see it works with the arduino mega 2560 board as well...........
Thanks Monroe......not exactly what i was looking for, but useful.........
Hector, the images posted by Jean have an APM board without connection to GPS. Yet he achieved a successful simulation.....i want to do the same, so trying to understand how'd he do it....
Also, XPlane is communicating GPS data to Mission Planner fine...i can see it in sim tab....its just that i don't know how to find if mission planner sends this simulated GPS data to APM, n APM processes it fine....other simulators might have similar behavior.....
HIL sim is awesome.....great work!!!
I've some questions regarding the GPS data in HIL. In most of your videos, I see the mission planner flight data page showing the map with quad rotor there. This is possible only when quad has a GPS lock.
- Is it possible to perform HIL sim using the APM or Arduino Mega 2560 board without connecting the GPS...??
- If GPS is required to connect and get a lock, why is it so...?? Does the APM firmware not use GPS data from XPlane...??
Basically is it possible to do HIL simulation indoors, without connecting a GPS...?? How does the mission planner respond the way it does in your videos without a GPS lock...??
great post Jean-Luis,
the HIL you implemented is open loop, right?. if no IMU shield or sensor are required in implementing the HIL, how the pilot that we called ArduMega get feedback data?
could you tell me how it is?
I am presently doing HIL using ArduMega but my HIL is a little different from yours. My HIL will be implemented in Matlab, all my question of motion will be in simulink and Control system will be running on my ArduMega, then will be visualized in flight simulator like X-Plane.