Hardware UAV Simulator

The UAV hardware-in-the-loop simulator (actual flight controller thinks it’s flying a real aircraft, but the sensors are simulated in a flight sim) is operational.

I need to do some more work on it, but it’s flying a route around Dallas (hopefully)

I need to add some signage and documentation, but I have to leave it for now. I’ll be back over the next few days to improve it.

-Mike

5 Likes

Neat. Where’d you get the displays for your instruments ?

they are from saitek

Great work man! Looks Amazing!

-Romeo

1 Like

That flight simulator looks great! I can’t wait to try it out.

1 Like

I’m working out a few bugs… I mistakenly loaded one of my development airframes rather than the published one, and the new parameters, navigation, and flight controllers combined with the much more powerful hardware (I typically do this on a mac w/ virtualization) are throwing off navigation and autonomous flight. So feel free to tinker, but don’t feel bad if it goes wonky right now.

I’m also getting a physical model read so folks can watch the control surfaces move around.
I also need to remember to disable auto-patching, and get some documentation for resetting the simulation published. It will probably take about two (real) weeks of time to get things working more smoothly, simply because I’m not able to get to the space as often as I’d like.

1 Like

Thanks for putting this together Mike!

Once I get the hang of it, I’ll be happy to show others how to fly with it.

2 Likes

Please turn off the simulator when you leave it unattended. I was wondering
why the servos were twitching like a spastic model 101 T-800 in the throes
of death.

I replaced the flight controller, and swapped in the published/non-development airframe. The UAV, while not fully tuned, does fly autonomous circuits. It’s setup for long cycle missions circling three local areas, DFW, down town Dallas and near the 'space.

More improvements on the way.

It’s conducting long cycle stability and navigation testing. All telemetry is logged and can be replayed for diagnostics. If successful, it will perform some 254 laps of its designated course, before performing some kind of end of flight maneuver back at DFW, unless it encounters a solid object prior to that time.

The previous airframe successfully flew an unmanned, autonomous route from Dallas to a mountain top near Chihuahua (at about 15 knots!) and surprisingly was “undamaged” and awaiting instructions south of the border. It did so over a day and a half, some 600 miles, under actual weather conditions along the full length of the route.

The current simulation has weather turned off, more as a function of control testing and because I had begun to tune the PID loops before I was called away. It does not fly like its on rails. It pulls some crazy Ivan and is not yet fully stable in any axis, but the new L1 and throttle controllers are the most unfit (and last to get tuned)

The first draft on the physical airframe was workable, a 3d printed mock aircraft (for animated education on basic aircraft flight, besides being fun to
Watch) and after identifying some improvements, I’ve set aside the design, intending to produce a model that is substantially smaller than the 12" beast I printed (in three beds, fuse, tail, and control surfaces, which snap into place, and are different colors)

The design was fine, and light at .25 wall thickness and 10%, and the balance was (accidentally) perfect, right where the spare would be, but I have in mind to animate the attitude also, and the distances for the arms for the intermediate axis would require too much force for long term operation. So I’ll shrink it and see how that goes for the first round.

Still no docs yet, or signs, or quick reset instructions.

1 Like

Michael, thank you for working on the simulator. It looks really good.

Was it still flying when you saw it? I couldn’t stay through an entire circuit, so I jumped it forward to the jump_to commands, and saw that it was able to navigate (not well) and turn for way point 2, then I had to head out.

I wanted to give it a low-ish flight plan, more dramatic, fun to see more details, but also high enough to hopefully clear most obstacles in the three different areas of Dallas… But I did not check on altitudes, I just guessed that I probably wouldn’t hit anything at 300 meters (so long as initial offset was ok)

Michael, APM 3.3 has been released today, with the ability to use HITL without requiring a special build!

They’ve managed to maintain support for APM2/2.5 also.

Yes, but I recommend waiting a few days for 3.3.1

Waiting is not just for the sim, but very important if you are flying the gear.

While there is a testing process and release candidates, this is a new major release. There are already known problems identified. While “released” this is a new version of code, and anyone who flys should consider this to basically be a completely new aircraft. You are the aircraft builder. You may have flown the airframe hundreds of time, but when you move to a new release, even a minor release, think along the lines of performing a series of flight tests before even thinking about flying new missions.

Do not update casually, especially to a major release. Read the notes. Consider waiting for a few updates. And always perform testing. The greater the release number change, or the lower the last number, the greater need for caution and careful testing.

In this case, there are initial reports that some pilots are having problems arming, due to some of the new logic verifying AHRS health. If similar logic issues exist due to changes in how AHRS is integrated and how if fails over between algorithms, it could easily result in in-flight crashes, navigation problems, fly always.

Tridge and the Plane test team do outstanding work. Please don’t take my comments as criticism. But this software is incredibly complex. I believe it continues to be the largest arduino code base of any project anywhere, and naturally much of the code will not fit on any arduino. They have used every trick in the book to get this release to still work (and it’s almost surely the last) on the APM.

And with every major release, there are important changes, and so many possible situations that haven’t been seen in testing.

So yes, rejoice. But just as flyers should be using operational checklists, so too should they be following disciplined methods for engineering changes to their aircraft. And updating autopilot code is a potentially serious business depending on the potential outcomes for the gear and people involved.

Another important reason (for most operators) to wait is (less so now, but still true) the changes in the GCS software typically used to support changes (such as the new parameters used to set HIL operation, and to setup or control new features) sometimes don’t yet exist.

That isn’t a problem for the developer, who is often using mavproxy or sitl environments, or the test team who are aware of the details of the change and new parameters.

All of this feedback isn’t intended toward and specific person, but provided for general information for those members who are not as aware of the issues.