Skip to content
This repository has been archived by the owner on Jun 22, 2022. It is now read-only.

Setting everything up

Wermeille Bastien edited this page Jul 15, 2020 · 15 revisions

The setup that we use consists of three components that work together:

  1. QGroundControl is the control tower of the setup. You can see the drone's position and issue simple commands to it. We will refer to it as QGC in this wiki.
  2. PX4 is the simulator. It simulates the behaviour of the drone.
  3. The MavLink server is the connection between the instructions issued by the app and the commands sent to the drone (or the simulator).
  4. Fly2Find is our app. It connects and talks to the MavLink server.

Getting all components for your OS

Installing QGroundControl

Simply go to http://qgroundcontrol.com/ and run the installer that fits your OS.

Installing PX4

We use PX4 in headless mode in a docker container.

On Linux

docker run --rm -it -p 8554:8554 jonasvautherin/px4-gazebo-headless:latest

On Windows

  • If you have windows pro and can run docker: docker run --rm -it -p 8554:8554 jonasvautherin/px4-gazebo-headless:latest

  • If you do have Windows and have to use docker toolbox instead of docker, use docker run --rm -it -p 8554:8554 jonasvautherin/px4-gazebo-headless:latest 10.0.2.2 10.0.2.2

Installing the MavLink server

Go to https://github.com/mavlink/mavsdk/releases and download the server that suits your machine.

Running everything

  1. Run QGC: simply launch the program.
  2. Run PX4
    • On Linux: docker run --rm -it -p 8554:8554 jonasvautherin/px4-gazebo-headless:latest
    • On Windows with docker: docker run --rm -it -p 8554:8554 jonasvautherin/px4-gazebo-headless:latest
    • On Windows with docker toolbox: docker run --rm -it -p 8554:8554 jonasvautherin/px4-gazebo-headless:latest 10.0.2.2 10.0.2.2
  3. Run the MavLink server on port 50051: ./mavsdk_server* -p 50051. Note that the name of the mavsdk server might be slightly different than in this example.
  4. Run our app

Important :

In the first release, the MAVSDK server is running directly on the phone and needs to be paired with PX4 otherwise the application won't work. It requires a slight modification on the PX4 running command :

  • docker run --rm -it -p 8554:8554 jonasvautherin/px4-gazebo-headless:latest YOUR_IP where YOUR_IP is the phone'ip where the application is running. Note that point 3 above is no more required.

⚠️ Be sure that your smartphone is on the same local network than your docker setup !