Re: [drones-discuss] HIL Simulation Issue

241 views
Skip to first unread message

Chris Anderson

unread,
May 14, 2013, 1:03:14 PM5/14/13
to drones-discuss

Brandon, I know you're using Xplane HIL with the current code. Can you verify Paul's issue?

--
Chris Anderson
CEO, 3D Robotics
ch...@3drobotics.com

On May 14, 2013 11:49 AM, "Paul Marsh" <pdmar...@gmail.com> wrote:
After trying to get input on this issue via the DIY Drones forum, I contacted 3D Robotics directly.  They, in turn, suggested I post this issue here.  If anyone happens to know if this is, in fact, a software bug, or if I should try certain things to get this to work, I would greatly appreciate the information.

I have had this problem off and on since getting my APM 2.0 and it seems to generally be related to new releases of firmware.  I think I ruled out Mission Planner, but I can't be entirely sure.

When running the HIL simulation version of firmware, and if all is working as it should, I can go to the controller calibration screen within MP and observe inputs from my RC transmitter and I can calibrate those inputs.  However, when it's not working, MP does not register any input from the transmitter.  If I enable a joystick, it does not work either.  If I make the connection to the sim (X-Plane 10), no inputs are seen on the simulation page in MP either and, as expected, I can't control the virtual plane in X-Plane.

As I mentioned, this generally happens with new releases of firmware.  I resolve the issue by going back in releases.  However, it's not that black-and-white.  I had it working with ArduPlane 2.68, but when I upgraded to 2.72, inputs were no longer registered.  I went back to 2.68 and it still would not work.  I had to go back to 2.65, which worked, and then up to 2.68 again and it would work.  2.72 will not work at all in this regard.  Just to be clear, I was loading the HIL version of firmware.  Also, I have never had this kind of problem in real mode.

Thank you for any help you can provide.

Sincerely,
Paul

--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Brandon Basso

unread,
May 14, 2013, 2:34:02 PM5/14/13
to drones-...@googlegroups.com
Paul and Chris,

I can confirm--I'm having the same issue...
  1. Had a working HIL Plane setup with 2.72
  2. Upgraded to HIL Plane 2.73
  3. Could not do RC calibration (config screen did not show input from handset)
  4. Wiped eeprom, and went back to HIL Plane 2.72
  5. Still not able to do an RC calibration
Interestingly, my handset is actually communicating with the APM--I confirmed by flying in manual in HIL with Xplane10.  The HUD is showing the correct mode and what looks like the correct attitude--no idea why since I wiped the eeprom.  When switching to any mode other than manual, the plane crashes--it's not entirely clear what it's trying to do, but it is very similar behavior to what happens when you load plane non-HIL Plane code on the APM and try to do HIL.

-Brandon

Chris Anderson

unread,
May 14, 2013, 5:40:24 PM5/14/13
to drones-discuss
Thanks for the forensics, Brandon. Can you work with Michael O to find a fix?

Thanks, 

Chris

Brandon Basso

unread,
May 14, 2013, 6:14:16 PM5/14/13
to drones-...@googlegroups.com
Chris--sure, i'll try to get in contact.

Paul--I have no idea why flashing the eeprom and reverting to 2.72 did not work, but i'm going to try again with an earlier version.  Will also give compiling from trunk a try and see if that works.

-Brandon

On Tue, May 14, 2013 at 1:51 PM, Paul Marsh <pdmar...@gmail.com> wrote:
Hi Brandon,

Thanks for taking time to look into this.  It's good to know someone else is seeing the same behavior.  Hopefully this can be addressed in the code.

Sincerely,
Paul

Craig Elder

unread,
May 17, 2013, 2:44:39 PM5/17/13
to drones-discuss
Hi Paul

Unfortunately there are some known incompatibilities between various Pre-HAL, Post HAL versions of the flight code and Pre-HAL, Post HAL versions of MP.   In addition 2.68 actually turns off some of the messages between the APM and MP and those settings can persist after you changes to some of the other combinations of flightcode and planner.

Several months ago the way the parameters work between versions was changed so that erasing the eeprom between firmware releases in most cases is no longer required and in the cases where it is required, a message is displayed in MP.

We have tested APM 2.5, with AP 2.73 and AP 2.73 HIL, using MP 1.2.50 and X-Plane and everything seems to be working well.  We were unable to reproduce your failure but I may not fully understand the issue.  Can you please try using the latest flight code and MP and see if the error persists.

Thanks,

Craig




Craig Elder

unread,
May 17, 2013, 2:48:50 PM5/17/13
to drones-discuss
Also please verify in Configuration - Planner - Telemetry Rates that the messages going between the APM and MP are not turned off.

Thanks,

Craig


Craig Elder

