Designing Purpose-Built Drones for Ardupilot Pixhawk 2.1: Build drones with Ardupilot
By Ty Audronis
()
About this ebook
The Ardupilot platform is an application ecosystem that encompasses various OS projects for drone programming, flight control, and advanced functionalities.The Ardupilot platform supports many Comms and APIs, such as DroneKit, ROS, and MAVLink. It unites OS drone projects to provide a common codebase. With the help of this book, you will have the satisfaction of building a drone from scratch and exploring its many recreational uses (aerial photography, playing, aerial surveillance, and so on). This book helps individuals and communities build powerful
UAVs for both personal and commercial purposes. You will learn to unleash the Ardupilot technology for building,
monitoring, and controlling your drones.This is a step-by-step guide covering practical examples and instructions for assembling a drone, building ground control unit using microcontrollers, QgroundControl, and MissionPlanner.
You can further build robotic applications on your drone utilizing critical software libraries and tools from the ROS framework. With the help of DroneKit and MAVLink (for reliable communication), you can customize applications via cloud and mobile to interact with your UAV.
Read more from Ty Audronis
Building Multicopter Video Drones Rating: 5 out of 5 stars5/5Buildbox 2.x Game Development Rating: 0 out of 5 stars0 ratings
Related to Designing Purpose-Built Drones for Ardupilot Pixhawk 2.1
Related ebooks
Building Smart Drones with ESP8266 and Arduino: Build exciting drones by leveraging the capabilities of Arduino and ESP8266 Rating: 0 out of 5 stars0 ratingsBuilding a Quadcopter with Arduino Rating: 0 out of 5 stars0 ratingsBanana Pro Blueprints Rating: 0 out of 5 stars0 ratingsESP8266 Robotics Projects: DIY Wi-Fi controlled robots Rating: 0 out of 5 stars0 ratingsAndroid Things Projects: Efficiently build IoT projects with Android Things Rating: 0 out of 5 stars0 ratingsIntel Edison Projects: Build exciting IoT projects with Intel Edison Rating: 0 out of 5 stars0 ratingsLearn Arduino Prototyping in 10 days Rating: 0 out of 5 stars0 ratingsAndroid System Programming Rating: 5 out of 5 stars5/5Unity Certified Programmer Exam Guide: Pass the Unity certification exam with the help of expert tips and techniques Rating: 0 out of 5 stars0 ratingsMastering Linux Device Driver Development: Write custom device drivers to support computer peripherals in Linux operating systems Rating: 0 out of 5 stars0 ratingsArduino Electronics Blueprints Rating: 4 out of 5 stars4/5Flutter Projects: A practical, project-based guide to building real-world cross-platform mobile applications and games Rating: 0 out of 5 stars0 ratingsLearn Robotics Programming: Build and control AI-enabled autonomous robots using the Raspberry Pi and Python Rating: 0 out of 5 stars0 ratingsLearning Robotics Using Python Rating: 0 out of 5 stars0 ratingsComputer Vision with Python 3 Rating: 0 out of 5 stars0 ratingsAugmented Reality for Developers: Build practical augmented reality applications with Unity, ARCore, ARKit, and Vuforia Rating: 0 out of 5 stars0 ratingsC++ Game Development By Example: Learn to build games and graphics with SFML, OpenGL, and Vulkan using C++ programming Rating: 0 out of 5 stars0 ratingsRaspberry Pi Blueprints Rating: 0 out of 5 stars0 ratingsLearning C for Arduino Rating: 0 out of 5 stars0 ratingsHands-On Industrial Internet of Things: Create a powerful Industrial IoT infrastructure using Industry 4.0 Rating: 0 out of 5 stars0 ratingsUnreal Engine Physics Essentials Rating: 1 out of 5 stars1/5Hands-On Embedded Programming with C++17: Create versatile and robust embedded solutions for MCUs and RTOSes with modern C++ Rating: 0 out of 5 stars0 ratingsLearning ROS for Robotics Programming - Second Edition Rating: 0 out of 5 stars0 ratings
Hardware For You
Programming Arduino: Getting Started with Sketches Rating: 4 out of 5 stars4/5CompTIA A+ Complete Review Guide: Core 1 Exam 220-1101 and Core 2 Exam 220-1102 Rating: 5 out of 5 stars5/5Chip War: The Fight for the World's Most Critical Technology Rating: 4 out of 5 stars4/5CompTIA A+ Complete Review Guide: Exam Core 1 220-1001 and Exam Core 2 220-1002 Rating: 5 out of 5 stars5/5Exploring Apple Mac - Ventura Edition: The Illustrated, Practical Guide to Using MacOS Rating: 0 out of 5 stars0 ratingsMacs For Dummies Rating: 5 out of 5 stars5/5USB Complete: The Developer's Guide Rating: 4 out of 5 stars4/5Dancing with Qubits: How quantum computing works and how it can change the world Rating: 5 out of 5 stars5/5Build Your Own PC Do-It-Yourself For Dummies Rating: 4 out of 5 stars4/5Creative Selection: Inside Apple's Design Process During the Golden Age of Steve Jobs Rating: 5 out of 5 stars5/5Raspberry Pi Cookbook for Python Programmers Rating: 0 out of 5 stars0 ratingsUnlock Any Roku Device: Watch Shows, TV, & Download Apps Rating: 0 out of 5 stars0 ratingsExploring Arduino: Tools and Techniques for Engineering Wizardry Rating: 4 out of 5 stars4/5iPhone For Dummies Rating: 0 out of 5 stars0 ratingsHelp! iOS 17 - iPhone: How to Use iOS17 Rating: 0 out of 5 stars0 ratingsElectrical Engineering | Step by Step Rating: 0 out of 5 stars0 ratingsmacOS Sonoma For Dummies Rating: 0 out of 5 stars0 ratingsChromebook For Dummies Rating: 5 out of 5 stars5/5Debugging: The 9 Indispensable Rules for Finding Even the Most Elusive Software and Hardware Problems Rating: 4 out of 5 stars4/5TI-84 Plus CE Graphing Calculator For Dummies Rating: 0 out of 5 stars0 ratingsLinux All-In-One For Dummies Rating: 2 out of 5 stars2/5Raspberry Pi Electronics Projects for the Evil Genius Rating: 3 out of 5 stars3/5Raspberry Pi for Secret Agents - Second Edition Rating: 3 out of 5 stars3/53D Printing For Dummies Rating: 4 out of 5 stars4/5iMac For Dummies Rating: 0 out of 5 stars0 ratingsArduino Electronics Blueprints Rating: 4 out of 5 stars4/5Linux All-in-One For Dummies Rating: 3 out of 5 stars3/5MacBook For Dummies Rating: 4 out of 5 stars4/5CompTIA A+ Complete Study Guide: Core 1 Exam 220-1101 and Core 2 Exam 220-1102 Rating: 0 out of 5 stars0 ratings
Reviews for Designing Purpose-Built Drones for Ardupilot Pixhawk 2.1
0 ratings0 reviews
Book preview
Designing Purpose-Built Drones for Ardupilot Pixhawk 2.1 - Ty Audronis
Designing Purpose-Built Drones for Ardupilot Pixhawk 2.1
Build drones with Ardupilot
Ty Audronis
BIRMINGHAM - MUMBAI
Designing Purpose-Built Drones for Ardupilot Pixhawk 2.1
Copyright © 2017 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: December 2017
Production reference: 1271217
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78646-916-8
www.packtpub.com
Credits
About the Author
Ty Audronis has been called a technology-age renaissance man.
He’s a professional drone pilot, post-production specialist in the entertainment and media industries, a highly experienced interactive game developer, and an accomplished digital artist. He has worked for companies ranging from frog Design to California Academy of Sciences in roles, where he has worn many hats.
Ty has been programming software and games since 1981 (when he was 8 years old) professionally. He majored in Computer Generated Animation and Visual Effects
in college (where he won Best Animation
for the entire CSU system – a Rosebud Award). He has been building drones since the days when sensors and components had to be torn out of cell phones and game controllers.
Ty is also a mentor, having taught many interns his skills and speaks regularly at venues, including Interdrone. He also serves on the advisory board for the Society of Aerial Cinematographers and for Genarts (now Boris) Sapphire.
About the Reviewer
Ayan Pahwa is an embedded software engineer from New Delhi, India currently working at Mentor Graphics - a Siemens business with 5 plus years of experience in building and racing first person view multi-rotor drones. His professional work areas mainly focus on embedded firmware, device drivers, automotive IoT, and Linux system programming. He has co-founded SDIoT for flourishing drone and other new technologies within local communities. His drone aerial videos can be viewed on his YouTube channel.
Ersin Gonul is a senior design engineer at Turkish Aerospace Industries in Ankara, Turkey. Previously Gonul worked as R & D engineer for companies which they develop unmanned aerial vehicles. He graduated with honors from Selcuk University in Electrical and Electronics Engineering and also he holds a Master degree of Electrical and Electronics Engineering from the Hacettepe University, Ankara. His expertise based on helicopter autopilots and unmanned systems. He is passionate about aviation, multicopters, VTOLs and their control systems. He also holds a Private Pilot License (PPL-H).
www.PacktPub.com
For support files and downloads related to your book, please visit www.PacktPub.com. Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.comand as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
https://www.packtpub.com/mapt
Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career.
Why subscribe?
Fully searchable across every book published by Packt
Copy and paste, print, and bookmark content
On demand and accessible via a web browser
Customer Feedback
Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial process. To help us improve, please leave us an honest review on this book's Amazon page at https://www.amazon.com/dp/1786469162.
If you'd like to join our team of regular reviewers, you can email us at [email protected]. We award our regular reviewers with free eBooks and videos in exchange for their valuable feedback. Help us be relentless in improving our products.
Table of Contents
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the color images of this book
Errata
Piracy
Questions
Drones 101
Introduction to drones
Purposes for drones
Types of drones
USV drones
Rovers
Submersibles
UAV drones
Multirotors
Fixed-wing drones – airplanes
Hybrid drones – VTOL
Helicopter drones
Dirigible drones – Blimps
Ardupilot 101 – A quick overview of Pixhawk 2.1
Safety and best practices
Summary
Your First Drone - An Autonomous RC Car
Our rover
Kitbashing
Rustler VXL
Planning and limitations
Identifying the components
Planning the placement of Pixhawk
3D modeling, printing, and silicone molding
Measure five times, print once
Model it in 3D
Print it in 3D
Preparing for molding
Pouring the mould
Demolding and curing
Hooking up your Pixhawk
Global Positioning System (GPS)
Radio telemetry
RC receiver
Connecting the brain to the body
Programming the Pixhawk for our (basic) rover
The wizard
More calibration...
Testing and driving
Setting waypoints
Summary
A Drone for Hunters – Autonomous Duck Decoy
Spawning a marketable deal
Outlining the scope before you design
Choosing the kitbash boat
Designing the duck body for 3D printing
The basics of 3D modeling
Modeling with subdivs
Box modeling 101
Knifing polygons
Extruding and shifting
Making the duck hollow
Freezing curves into polygons – subdividing
Booleans
Printing large 3D models
Testing for water-tightness
Installing the propulsion system
Steering and electronics
Hooking everything up!
Summary
A Drone for Golfers
The design
Using tank locomotion
Adapting Pixhawk for skid-steering
Using Bluetooth to control Pixhawk with a phone
Using LIDAR to avoid obstacles
LIDAR 101
Making LIDAR work
Mounting the module
Configuring LIDAR with Mission Planner
Summary
Introduction to UAVs
Safety concerns
Propellers - flying cuisinarts
Designing for air versus ground
Weight
Power/lift
Fuel - battery
Learning some physics
Designing a multicopter airframe
Symmetry
Even numbers
Blade clearance
Designing a fixed wing - airplane
Wing design
Summary
A Simple Multicopter Drone
What is 360 VR video, and why make a drone for it?
Spec-ing out the parts
Starting with the payload
Choosing the gimbal
Landing gear
A first-person view – FPV system
The actual aerial platform – drone
Batteries
Running the numbers
Assembling the drone
Too many freakin' wires!
GPS on a stick
Rails are awesome
Anything loose? Tuck it away and tie it down
Hooking up the ESCs to Pixhawk
Configuring Pixhawk and Mission Planner
The initial configuration of Pixhawk
Configuring the ground station
Using joysticks to control a drone
Setting up video
Final configuration before test flights
Summary
The Holy Grail - A Fixed Wing Drone
Why this particular airplane kit?
The assembly
Placing the Pixhawk
Placing the components
Tuning a fixed wing aircraft with mission planner
Configuring the pitot tube
Setting up the LIDAR range finder
Setting up for tuning
Fixed wing flight modes
Setting flight modes
Autotune level
The tuning process
Your maiden flight
AUTOTUNE flight
Taking off and getting ready to tune
Entering AUTOTUNE
How to fly in AUTOTUNE
Testing AUTOTUNE
Autopilot tune
Setting up the mission
Flying the tuning mission
Auto-landing tuning
TECS tuning
Testing and fine tuning TECS
Auto-landing setup and parameters
The testing
Summary
The Principles of VTOL with Pixhawk
The types of VTOL
The hybrid VTOL
Thrust vectored VTOL
Designing your first VTOL
The challenge
The simple gets more complex
The (re-imagined) airframe
Creating our shopping list
The final plan
Implementing Pixhawk
Test and tune before making the leap
Setting up the firmware
Quadplane flight modes
Transitioning from VTOL to airplane
Recommended VTOL RTL procedure
Notes before attempting any transitions
Summary
Programming Ardupilot
The Flight Data interface
The Flight Plan Screen
The Initial Setup screen
Wizard
Mandatory hardware
Optional hardware
Config/Tuning screen
Planner
Flight Modes
Basic Tuning
Standard Params
Advanced Params
Full Parameter List
Full Parameter Tree
The Simulation Screen
Mission Planner terminal
Summary
Preface
We live in the drone age. Drones currently serve purposes in defense, entertainment, and in some countries, package delivery. However, the drone age is still in its infancy. There are a plethora of uses for drones that are just on the cusp of being discovered; drones for mapping, drones for convenience, and even drones for scientific research.
This book will walk you through the design process for drones that navigate the air, land, and even the sea. We will show you how to come up with ideas, overcome the limitations of budget and current technology, and implement them. However, a drone without a brain
is just an RC vehicle. We’ll show you how to integrate the Pixhawk 2.1 guidance system into your drone and how to add peripherals and sensors to Pixhawk to make ordinary RC vehicles into smart drones that serve purposes.
What this book covers
Chapter 1, Drones 101, introduces you to the world of drones and explains that there are many types of drones. We also give you a high-level overview of Ardupilot and Pixhawk flight controller systems. Finally, we walk you through some of the safety best practices to minimize the risks associated with prototyping new drones.
Chapter 2, Your First Drone - An Autonomous RC Car, walks you through kitbashing (using an existing) RC car and turning it into a surface drone (a rover). We show you the basics of designing, 3D-printing, and even molding new parts for your rover to adapt it to Pixhawk. You will be given even more familiarity with the plugs on the Pixhawk 2.1 board and how sensors are attached, as well as a basic overview of the Mission Planner interface. By the end of this chapter, you will have an understanding of how to create a rover using Pixhawk 2.1, a GPS sensor, and a remote telemetry transmitter.
Chapter 3, A Drone for Hunters – Autonomous Duck Decoy, takes the principles of a rover and applies them to the open water. This chapter focuses largely on the process of coming up with a marketable idea and planning your design. You will be shown how to cannibalize parts from an RC boat and implement them into a custom 3D-printed hull (a duck). We will also educate you on the pitfalls of a water drone with regards to waterproofing, ballast, and even water-cooling your drive motor.
Chapter 4, A Drone for Golfers, takes purpose-built rovers to the next level by showing you that drones can fit into almost any market demographic: in this case, golf. We will build a golf trolley on an existing RC golf trolley’s frame and motor system. It implements skid-steering and Bluetooth for telemetry and control, enabling it to follow a golfer that is carrying a phone in their pocket. Also, we will integrate a new sensor: a LIDAR rangefinder that allows the trolley to avoid obstacles while it follows the golfer autonomously.
Chapter 5, Introduction to UAVs, transitions the reader from the surface to the air. Aerial drones represent a whole new level of complexity. With weight considerations, balance, and safety concerns being the focus of this chapter, you will learn to think more like an aeronautical engineer when designing your aerial drones.
Chapter 6, A Simple Multicopter Drone, shows the reader how to build and tune a multicopter drone. We adopt a GoPro
gimbal (designed to stabilize a GoPro camera) to hold a 360° VR camera (a Ricoh Theta S). We also walk you step-by-step through the Mission Planner interface to get a ground station up and running, which will display a video on a laptop screen, along with the heads-up display and even allows you to fly the drone using gaming joysticks.
Chapter 7, The Holy Grail - A Fixed Wing Drone, walks you through designing and setting up a fixed-wing drone. We will integrate an airspeed sensor (pitot tube) and use a rangefinder again but this time to sense altitude from the ground to assist with autonomous landings. This chapter largely focuses on the Mission Planner software. Using it to tune a fixed-wing drone to fly properly, we will execute autonomous missions and even land with no input from the pilot.
Chapter 8, The Principles of VTOL with Pixhawk, is a bonus chapter added due to the popular demand from the drone community. VTOL (Vertical Takeoff and Landing) drones are airplanes that can also hover and land/take off like a helicopter. Rather than build a drone in this chapter, we walk you through the concepts of planning, building, and tuning a VTOL aircraft.
Chapter 9, Programming Ardupilot, is largely a reference chapter designed to give you quick reference to the Mission Planner interface and all of the basic parameters therein.
What you need for this book
This book guides you through building various types of drones by example. You do not have to buy all of the materials, nor even build along-side. All this book really requires from you is an imagination, which we hope to spark by example.
Who this book is for
This book is intended beginners and intermediate drone enthusiasts. But at some point, even professional designers may benefit from the book’s contents.
Conventions
In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.
Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: The next lines of code read the link and assigns it to the to the BeautifulSoup function.
New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: In order to download new modules, we will go to Files | Settings | Project Name | Project Interpreter.
Warnings or important notes appear in a box like this.
Tips and tricks appear like this.
Reader feedback
Feedback from our readers is always welcome. Let us know what you think about this book-what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of. To send us general feedback, simply email [email protected], and mention the book's title in the subject of your message. If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.
Customer support
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
Downloading the color images of this book
We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from https://www.packtpub.com/sites/default/files/downloads/DesigningPurposeBuiltDronesforArdupilotPixhawk21_ColorImages.pdf.
Errata
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books-maybe a mistake in the text or the code-we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.
To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear