Ah, asdf does indeed have a local config option
It didn't seem to work and now it does.
HOKAY Physics can now send info about its bodies and ground to Foxglove.
...For sheep are stupid, and have to be driven. But goats are intelligent, and need to be led.
-- Terry Pratchett
This is a toy system for playing around with autonomous drone/quadcopter simulations, using Elixir. Right now it is not intended to be used for real drones or to do anything fancy, but maybe someday that will change. It is mostly just a proof-of-concept for building robotics systems using Elixir and the Erlang VM.
Easiest to just use asdf
, for better or for worse.
source ~/.asdf/asdf.whatever
asdf plugin add erlang
asdf plugin add elixir
asdf plugin add elixir-ls
mix deps.get
iex -S mix
Things this lib provides:
A lot of the design here is a direct reaction to using ROS/ROS2, so it uses different design assumptions to see if everything I've been complaining about with ROS can actually be fixed as easily as I think it can. Thus it assumes as much as possible is on a single computer, embraces the simplicity of a central authority for coordination/etc, and makes a strict separation between onboard reliable communications and offboard unreliable communications.
Velocity control seems like the obvious place to start, nice compromise between high-level and low-level. Basically the autonomy system tells the flight controller "fly forward at 3 m/s and rotate CCW at 0.1 radians per second" or whatever X times per second and the flight controller does it. This is fairly simple to implement on both ends and means that the autonomy system only needs to know the basics about the aircraft's flight performance -- speed and acceleration limits. More info might make the autonomy better, but only incrementally. Other options might exist in the future.
When we get to using a real flight controller, we will assume it is PX4 and talk to it via MAVLink, PX4's data networking protocol.
This should be able to work with any size/shape drone between 10cm and full-size helicopter, as long as it can hover, fly at up to a reasonable speed (<200 kph?) and isn't too picky about things like glide slopes. Anything needing to know about actual aerodynamics of the vehicle is a problem for another time.
We will start off assuming only the most basic of sensors -- IMU and maybe altimeter. A real drone will always try to have GPS, but in reality GPS is noisy and unreliable and sometimes you wanna fly indoors, so I want to start off making sure we can fly without GPS. SLAM with a lidar or cameras or both is a research project for another time. Intermittent GPS is a research project for another time. If we can fly well without awareness of the environment then obstacle avoidance and pathfinding and stuff starts becoming possible.
Once you start flying >1 km away from its origin the curvature of the earth starts becoming detectable and you need to deal with it, this isn't gonna happen at first but part of the goal of this is to figure out how to handle it well.
It needs to understand that wind exists and be able to do something about it.
It needs to understand that sensors are noisy and be able to do something about it. Detecting and making decisions about outright failed sensors is out of scope for now.
It needs to understand that the ground is a real thing that can hurt you, and that the ground where you land may not be at the same altitude as the ground where you took off.