Achieving Stable Flight in GPS-Denied Environments

featuring position-holding, a gripper, and sensor fusion with optical flow and LiDAR

Quadcopter flying over grass in a yard
The assembled UAV

This UAV was built and iterated over the span of three years. It is capable of holding position in GPS-denied environments using optical flow and LiDAR. It was designed with a modular 3D-printed airframe and servo-actuated gripper to move payloads. It implements EKF sensor fusion, remote telemetry, and power distribution systems.


CAD model with gussets and a gear rack
CAD model of the quadcopter frame with gripper rack
CAD model of the gripper rack and rail assembly
The initial CAD

Photo Log

   
Black 3D printed plate with metal inserts M3 inserts are set into the 3D printed middle plate. The inserts ensure that the PLA can’t strip.
Carbon fiber arm with two standoffs on its end We used carbon fiber arms instead of 3D printed plastic arms. This change allowed us to customize and expand our frame while retaining the rigidity and durability of a traditional full carbon fiber frame.
Four carbon fiber arms with 3D printed landing gear 3D printed landing gear are attached to each arm. These were used for initial assembly and testing and will later be swapped for more durable landing gear with metal inserts.
Black 3D printed bottom plate with standoffs and screws The bottom plate was also 3D printed for expandability. M3 standoffs were added to the edge for later construction.
3D printed plate with threaded posts and screws Components start to get screwed together.
Partly assembled frame with carbon arms and a plate The arms are mounted to the bottom plate. The center brace is also made of carbon fiber for better horizontal rigidity.
Assembled frame with top plate and standoffs The top plate is attached to the chassis. The four protruding screws in the center are where we will mount the flight controller (FC) and electronic speed controller (ESC).
ESC board with four motors and wires The motors are soldered to the ESC. The XT60 LiPo connector and a capacitor are soldered to the ESC. The capacitor smooths voltage spikes to prevent brownouts and dirty power for the FC.
ESC mounted on frame with motors and wiring The ESC is attached to the top plate. The motors are attached to the arms.
Motor on arm end with landing gear legs Each arm has four screw holes on the end. Two are for the motors and two are for the landing gear. The M3 spacers between the motor and the arm allow this to happen.
Frame with blue standoffs and a wired ESC board M3 standoffs are added to the chassis plates. Later, the top plate will be attached to these standoffs.
Small compass board with a wiring harness The combined barometer and magnetometer, or compass, is plugged into a custom-soldered wiring harness.
Receiver module in a black mount with wires The XM+ receiver is placed in a 3D printed mount and has wires soldered onto it.
Small video transmitter with wires and antenna The RDQ Mach 3 video transmitter (VTX) has wires soldered onto it.
Small blue sensor board with wires Wires are soldered onto the combined LiDAR/optical flow sensor. We are only using the optical flow function because the built-in LiDAR sensor doesn’t have a long enough range.
Taped telemetry radio with wires and antenna The telemetry radio is plugged into a custom-soldered wiring harness. This radio allows wireless configuration of the quadcopter, as well as the ability to see telemetry data in real time.
Radio and receiver zip tied to the frame plate The telemetry radio and receiver are attached to the bottom plate of the chassis using a zip tie.
Power module with XT60 connector on the frame The power module is attached. This module provides clean power at a standard voltage for the Pixhawk.
Blue sensor board attached under the frame The LiDAR/optical flow sensor is attached to the underside of the bottom frame.
White velcro pad on a 3D printed mounting plate The custom 3D printed mounting plate for the Pixhawk flight controller is attached to the ESC. With velcro attached, the Pixhawk will hook in place for simple removal.
Small Foxeer camera with its lens The camera is attached to a mount that we will then attach to the quadcopter.
Loose video transmitter wiring with an antenna The wiring system for the video transmitter, camera, and servo motor is soldered up. See more details in the wiring diagram.
Camera mounted between blue standoffs The camera and its mount are attached to the middle chassis plate.
Black sensor module with a label on the frame The magnetometer/barometer is attached to the top chassis plate. It has been attached far away from large metallic objects and from battery/motor cables to prevent electrical interference.
Pixhawk flight controller on frame with a cardboard pad The external, more powerful LiDAR sensor is attached to the bottom of the quadcopter.
Small board with red LEDs on a black mount The Pixhawk is attached to the Pixhawk mount. Cardboard between the mount and the Pixhawk dampens vibrations.
Small video board with pin labels and a zip tie The VTX is zip-tied in place to the top chassis plate.
Black propeller guard around a motor Propeller guards are attached to the arms.
Propeller on a motor with landing gear legs The propellers are attached to the motors.
Black landing gear with metal screw inserts We made this new version of the landing gear with metal inserts and screws throughout, improving durability.
Blue servo with its gears exposed Typical servos are limited to a total of about 180 degrees. Continuous rotation servos exist, but many are too weak for our use. To overcome this, we have modified a standard servo to convert it to continuous rotation. First, the servo is opened.
Metal gear and bearing held in tweezers The servo is typically limited by the small light-gray pin. In the photograph, you can see that we have ground it down with a Dremel to remove the limit. Additionally, we have ground down the potentiometer and glued it in place.
Blue servo mounted on an orange 3D printed bracket The modified servo is attached to the gripper base, and a gear is attached to the servo spline.
Orange printed bar next to a white candle Throughout the gripper’s construction, it is lubricated with candle wax for smooth operation.
Orange printed gripper rack with a servo The second half of the gripper and the rack are attached.
Orange gripper attached to the frame with a servo The gripper assembly is attached to the middle plate of the quadcopter. Washers and nuts keep it in place.
Frame with an orange plate and cyan propellers The top plate is attached. The orange part on top of the plate is to prevent the battery from becoming punctured by the screws that go through the top plate.

