Erle-Copter Ubuntu Core special edition operation

Erle-Copter Ubuntu Core special
edition
Operation Manual (version 1.0)
30 de junio de 2015
Índice
1. Introducing Erle-Copter
1.1. A marketplace for drone apps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
3
2. Parts
4
3. Safety and failsafes
6
4. Learning to fly
9
4.1. Flying modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
5. First flight
14
5.1. Attaching propellers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
5.2. Connecting to Erle-Brain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
5.3. Connecting Erle-Brain with APM in Windows . . . . . . . . . . . . . . . . . . . . . 17
5.4. Steps to a safe flight . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
6. Store
21
6.1. Snappy Ubuntu Core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
6.1.1. Software architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
6.2. Installing an app (snap) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
6.3. Creating a drone app . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6.3.1. Building the app . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
6.3.2. Installing the app . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
6.3.3. Running the application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
6.3.4. Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
A. Erle-Brain
26
B. ROS
27
C. Specification
28
D. Resources
28
E. License
29
Erle-Copter, a Ubuntu Core smart drone
2
30 de junio de 2015
1
INTRODUCING ERLE-COPTER
Erle-Copter is a Linux-based drone that uses robotic frameworks such as ROS (the Robot
Operating System) and the award winning APM software autopilot to achieve different flight
modes.
It’s ideal for outdoor operations and it has been designed for an extended flight time and it
can carry a payload of 1 kilogram.
Erle-Copter is the first smart drone that flies with Snappy Ubuntu Core and includes
ROS as the SDK for drone app development.
1.1
A MARKETPLACE FOR DRONE APPS
Together with Canonical and the Open Source Robotics Foundation, we are pushing a new
marketplace for robot and drone applications. An open platform that attracts innovators and
experts to collaborate and compete in the future marketplace of drone and robot applications.
More at ubuntu.com/things.
Erle-Copter, a Ubuntu Core smart drone
3
30 de junio de 2015
2
PARTS
Below the parts that Erle-Copter contains are described. Do not hesitate and ask questions
in our forum.
Radio controller
The Power Module enables to power up your autopilot,
accessories and also reports battery and current states
to Erle-Brain
Erle-Copter makes use of rechargeable Lithium Polymer (LiPo) batteries. More about batteries and chargers
here.
Provides WIFI connection to Erle-Brain
Erle-Copter, a Ubuntu Core smart drone
4
30 de junio de 2015
Provides high gain WIFI connection to Erle-Brain
4 x Electronic speed controller (ESC).
4 x Brushless motors.
GPS + Compass
Radio communicatios in 2.4Ghz band
Telemetry 915MHz or 433MHz
Propellers 10×4.5
Propellers 10×4.5 (self-tightening)
Erle-Copter, a Ubuntu Core smart drone
5
30 de junio de 2015
3
SAFETY AND FAILSAFES
Always turn on the Remote Controller prior to turning on Erle-Copter
Toggle all switches to the top
Be sure there are no distractions when you are flying.
Fly in very large open areas void of obstacles and away from traffic and people. Be aware
of surroundings.
Be sure you have calibrated the IMU’s and the compass and you have GPS fix (Slow continuous blue LED flashing).
When in doubt, pull down the throttle stick and land.
Erle-Copter will not avoid obstacles on its own unless it has been programmed for
it. As the operator, it is your job to recognize and avoid obstructions while flying.
Always fly in an open area away from people and buildings; do not attempt to fly
indoors or in a confined space.
Erle-Copter has powerful motors and high-speed propellers. Never place your
hands near the propellers while Erle-Copter is armed.
All unmanned aerial vehicle (UAV) operators should abide by all regulations from such
organizations as the ICAO (International Civil Aviation Organization) and their own national airspace regulations.
FRAME 1: SAFETY
Environmental factors, such as wind and GPS irregularities, can cause instability in flight.
Erle-Copter will attempt to compensate for these factors by triggering a failsafe if it detects an unsafe flying condition due to loss of controller signal, loss of GPS signal, or low
battery (see below for details). If you observe any inconsistent behavior, land, and consult our team at forum.erlerobotics.com.
RADIO FAILSAFE
Always use the controller as a primary or backup control system when flying. Ensure that
the controller is turned on any time Erle-Copter is powered. If this failsafe is enabled it will get
triggered under the following circumstances:
Erle-Copter, a Ubuntu Core smart drone
6
30 de junio de 2015
The pilot turns off the RC transmitter
The vehicle travels outside of RC range (usually at around 500m 700m)
The receiver loses power (unlikely)
The wires connecting the receiver to the flight controller are broken (unlikely).
Producing the following behavior:
Nothing if the vehicle is already disarmed
Motors will be immediately disarmed if the vehicle is landed OR in stabilize or acro mode
and the pilot’s throttle is at zero
Return-to-Launch (RTL) if the vehicle has a GPS lock and is more than 2 meters from the
home position.
LAND if the vehicle has:
• no GPS lock OR
• is within 2 meters of home OR
• the FS_THR_ENABLE parameter is set to “Enabled Always Land”
Continue with the mission if the vehicle is in AUTO mode and the FS_THR_ENABLE parameter is set to “Enabled Continue with Mission in Auto Mode”.
More about radio failsafe here and here
LOSS OF GPS SIGNAL
Erle-Copter requires an active GPS signal before takeoff. If Erle-Copter loses GPS signal in
flight, it will trigger a GPS failsafe indicated with a high-high-high-low tone, and automatically
switch to manual control (standard - altitude hold mode). Always be prepared to regain manual
control of Erle-Copter at any time while flying and choose an unobstructed flying area to improve GPS signal strength. When flying a mission, we recommended changing the GPS failsafe
behavior to land.
The GPS Failsafe is enabled by default but you can enable or disable it on the Mission Planner’s Standard Parameter List, by setting the FS_GPS_ENABLE parameter
to 0 (Disable) or 1 (Land) or 2 (switch to AltHold). It is highly recommended to leave
it enabled and no known reason why it should ever be disabled.
If you lose GPS lock or experience a GPS Glitch for 5 seconds while in a mode that
requires the GPS (Auto, Guided, Loiter, RTL, Circle, Position or Drift) mode it will
initiate a Land (or AltHold if FS_GPS_ENABLE is set to 2).
Erle-Copter, a Ubuntu Core smart drone
7
30 de junio de 2015
More about GPS failsafe here.
LOW BATTERY
When the battery reaches a low state (voltage under certain value), Erle-Copter will land
with a quick repeating tone. If Erle-Copter reaches the low battery limit during a mission, it will
return to the launch point before landing.
This failsafe permits to you to minimize the risks of having a sudden death of Erle-Copter
and enables a better use of your LiPo batteries.
More about low failsafe battery here.
EKF CHECK & FAILSAFE
The EKF check runs on Erle-Brain and will trigger when the EKF’s compass and velocity
“variance” are higher than 0.8 (configurable with EKF_CHECK_THRESH parameter) for one second. This “variance” increases as the estimates become untrustworthy. 0 = very trustworthy,
>1.0 = very untrustworthy. If both variances climb above the EKF_CHECK_THRESH parameter (default is 0.8) the EKF/Inav failsafe triggers.
When the failsafe triggers, Erle-Brain’s tone-alarm will sound. If telemetry is attached
“EKF variance” will appear on the HUD. And EKF/DCM error will be written to the
dataflash logs.
If flying in a flight mode that does not require GPS nothing further will happen but
you will be unable to switch into an autopilot flight mode (Loiter, PosHold, RTL, Guided,
Auto) until the failure clears. If flying in a mode that requires GPS (Loiter, PosHold, RTL,
Guided, Auto) the vehicle will switch to “pilot controlled” LAND. Meaning the pilot will
have control of the roll and pitch angle but the vehicle will descend, land and finally
disarm its motors. The pilot can, like always switch into a manual flight mode including
Stabilize or AltHold to bring the vehicle home.
The EKF check and failsafe can be disabled by setting the EKF_CHECK_THRESH to “0” through the Ground Control Station’s Config/Tuning, Full Parameter List. Alternatively it can be
made less sensitive by increasing this parameter from 0,8 to 0,9 or 1.0. The downside of increasing the value of this parameter is that during a flyaway caused by a bad compass or GPS
glitching, the vehicle will fly further away before the vehicle is automatically switched to LAND
mode.
More about EKF failsafe here.
Erle-Copter, a Ubuntu Core smart drone
8
30 de junio de 2015
4
LEARNING TO FLY
THROTTLE
Erle-Copter, a Ubuntu Core smart drone
9
30 de junio de 2015
YAW
Flight Tip
When adjusting orientation, move the left stick horizontally without changing its vertical
position.
Erle-Copter, a Ubuntu Core smart drone
10
30 de junio de 2015
PITCH AND ROLL
Flight Tip
Erle-Copter moves according to its orientation. The yellow arms face forward, and the
black arms face backward. Before using the right stick, use yaw to keep Erle-Copter facing
in outward orientation so that the black arms face towards you and the yellow arms face
away from you.
Erle-Copter, a Ubuntu Core smart drone
11
30 de junio de 2015
4.1
FLYING MODES
STABILIZE
Stabilize mode allows you to fly your vehicle manually, but self-levels the roll and pitch axes.
ALT HOLD
In altitude hold mode, the copter maintains a consistent altitude using the internal
pressure sensors while allowing roll, pitch,
and yaw to be controlled normally.
Altitude hold mode is used as the basis of au-
Note
In order to maintain the altitude in this
mode the throttle stick should be in the
middle (40 % to 60 %).
tonomous modes such as LOITER, AUTO, etc.
LOITER
Loiter mode automatically attempts to maintain the current location, heading and altitude
using GPS. The pilot may fly the copter in Loiter mode as if it were in manual. Releasing the
sticks will continue to hold position.
Note
Good GPS position, low magnetic interference on the compass and low vibrations are all
important in achieving good loiter performance.
RTL
RTL stands for Return to Launch.and when activated, Erle-Copter navigates from its current
position to hover above the home position. The home positioned is set as the point where the
copter was armed.
The copter will first rise to RTL_ALT before returning home or maintain the current altitude
if the current altitude is higher than RTL_ALT. The default value for RTL_ALT is 15m.
GUIDED
Guided mode is not a traditional flight mode that would be assigned to a mode switch like
other flight modes. The guided mode capability is enabled using a ground station application
and telemetry radio. This capability allows you to interactively command the copter to travel
Erle-Copter, a Ubuntu Core smart drone
12
30 de junio de 2015
to a target location by clicking on a point on the Ground Station Flight Data map. Once the
location is reached, the copter will hover at that location, waiting for the next target.
FOLLOW ME
The follow me mode makes it possible for you to have your copter follow you as you move,
using a telemetry radio and a ground station. The easiest way is to use a phone or tablet as your
Follow Me ground station . Follow Me mode uses dynamic waypoint feature.
AUTO
In Auto mode Erle-Copter will follow a pre-programmed mission script stored in the brain
which is made up of navigation commands (i.e. waypoints) and “do” commands (i.e. commands
that do not affect the location of the copter including triggering a camera shutter).
Note
Auto mode incorporates the altitude control from altitude hold mode and position control from Loiter mode and should not be attempted before these modes are flying well.
All the same requirements apply including ensuring that vibration levels and compass interference levels are acceptable and that the GPS is functioning well including returning
an HDOP of under 2.0.
AUTOTUNE
AutoTune attempts to tune the stabilization algorithm to provide the highest response without significant overshoot. It does this by twitching the copter in the roll and pitch access which
means that the copter needs to be basically flyable in AltHold mode before attempting to use
AutoTune.
FRAME 2: NOTE
This mode is just to optimize copter’s flight, Erle-Robotics will deliver vehicle’s parameters list to the customers.
More modes and information at Erle-Copter gitbook.
Erle-Copter, a Ubuntu Core smart drone
13
30 de junio de 2015
5
FIRST FLIGHT
5.1
ATTACHING PROPELLERS
Erle-Copter uses four propellers. Propellers generally come in pairs and there are classified
by the color of each central nut. One should turn in clockwise direction and the other in the opposite. Clockwise propellers are also known as ”pusher kind”propellers and are marked with
an R”(sometimes it’s a ”P”). Each propeller has locking and unlocking direction symbols. To attach, spin the propeller in the direction of the locking symbol. The propellers will automatically
tighten onto the motors when you arm Erle-Copter before takeoff.
Propeller
Lock: Tighten the propeller
Fastening/
in this direction.
Lock: Tighten the propeller
in this direction.
Unlock: Remove the prope-
Unlock: Remove the prope-
Un-fastening
ller in this direction.
ller in this direction.
FRAME 3: FLIGHT TIME
Damaged propellers should be replaced by purchasing new ones if necessary.
5.2
CONNECTING TO ERLE-BRAIN
USING A WIFI DONGLE (5 GHZ FREQUENCY)
If you purchased your brain with WiFi you’ll see that we attached and configured a dongle
that will create automatically a WiFi network (hotspot mode) with names with an erle preffix. The IP address of Erle-Brain is generally 10.0.0.1 and your machine should get the 10.0.0.2
(DHCP server has been configured to assign only one address).
FRAME 4: USING A WIFI DONGLE (5 GHZ FREQUENCY)
Make sure that your laptop/phone/tablet/... has 5 GHz support. You should look for
802.11 ac support. Erle-Copter creates a network called .erle-copter”. The password for
the network is holaerle.
Then SSH into the board:
Erle-Copter, a Ubuntu Core smart drone
14
30 de junio de 2015
SSH via WIFI
ssh ubuntu@10.0.0.1
(Windows users, try PuTTY to SSH into the board)
THROUGH MINI USB
Erle-Brain supports client mode USB. Using this connection mechanism and the Ethernetover-USB kernel module you should be able to SSH into the board.
To do so, connect Erle-Brain using the mini USB connector. Find the new network interface that should’ve been created in your OS and assign the following IP address: 192.168.7.1.
Assuming that your new interface is eth6 and you are in Linux or MACOS:
Configuring interface
sudo ifconfig eth6 192.168.7.1
Now that you are in the same subnet just ssh into the board:
SSH via USB
ssh ubuntu@192.168.7.2
WINDOWS
To connect Erle-Brain in Windows connect the mini-USB cable. In devices and printers you
will see the following:
In your computer, the beaglebone configure one port, in my case COM4, it shows in the
properties of the devices:
Erle-Copter, a Ubuntu Core smart drone
15
30 de junio de 2015
Launch Putty app, be careful, you are connected via serial not via ssh, and the baud rate is
115200:
Press open
Press enter, if you use Snappy the password is ubuntu, if you use debian the password is
root:
Erle-Copter, a Ubuntu Core smart drone
16
30 de junio de 2015
5.3
CONNECTING ERLE-BRAIN WITH APM IN WINDOWS
To connect Erle-Brain in Windows connect the mini-USB cable. In devices and printers you
will see the following:
Second button, and select network configuration
Select your local area network connection in this case number 3.
Erle-Copter, a Ubuntu Core smart drone
17
30 de junio de 2015
Choose properties and go to IPV4 protocol:
Double click here and this screen will appear, copy the following configuration:
Erle-Copter, a Ubuntu Core smart drone
18
30 de junio de 2015
Accept this configuration and close the window.
Launch APM, go to communication–>add link–>udp.
Erle-Copter, a Ubuntu Core smart drone
19
30 de junio de 2015
5.4
STEPS TO A SAFE FLIGHT
Note
Ensure that the controller is always turned on while Erle-Copter is powered.
Connect the battery
To activate the motors, hold the left stick down-right
until the motors spin. Now you’re ready for takeoff!
Take off and gain altitude by raising the left stick
slightly above center.
Rotate counter-clockwise and clockwise by moving the left stick left and right.
Fly forward, backward, left, or right by moving the
right stick in the direction you want to fly.
Release the right stick to level.
Lower the left stick below center to descend.
After landing, hold the left stick down-left until the
motors stop spinning.
Disconnect the battery
Erle-Copter, a Ubuntu Core smart drone
20
30 de junio de 2015
6
STORE
This section will describe the app store for robots (drones) that Erle Robotics is pushing
through its partnership with Canonical to support the next generation of drones that will be
connected to the internet, update automatically and will have access to an app store for drones. Following up with our passion for bringing Linux-based drones to the market we are happy
to share that the first apps are starting to show up in the store and are freely available.
6.1
SNAPPY UBUNTU CORE
“Snappy Ubuntu Core is the new version of Ubuntu that includes transactional updates - a
minimal server image with the same libraries as today’s Ubuntu, but applications are provided
through a simpler mechanism. The snappy approach is faster, more reliable, and lets us provide
stronger security guarantees for apps and users.”
We’ve partnered with Canonical to deliver the next generation of robots connected to the
internet and having access to automatic security upgrades, applications and developer tools.
6.1.1
SOFTWARE ARCHITECTURE
There are four layers that make up a snappy machine: the hardware layer, provided by the
device manufacturer or Canonical, the system layer, provided by Canonical, a layer of frameworks that extend the base system produced by vendors in collaboration with Canonical, and a
set of snappy applications, provided directly by vendors. Updating any piece just means using
the new version of a read-only image, reverting to a previous version is just as easy.
Erle-Copter, a Ubuntu Core smart drone
21
30 de junio de 2015
6.2
INSTALLING AN APP (SNAP)
Installing apps (aka snaps) with Snappy is super easy, just put any of the IP addresses of the
device in your browser and port 4200 (e.g.: http://192.168.7.2:4200):
Now just select one of the available apps in the store:
Erle-Copter, a Ubuntu Core smart drone
22
30 de junio de 2015
Clicking install the installation process will begin:
Once the process has finished, you’ll get a screen like the following:
All done! Now you have hello world app installed and run the app with:
echo.hello-world.canonical
obtaining:
Hello World
6.3
CREATING A DRONE APP
This section covers how to develop a simple drone application (snap) with Snappy Ubuntu
Core using Erle-Brain.
The following code will help us understand how to create a simple drone application that
will print in the standart output the date in the drone.
Erle-Copter, a Ubuntu Core smart drone
23
30 de junio de 2015
FRAME 5: STRUCTURE
��� meta
�
��� erle-small.png
�
��� package.yaml
�
��� readme.md
��� src
��� script.sh
A snap needs at the very least:
a meta folder
a meta/package.yaml describing the app
a meta/readme.md with at least two lines describing the app.
source code (we put this into the src folder)
Let’s take a look at each one of these files:
FRAME 6: META/PACKAGE.YAML
name: erle-date.erle
vendor: Erle Robotics
icon: meta/erle-small.png
version: 1.0
architecture: armhf
binaries:
- name: src/script.sh
maintainer: Erle Robotics
FRAME 7: META/README.MD
Erle Robotics date snap example
This snap outputs the date.
(contact@erlerobotics.com)
FRAME 8: SRC/SCRIPT.SH
#!/bin/bash
#date >> /home/ubuntu/date.txt
echo "date: $(date)"
Erle-Copter, a Ubuntu Core smart drone
24
30 de junio de 2015
6.3.1
BUILDING THE APP
From the root directory of the app we proceed using the following command:
snappy build .
This will create a file called erle-date.erle_1.0_armhf.snap that can be installed or uploaded
to the app store.
6.3.2
INSTALLING THE APP
In order to install the app, run:
sudo snappy install erle-date.erle_1.0_armhf.snap
6.3.3
RUNNING THE APPLICATION
After having installed the app, you should be able to run it through:
erle-date.erle.script.sh
which will produce:
date: Mon Feb 23 15:22:20 UTC 2015
6.3.4
SOURCES
Source code of erle-date app
Erle-Copter, a Ubuntu Core smart drone
25
30 de junio de 2015
A
ERLE-BRAIN
Erle-brain is an open hardware and open source Linux-based autopilot to make drones. It
consists of a BeagleBone Black and a PixHawk Fire Cape and comes with a Ubuntu Snappy Core image flashed, ROS preinstalled and the latest ready to fly code.
We ship Erle-brain with the following characteristics:
Ubuntu Snappy Core
ROS Indigo Igloo
APM
Cortex-A8 @ 1 GHz 4 GB eMMC and microSD card capable - 512 MB RAM
9 PWM outputs
RC Input using either PPM-SUM or S.Bus
1 USB Host, 1 UART, 3 I2C, Buzzer connector, Failsafe connector.
Erle-Copter, a Ubuntu Core smart drone
26
30 de junio de 2015
B
ROS
ROS (Robot Operating System) is a BSD-licensed system for controlling robotic compo-
nents from a PC. A ROS system is comprised of a number of independent nodes, each of which
communicates with the other nodes using a publish/subscribe messaging model. For example,
a particular sensor’s driver might be implemented as a node, which publishes sensor data in a
stream of messages. These messages could be consumed by any number of other nodes, including filters, loggers, and also higher-level systems such as guidance, pathfinding, etc.
Note that nodes in ROS do not have to be on the same system (multiple computers) or even
of the same architecture. You could have a Arduino publishing messages, a laptop subscribing
to them, and an Android phone driving motors. This makes ROS really flexible and adaptable
to the needs of the user. ROS is also open source, maintained by many people.
More at http://wiki.ros.org/ or Gitbook
ROS Answers is a crowd-sourced resource for everything ROS.
Erle-Copter, a Ubuntu Core smart drone
27
30 de junio de 2015
C
SPECIFICATION
Autopilot
Erle-Brain
Firmware
ArduCopter
GPS
uBlox GPS with Compass
Telemetry radio
Radio Telemetry (915 MHz or 433 MHz)
Motors
950 kV
Frame type
X
Propellers
PROPELLERS 10×4.5 counterclockwise (PAIR)
PROPELLERS 10×4.5 clockwise (PAIR)
Low battery voltage
10.5V
High battery voltage
12.6V
Battery cell limits
4S
Radio range
up to 1 Km
Flight time
15-20 minutes*
FRAME 9: FLIGHT TIME
Flight time depends on wind conditions, elevation, payload, temperature, humidity, flying
mode and pilot skill.
D
RESOURCES
Hardware
https://erlerobotics.com/blog/erle-copter/
Store
https://erlerobotics.com/blog/tienda
Forum
forum.erlerobotics.com
Online doc
Erle-Copter gitbook
Erle-Copter, a Ubuntu Core smart drone
28
30 de junio de 2015
E
LICENSE
Unless specified, this content is licensed under the Creative Commons Attribution-NonComercial-Share Alike 3.0 Unported License. To
view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative Commons, 171 Second Street,
Suite 300, San Francisco, California, 94105, USA.
If you plan on using this material for commercial purposes get in touch with us at contact@erlerobot.com
Erle-Copter, a Ubuntu Core smart drone
29