Hi heli group!


Allow myself to introduce.. myself..


I'm Chris. I work in a controls research lab at UT San Antonio as an undergrad researcher. I'm currently doing research to apply fuzzy logic as a replacement for PID feedback control in complex systems such as traditional helicopters. ArduCopter is something that looks to be very promising in helping me solve the numerous problems of system integration that stand in the way of having a working testbed for my control algorithms.


The only thing standing in the way of progress for me is having hardware-in-the-loop simulation working for traditional helicopters. Our lab runs a Thunder Tiger Raptor 90 as its testbed, and to be blunt, I'm scared to death of trying to test a brand spanking new control method on a 90 series nitro heli.


I'm new to the open-source community, but I've got a huge vested interest in seeing this feature added to ArduCopter. This project is something that I can most likely devote not only my own time to, but also the time of my fellow researchers, as well as the time of the members of the IEEE Student Chapter Robotics team that I currently chair.


If I don't hear back from anyone in the next couple of weeks, I'll assume that nobody is working it, and I'll start the project on my own. But if you are currently working the project and need help, I'd gladly accept any guidance that you might have, so that I can help the effort along.




Views: 6070

Replies to This Discussion

Hi Guys,


ok to test heli hil what you need is.


APM Planner


first extract AeroSimRCAPMHil.zip to your AeroSimRC plugin directory eg

C:\Program Files (x86)\AeroSIM-RC\plugin\APMHil

upload the heli hil build to your APM. ive been using these options






next start the planner and connect, goto the sim tab and pick aerosimrc and tick heli.

change the throttle sim gain to 500, the rest are ok at 10000

click start sim link.

next start aerosimrc, pick the heli model.

goto plugins and enable APMHil.


now you should be ready to go.




I've tried it on my little wimpy 1.3Ghz machine and it has problems running AeroSimRC properly.  Apparently the min requirement is a 2Ghz machine so I have a new laptop arriving in a week or so and I'll test it again then.


This is a big step forward, i'll knock up a wiki page with your instructions as well.

I can't wait to test it on my i7 machine. I built it from scratch with about $2,000 worth of parts from NewEgg as a gaming rig. It's overclocked to 4.0 GHz, and it's been hungry to start on this project!


Thanks for all your hard work, Mick! You are the MAN!

Hey Mick,


Will this setup work using only an Arduino Mega 2560 by its self with no other hardware? It seems to be unhappy not being connected to the radio and stuff for manual control, but I'd really like to muck around in simulation a bit with just the Arduino by its self because I won't have my RC setup for a little while.

Ok, I've got it working now, but the simulation is not receiving altitude data so there's no good feedback for the throttle control to use. The rest of the controls seem to work ok.

Make sure you change the throttle gain to 500

That's done. The output stays at 1.0, regardless of actual altitude, and it doesn't seem to control at all. I have to actually change the gains artificially to make the heli change altitude.

I'm going to keep tweaking, but maybe there's something I didn't put in the build correctly or something. I'll get back with you if I figure it out.


Does the APM navigate properly for you?

Ok I'm not sure what's wrong, but maybe I'm using the wrong build or something. All I did was download the Arducopter_2_0_49.zip, load it into the Arduino software, set the configuration definitions into APM_config.h, and flash it. I seem to get some kind of connection, but it doesn't fly anything correctly.


Sorry for the noobness, but I must be missing a step somewhere. Again, I'm not the best programmer in the universe. It took me about 10 minutes just to figure out that I needed to change the project directory before I could flash the rom XD


use the code you have and replace the entire apm_config.h file with this



#define HIL_MODE            HIL_MODE_ATTITUDE 
// roll 
#define STABILIZE_ROLL_P 0.70 
#define STABILIZE_ROLL_I 0.025 
#define STABILIZE_ROLL_D 0.04 
#define STABILIZE_PITCH_P 0.70 
#define STABILIZE_PITCH_I 0.025 
#define STABILIZE_PITCH_D 0.04 
// yaw stablise 
#define STABILIZE_YAW_P  0.7 
#define STABILIZE_YAW_I  0.02 
#define STABILIZE_YAW_D  0.0 
// yaw rate 
#define RATE_YAW_P  0.135    
#define RATE_YAW_I  0.0 
#define RATE_YAW_D  0.0 
// throttle 
#define THROTTLE_P 0.2 
#define THROTTLE_I 0.001 
#define THROTTLE_IMAX 100 
// navigation 
#define NAV_LOITER_P  1.1 
#define NAV_LOITER_I  0.03 
#define NAV_LOITER_D  0.02 
#define NAV_LOITER_IMAX  10 






you may also need to disable the CLI so you can boot it on a standard 2560 board


also, in the sim throttle is always 100%, in the planner throttle actualy shows collective.

I think you need a radio connected to the APM.  Without a radio, you essentially don't have anyway to tell the APM what attitude you want (in stabilise mode).  If you are able to modify the roll, pitch, collective or yaw in the sim, I suspect what's happening is that your inputs are overriding what the APM is providing to the sim (i.e. you're commands are bypassing the APM) which probably isn't super useful.  You could test loiter and waypoints however though perhaps because I believe you can change the flight mode from the mission planner.


Sorry, I can't give more specific advice because I'm still waiting for my beefier PC to arrive before giving the sim a 2nd try.

ive been testing using joystick override. which will override/not need any rc receiver. but you do need a 4 axis joystick.

What's the default speed of the port? It was at 115200 before, but the arduino's defaulting to 9600 now. Would it be good or bad if I arbitrarily bumped that back up to the faster rates (or does it matter)?


© 2018   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service