Skip to content

Drone drivers

Each drone needs its own driver or bridge, started in its own terminal before the mission connects (examples default to start_driver=False). This is the real-world counterpart of the simulation bridge.

Pick your drone below for the install, the driver command, and a worked flight. Targets are defined in scripts/lib/drones.sh.

Pick your drone

Installs MAVROS and the GeographicLib geoid datasets.

make setup                 # pick: control
make drone-mavros

Start the driver, then fly a 2 m square:

make driver DRONE=mavros FCU_URL=serial:///dev/ttyUSB0:921600   # terminal 1
nectar-activate                                                 # terminal 2
python3 nectar/nectar/examples/control/basic.py --drone mavros --mode position --side 2.0

No separate install: pymavlink ships with the core SDK, so the mission opens the link itself. make drone-mavros adds the geoid data used for GPS altitude.

Outdoor needs no bridge; fly directly:

nectar-activate
python3 nectar/nectar/examples/control/basic.py \
    --drone mavlink --mode position --side 2.0 --env outdoor \
    --connection serial:///dev/ttyUSB0:921600

Indoor (GPS-denied) starts the vision-pose bridge first:

make driver DRONE=mavlink ENV=indoor          # terminal 1: VISION_POSITION_ESTIMATE -> FCU
python3 nectar/nectar/examples/control/basic.py \
    --drone mavlink --mode position --side 2.0 --env indoor    # terminal 2

Reuses MAVROS, launched with px4.launch.

make setup                 # pick: control
make drone-px4
make driver DRONE=px4 FCU_URL=udp://:14540@127.0.0.1:14580   # terminal 1
nectar-activate                                              # terminal 2
python3 nectar/nectar/examples/control/basic.py --drone px4 --mode position --side 2.0

No separate install: pymavlink ships with the core SDK. Outdoor the mission opens the link itself; indoor starts the vision-pose bridge (make driver DRONE=px4_mavlink ENV=indoor).

nectar-activate
python3 nectar/nectar/examples/control/basic.py --drone px4_mavlink --mode position --side 2.0

Installs px4_msgs and the Micro XRCE-DDS Agent (real hardware; no SITL).

make setup                 # pick: control
make drone-px4-dds
make driver-px4-dds DEV=/dev/ttyUSB0 BAUD=921600   # terminal 1 (PORT=8888 for UDP)
nectar-activate                                    # terminal 2
python3 nectar/nectar/examples/control/basic.py --drone px4_dds

To add an object detector to the same mission, install ai too (make setupcontrol ai) and use from nectar.ai.detection import Detector.

Installs Crazyswarm2 (apt when available, else source) plus radio udev rules. Set your URI in crazyflies.yaml.

make drone-crazyflie
make driver-crazyflie      # terminal 1: Crazyflie server
nectar-activate            # terminal 2
python3 nectar/nectar/examples/control/basic.py \
    --drone crazyflie --mode position --height 0.5 --side 0.6

Installs ros2_parrot_arsdk and ros2_bebop_driver (source build).

make drone-bebop
make driver-bebop IP=192.168.42.1   # terminal 1
nectar-activate                     # terminal 2
python3 nectar/nectar/examples/control/basic.py --drone bebop

Manage drivers

  • Install every driver at once with make drone-all.
  • Stop all running drivers and bridges with make driver-stop.
  • Override connections with the FCU_URL, DEV, BAUD, PORT, and IP env vars.
  • Per-type shortcuts exist (make driver-mavros, driver-px4, ...).

For the full backend matrix and configuration, see the Control module.