unread,
May 17, 2013, 9:33:05 PM5/17/13
to drones-discuss
Nathan

We have identified the issue with 2.73 and the HIL and a change made with the L1 controller for HIL.

A fix is in progress. 

Thanks for your information and your patience.

Regards


Craig




On Fri, May 17, 2013 at 3:52 PM, Nathan Feldkamp <fel...@gmail.com> wrote:
Hello, I tried HIL with
  • X-Plane 9.70
  • Mission Planner 1.2.50
  • HIL 2.69 (I have used this version extensively with no problems)
  • HIL 2.73 (does not work properly)
I have been able to fly with HIL 2.73; however, the only flight mode that works is Manual and the data being displayed on the PFD is incorrect. The compass is pointing in the wrong direction and the artificial horizon is not matching the instruments in XPl-;ane.
I flashed from HIL 2.69 (built with "#define HIL_MODE HIL_MODE_ATTITUDE") to HIL 2.73 (uploaded via mission planner) and did not reconfigure anything.
I was able to take off manually, but stabilized mode was constantly filing to maintain level flight. The aircraft would bank to one side and slowly descend. When I switched to Auto, MP drew the orange line to the WP but the aircraft weaved back and forth and did not fly to the WP.

I have attached some screenshots showing my settings and comparing the PFD with X-Plane. I can do a more detailed description of exactly the steps I do through to set up HIL with X-Plane if you think it will help.

Thanks for looking into this and let me know what else I can do to be of assistance.

Craig Elder

unread,
May 20, 2013, 8:39:19 PM5/20/13
to drones-discuss
This issue has been fixed and MP 1.2.51 has been released

Scott Heyman

unread,
Feb 4, 2014, 7:20:41 PM2/4/14
to drones-...@googlegroups.com
I have the same issue as Paul. However, it should be noted that the Terminal mode calibration does register the transmitter inputs. Additionally, the RC inputs are still passed to the X-plane simulator, as I can see the control surfaces moving, but the deflections are very small.


Scott


On Tuesday, May 14, 2013 8:07:25 AM UTC-4, Paul Marsh wrote:

Randy Mackay

unread,
Feb 4, 2014, 7:56:04 PM2/4/14
to drones-...@googlegroups.com

 

      I guess you’re talking about plane and not copter.  For copter I haven’t tried to use anything but SITL in quite some time.  HIL hasn’t been working reliably since we introduced inertial nav for alt hold back in AC2.9.

                  http://dev.ardupilot.com/wiki/setting-up-sitl-on-windows/

 

-Randy

--

Scott Heyman

unread,
Feb 4, 2014, 8:10:04 PM2/4/14
to drones-...@googlegroups.com
Well, after days of trouble shooting, I may have just solved my problem just minutes after I posted. I believe the transmitter must be calibrated with the simulation link on. Additionally, I had the throttle gain set to 90000 in the Simulation tab. When I set it back to the default 10000, it worked perfectly. And yes, this is arduplane.

Chris Anderson

unread,
Feb 4, 2014, 8:21:10 PM2/4/14
to drones-discuss
Scott: Thanks for the detective work. Is that something that should be added to the manual instructions?

-Chris


On Tue, Feb 4, 2014 at 5:10 PM, Scott Heyman <shhe...@gmail.com> wrote:
Well, after days of trouble shooting, I may have just solved my problem just minutes after I posted. I believe the transmitter must be calibrated with the simulation link on. Additionally, I had the throttle gain set to 90000 in the Simulation tab. When I set it back to the default 10000, it worked perfectly. And yes, this is arduplane.

--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Scott Heyman

unread,
Feb 4, 2014, 11:14:32 PM2/4/14
to drones-...@googlegroups.com
Chris,
It probably wouldn't hurt mentioning it down in the "ERROR MESSAGES AND FIXES" section. Something like:


"Transmitter calibration bars not visible or not moving: Make sure you are connected to the APM, X-Plane is running, and the Simulation Link is started."


Also, in the Flight Planner Settings section, you may want to add an explicit "then click 'Connect'. " to the end of the second sentence for people like me who are mindlessly following the directions. Its completely obvious now, but the only way I figured that one out was by watching some videos. If I can figure out how to make one of those YouTube videos that shows a recording of your screen, I will go ahead and make a step-by-step video for the whole HIL section just to make it easy on people.

Thanks,
Scott 

Chris Anderson

unread,
Feb 5, 2014, 10:31:41 AM2/5/14
to drones-discuss
Manual updated as suggested! We'd be happy to give you wiki edit access, so you can improve that page yourself, including those tutorial videos. 

I'll send an email intro to Alex, who can set you up with that. 

Thanks, 

Chris
Reply all
Reply to author
Forward
0 new messages