Wiring Schematic

Wiring diagram of the drone electronics

ArduPilot

ArduPilot is an open-source piece of software that is used for flight control and autonomous navigation. This software runs on the Pixhawk. Our ArduPilot setup used a number of sensors for flight operations:

  • Accelerometers, gyroscopes, and compasses: to understand its acceleration, speed, and changes in angle in a 3-dimensional space. These were built into the Pixhawk and did not have to be configured. One external compass was connected over I2C to keep it away from high-current, electromagnetically noisy battery lines. All of those sensors were calibrated in Mission Planner for accuracy.
  • LiDAR: to measure altitude from the ground. This sensor is placed facing down and times how long a beam of light takes to bounce off of the ground to measure the quadcopter’s height. This allows for accurate altitude control, enhancing control. The LiDAR sensor is connected over UART to the TELEM 2 port and configured in Mission Planner.
  • Barometer: to measure air pressure to find altitude, as a backup to the LiDAR. However, the LiDAR is more accurate and is unaffected by propeller wash, unlike the barometer. If the LiDAR and barometer measure dramatically different altitudes, ArduPilot uses other sensors to determine which is most accurate. The barometer is built into the I2C compass module.
  • Optical flow: to measure movement, essentially a camera pointed at the ground–like a computer mouse sensor. Our goal is to enable position holding–i.e., the ability to remove all controller inputs and have the quadcopter hover, motionless. This task requires precise location measurements, and accelerometers are not accurate on their own to accomplish this–they tend to drift. A GPS receiver would usually be required for position holding, but GPS does not work indoors. However, an optical flow sensor is, of course, able to operate inside and is capable of enabling position holding, increasing the quadcopter’s stability. The sensor is connected over UART to the SERIAL 4 port and configured and calibrated in Mission Planner.

There were two popular alternatives to ArduPilot that we considered and dismissed: Betaflight and iNav. Betaflight is intended for racing drones, and, as such, it lacks the ability to use optical flow or LiDAR sensors and cannot hold altitude, much less position. On the other hand, iNav seemed very promising: It is very easy to configure, and the quadcopter flew well without tuning. However, iNav is less powerful and less configurable than ArduPilot. For example, it is impossible to take off in Position Hold mode in iNav. Instead, the pilot must take off in Altitude Hold mode and switch to Position Hold mode in the air, which is not a limitation in ArduPilot. This limitation creates a few hazardous seconds where the pilot is not fully in control. Additionally, iNav has worse hardware compatibility than ArduPilot. Therefore, ArduPilot was the best option for our quadcopter.

Still, ArduPilot led to some challenges. There were strong oscillations in flight, and completing pre-arm checks was difficult. Oscillations were solved by turning down PID loop sensitivity, which made the drone feel “floaty” but led to controlled flight. ArduPilot normally looks for GPS, battery sensors, and more before allowing the pilot to arm. We disabled those checks because we are flying in an enclosed space where those features are unnecessary. Finally, configuring all sensors took time but was doable with help from our resources.


Quadcopter frame with LiPo battery on a glossy table
Carbon fiber quadcopter with blue propellers on a table
Black 3D printed cage drone with blue propellers
Older versions

Mission Planner

ArduPilot is configured through the use of parameters–hundreds of values that refer to specific settings. To configure something specific in ArduPilot, the user must edit one of those parameters. To tell ArduPilot that our optical flow sensor uses the MSP communications protocol, for example, we must set the RNGFND1_TYPE parameter to the value of 32, which internally represents MSP. This is where Ground Control Station–or GCS–software comes in. This software allows the user to easily change parameters in a human-readable format. Furthermore, many GCS software choices let the pilot view live telemetry data, access flight logs, and more. There are two primary GCS choices for ArduPilot: Mission Planner and QGroundControl. QGroundControl is cross-platform and has a more user-friendly interface. However, its capabilities are more limited than Mission Planner’s, so we decided to use Mission Planner.

If we were operating with GPS, Mission Planner would let us create waypoints and define commands for autonomous use–but, of course, we aren’t performing those operations. However, Mission Planner still gives real-time telemetry data using the 3DR radio, which tracks the vehicle’s altitude, speed, battery voltage and draw, and sensor readings. Using this information, fine adjustments can be made to the drone using Mission Planner in conjunction with ArduPilot. Flight logs are also recorded for review later on, which can give us important insights about the drone’s behavior.


Quadcopter with blue propellers flying over a carpet

All projects