I am part of a team of Engineering Master’s students and we have a project that might benefit from using Ardupilot. This post is intended to query the ardupilot experts (you guys!) to see if it could work for our application described below.
Project: The project is for a computing class and we will apply machine learning algorithms to detect and pinpoint early failures in a drone. To apply machine learning, we need data that represents failed states to feed into the machine learning algorithm.
Why Ardupilot?: We are wondering if an open source flight control software like Ardupilot allows enough flexibility of base level control to simulate failures by limiting power to a single motor (dying motor), providing intermittent power to a motor(poor communication) etc…
We don’t have a lot of drone experience, but we have a lot of arduino and tinkering experience and a moderate amount of programming experience. What do you think?
Machine Learning is certainly a hot topic so it would be great to see it applied to AP. AP sends a lot of information to the companion computer via MAVLink but it’s possible/likely we might need to add some new mavlink messages to give you some of the data you’re looking for.
I’m obviously biased but I think AP is a good choice (for anyone) because it is very versatile meaning you’ll have a lot of choices in hardware and frame types (not just multicopters but plane, boats, rovers, etc) but perhaps more importantly it’s very stable, reliable and well documented so I think it provides a solid base from which to work from.
By the way, despite the name, ArduPilot no longer includes any Arduino code, it’s all C++ now. It happened over time but bit by bit we moved away from Arduino to allow support for a wider range of boards with more processing power.
Depending on the approach you take, and course constraints, this could also be used to find optimal tuning/controller gains.
We have had some success using skyviper 2450 and ardupilot to detect and classify events like minor impacts and wind at different locations on the drone. Cool!
Now we want to take a step further and are wondering about programmaticly simulating motor/drivetrain failure. The goal is to periodically drop motor output to one of the motors. Verbally it might be something like…“Every 1 second, set motor 1 output to 0 for 50 ms, then return to normal control”. I’ve been looking over the code for the ardupilot firmware, but am not sure the best way to do this. Any thoughts?
There’s another group in this thread also looking at testing motor loss. In that discussion there’s a patch which allows cutting power to one motor for testing. It’s not part of the main (aka “master”) ardupilot code but I think we will add it eventually but I can’t say when that will happen… so for now it might be best to apply that patch to master (or Copter-3.6) for testing.