JavaScript to remotely control Arducopter


My name is Tomasz, and I don’t have much experience with Ardupilot.
I’m working on a university project which aims to build a drone which can autonomysly takeoff, deliver a small package and return to home. So fare we have managed to assembly a drone, install and partly configure the ArduPilot 3.6.

Our stack:

  • Raspberry Pi 3B+
  • Navio2

On the Raspberry Pi we run our software (a small NodeJS HTTP server which listens to messages) and Ardupilot. Now the quesion is, what is the best way to control the ArduPilot from the JS code from inside the RaspberryPI. JS code should be able to adjust and start a mission preloaded from a file. (ie. list of 3 possible delivery destinations)


Is it possible to control the drone through out MavProxy running on the same machine ? If so how should JavaScript code interact with MavProxy? UDP, Shell scripts?

We would kindly appreciate any suggestions ! :slight_smile:

Ps. Of course there will be a supervisior with a RC controller ready to take over control



AP is pretty good at delivery so it should be possible to complete the project.

At a high level I think you should be able to load a mission using MISSION_ITEM commands but I’ve never done it personally and it’s not documented on our MAVLink interface wiki page (yet)

How about using dronekit and python instead of Java? python will be easier because dronekit allows very easily creating mavlink messages.

I think you might consider popping into the developer gitter channel for more help because there will be people there who know our mavlink interface better than I do

1 Like

pymavlink can also generate java code, that might be an option

Another option is to use mavros and C++. Mavros is a nice interface between mavlink and ros. This is useful if you are going to run other programs as input, as you can send the input via ros. My student team has been using this on a companion computer for the last couple of years and are working on documenting some of the useful functions we have made to help make our navigation programs.

here is our docs site if you want to take a peek