Solo Development Guide

Smart Shots

Smart shots allow you to pre-program complicated flight paths, enabling users to concentrate on when to take the shot rather than how to fly the vehicle.

The Smart Shot framework builds upon DroneKit, and adds support to pause and resume shots (storing the flight state) and re-map controller buttons and sticks during a shot.

The most important functions in the solo.smartshot are:

  • Handling RC input. Remapping the control sticks to perform alternate functions. For example, this is used in Cable Cam to allow the right stick to control Solo's position along the virtual cable instead of its position relative to earth.
  • Buttons. A and B can be mapped to provide shortcuts like setting fixed waypoints or recording a position.
import solo
from dronekit.lib import VehicleMode, Location

class FlipShot(solo.smartshot):
    def __init__(self, vehicle, shotmgr):
        self.vehicle = vehicle
        self.shotmgr = shotmgr

    def handle_rcs(self, channels):

    def handle_button(self, button, event):