• Top
  • New

Show HN: I wrote a multicopter simulation library in Python

by hazrmard on 11/13/2023, 8:01:09 PM with 4 comments
Documentation: https://multirotor.readthedocs.io/en/latest/

Source code: https://github.com/hazrmard/multirotor

Demo/Quickstart: https://multirotor.readthedocs.io/en/latest/Quickstart.html

There are many simulation libraries out there. For example AirSim using Unreal Engine, several implementations in Unity3D, Matlab toolboxes. I wanted a simple hackable codebase with which to experiment.

So, I wrote this. Propellers, motors, batteries, airframe are their own components and can be mixed and matched. The code lets you create any number of propellers, and an optimization function learns a PID controller for that vehicle. Additionally, there are convenience functions to visualize in 3D and sensor measurements.

Please let me know what you think :)

  • by westurner on 11/13/2023, 9:04:24 PM

    Could it output drones for existing sims?

    X-Plane Plane Maker: https://developer.x-plane.com/manuals/planemaker/

    Juno: New Origins (and also Hello Engineer)

    MS Flight Simulator cockpits are built with MSFS Avionics Framework which is React-based: https://docs.flightsimulator.com/html/Introduction/SDK_Overv...

    https://news.ycombinator.com/item?id=37619564 :

    > [Multi-objective gym + MuJoCo] for drone simulation

    > Idea: Generate code like BlenderGPT to generate drone rover sim scenarios and environments like the Moon and Mars

    https://news.ycombinator.com/item?id=36052833 :

    > awesome finite element analysis https://www.google.com/search?q=awesome+finite+element+analy...

    Also: awesome-cfd

    https://news.ycombinator.com/item?id=31049608 :

    > Numerical methods in fluid mechanics: https://en.wikipedia.org/wiki/Numerical_methods_in_fluid_mec...

  • by westurner on 11/13/2023, 8:34:28 PM

    * Documentation: https://multirotor.readthedocs.io/en/latest/

    * Source code: https://github.com/hazrmard/multirotor

    * Demo/Quickstart: https://multirotor.readthedocs.io/en/latest/Quickstart.html