What is the latest ArduPlane code that supports HIL simulation for the PixHawk?
We have not written HIL for Pixhawk. Are you interested in writing it?
Yes I am interested in writing it. Is there some APM code I can look at for reference?
Yes. The APM has a HIL. The hardware abstraction layer for the HIL on PX4/ Pixhawk has never been written.
Please join us at the Google group drones-discuss and you will find people who can help you and point you in the right direction.
Hi Craig and Mohrad,
A slight correction. HIL is in fact independent of the HAL abstraction layer, so HIL does work on Pixhawk. There are just two problems:
- the larger serial buffers we use on Pixhawk lead to HIL being very laggy. It is bad enough that it is quite hard to fly without crashing
- due to (1), I haven’t added a Pixhawk HIL build to the autotest build script, so there are no Pixhawk HIL binaries automatically built on the firmware.diydrones.com site.
HIL isn’t great on APM either actually, as it also suffers from bad latency problems, but it isn’t as bad as it is on Pixhawk. I generally recommend that users setup SITL instead, ad that provides a much better way of testing the ardupilot code.
Can you recommend a resource on working with the SIL? I have a couple questions on the interaction between the APM Planner application and the MAVlink/jsbsim processes.
Thanks in advance for any help you can provide on a resource to work with.
I’m using APM 3.0.3 HIL version on my PX4FMU+PX4IO with success. It works very well.
As flight simulator I’m using X-Plane.
With ArduPlane or ArduCopter?
I would like it very much if ArduCopter also works… does anyone want to look into this?
Do you have any news about this subject? I am also trying to run a HIL simulation using the Pixhawk but I am having some trouble uploading the required firmware to it. On the other hand, is it necesary to calibrate all the hardware (accelerometers, giro, radio, etc) to perform a HIL simulation?
I have been following the instructions in the link below with v2.68 HIL (cannot upload this firmware to Pixhawk) with no success. It seems like at least I have successfully linked FG to the Mission Planner because everytime I click “Sim Link Start/Stop” when I am controlling the airplane from my keyboard (I cannot control it from my RC reciever yet) I can see that I loose control of the airplane and it stops moving completely (I hope it is because the autopilot output displays zero for roll, pitch, yaw and throttle).
First post here, and I was wondering whether HIL simulation for the Pixhawk is coming, or whether SITL is the preferred method.
As of a few days ago it has been improved.
Just keep in mind that as our code improves, the latency in the HIL system is getting increasingly difficult to work with. It can be made flyable, but it will probably never be realistic.
The best experience may be SITL with a cheap USB adapter for your RC transmitter.
How would one go about setting up a SITL? Would this be able to test a Python script run on the autopilot, or simply waypoint navigation? Thanks
I’m also interessted in that. What’s going on?
I will use X-Plane to train pilots on the plane. If HIL works, that would be great. If not, what should I do? Only “control” the sim is the half way. The cockpit will then miss the MissionPlanner-Screen with the other Info and controll-functions.
Is there a general technical limitation or missing stuff (sorry, I cant help 'cause I cant develop…)