Giter Site home page Giter Site logo

mcontrol's Introduction

#MControl

PX4/NuttX application to activate offboard control mode and control the drone internaly.

Recent mods

  • Added pthreads

  • Reduce memory consumption

  • Changed architecture to daemon application

  • Added higher level commands

  • Added initial position acquisation

  • Added get_local_position function

  • Give back control to auto mode on sequence completion

  • Tested on the real drone (needs real flight testing)

Capabilities

  • Ability to read from and write to drivers and other applications through uORB interprocesses
    communication layer
  • Fully multithreaded
  • MAVLink protocol independent
  • Works internally on the pixhawk without any use of external calculator
  • High level functions

Requirements

  • summon-arm-toolchain or PX4 toolchain
  • PX4 Firmware
  • Simulation Dependencies

Setup

To setup all the requirements, follow this guide.

First download the PX4 firmware :

git clone https://github.com/PX4/Firmware.git
cd Firmware;
git submodule update --init --recursive

Place the content of this git in Firmware/src/examples/mcontrol

Then add this line to Firmware/cmake/configs/nuttx_px4fmu-v2_default.cmake

examples/mcontrol

Go to main repo (Firmware) then :

make -j4 px4fmu-v2_default

The application should compile with the firmware. Once you have the Nsh access, arm and wait for GPS then takeoff :

commander arm
commander takeoff

You can now activate the mode by :

mcontrol

The drone should take position in theory, needs real flight testing.

You can mod the MControl::start() function to change the required setpoints.

Note : This program can be added to simulation, but it won't work (will cause
the application to crash)

TODO

  • Add automatic arm/disarm
  • Add pthread join in thread_layer destructor to liberate memory
  • Add daemon control features (start, stop, status..)
  • Eliminate possible memory corruptions

Notes

  • Disabling the -Werror=double-promotion flag in cmake/common/px4_base.cmake file might be necessary for now

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.