Falcon’s software is equal parts geometric calculation code and streamlined communication script.
Our Arduino program acts as the interpreter between the computer and the servo motors. It opens bluetooth communication, which allows our Python script to send commands wirelessly, and then translates those commands into pulsing signals that our servo motors can interpret.
Our servo motors are controlled by a series of pulses and delays. In this mode, called Pulse-Burst Positioning, each pulse sent moves the servo at a preprogrammed resolution of 800 steps per revolution. If multiple pulses are sent in fast succession, the servos internally chain these commands together to create a longer movement. Internally, the servos calculate acceleration and velocity profiles to create a smooth, controlled movement. The final control line involved in controlling our servos is an alternate speed control. When a series of pulses is accompanied by a brief pulse of this control line, the servos will perform the action at a second predetermined max velocity.
Our control scripts leverage the features described above to create a smooth, controlled movement with finely orchestrated motion among all of the servos.
Our Python code performs our control and navigation operations. Users can create paths or generate them from waypoints, and then calibrate and ‘fly’ Falcon using the command line.
To create a smoother Linux user experience, we’ve created detailed documentation for setting up the connection with our Bluetooth modules, located on our Github repository. The provided Bluetooth configuration file, along with a Python method which automatically connects the user’s computer to the Bluetooth modules located on each node, ensure consistent and easy connection.
The Skycam class’s go_path method uses the node length differences attribute of its path to communicate with the Arduino and instruct it to spool in or out specific amounts. We calculate these values by first calculating the distance between each node and a point for any given point along the loaded path. We then calculate the subsequent change in node wire length between each step, and iterate over these values to ‘fly’ the Falcon system, sending Bluetooth commands for each step.
To implement our Waypoint control scheme, we allow the user to input an arbitrary number of waypoints they wish the camera to traverse. Our software uses Scipy’s interpolation library to generate a spline through the given coordinates, and in order to achieve a smooth flight path, we then need to recreate the spline as a list of equidistant points. We use a binary search and solver to track along our generated curve and determine appropriate coordinates. The distance, as well as the tolerance of our search, can be set by the user. Every path we create is stored in a Path object, which encodes a list of coordinates, as well as more useful information such as the node spool lengths, and change in node lengths for any given point. When a user attempts to initialize a new Path, our software also determines if any point falls outside of the physical boundaries of our system, and will initialize that Path as a null object, preventing a user from moving to an illegal location.
This website, the one you are currently reading, was designed, handcrafted, and written with love from the team. We utilized the Bootstrap framework to make it (almost completely) responsive for your viewing pleasure on any device! We also featured iframes to embed Medium blog posts, Google Sheets, code snippets, and interactive CAD renderings. Please enjoy!