You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JS wrapper for mavlink/MAVSDK using grpc-web to generate a static http client, communicating through the Envoy proxy.
NOTE: this is still a proof of concept, don't try to use it in production!
Contributing
The next steps that are required are:
Write a nice API for some selected features (e.g. action.arm, action.takeoff, and telemetry.position) using RxJS.
(Optional) Make a small UI using those features (e.g. a "takeoff" button, and show the position values somewhere).
Write templates based on 1) to auto-generate the full API from our proto definitions.
Deploy the package.
Getting started
Prerequisites
This project is about providing a package to write frontend JS code, but this code needs to communicate to the drone through a backend. Two components are required:
Envoy proxy: it converts the websocket messages to/from the frontend into gRPC messages sent to mavsdk_server.
mavsdk_server: the MAVSDK gRPC server that handles the MAVLink communication with the drone.
(optional) Simulator (SITL): which is more convenient and safer than testing on a real drone.
To help getting started, we built those components as docker micro-services. Given that you have docker and docker-compose installed, simply run the following command to start those components:
$ cd docker
$ docker-compose up
Once the docker containers are running, you should be able to start QGroundControl, and it should connect to the simulator (headless gazebo in this case).
Install the SDK
Install the npm dependencies:
$ npm install
Generate the gRPC/protobut static files (those are the ones that will be used by the final API):
$ ./generator.sh
Finally, run the development server:
$ npm run build
$ npm start
It will say something like: Project is running at https://localhost:8080/. If docker-compose started correctly, opening this webpage should make the drone arm and takeoff. That would be visible from QGroundControl and from the docker-compose logs: