Pixhawk A Syste
Pixhawk A Syste
Pixhawk A Syste
Vision
Lorenz Meier, Petri Tanskanen, Friedrich Fraundorfer and Marc Pollefeys
A. Vision-IMU Combination
As the trigger system supports both monocular and stereo Fig. 3. PIXHAWK Middleware Architecture Layers
setups, any localization approach that uses one or two
cameras can receive the vision-IMU data and process it. The PIXHAWK robotics toolkit is based on a lightweight
The attitude (roll, pitch, yawspeed) is available as part of protocol called MAVLink, which scales from serial to
the image metadata. This allows to speed up the localization UDP links. It serves also as communication protocol be-
algorithms, either by providing an initial guess of the attitude tween flight computer (pxIMU) and onboard main computer
or in closed form as direct contribution to the localization. In (pxCOMex/pxOvero). This is also important for the safe
operation of any robotic aircraft, as a human operator should
always be able to intervene. The typical 30-100 m range of
WiFi does not generalize to most outdoor applications, which
makes a communication architecture scaling down to radio
modems also desirable for the off-board communication.
As shown in Figure 3, the PIXHAWK Linux middleware
consists of several layers. This architecture allows to use
the different base communication layers (ROS and LCM)
and provides a convenient high-level programming interface
(API) to the image distribution server. MAVLink messages Fig. 4. pxIMU Inertial Measurement Unit
from the IMU and the ground control station can also be
directly received in any process.
be flashed via an USB bootloader and stores settings such
A. MAVLink Protocol
as PID parameters in its onboard EEPROM. It provides the
Our MAVLink protocol is a very lightweight message required I2C bus to the motor controllers and additional
marshalling protocol optimized for micro air vehicles. It GPIOs, ADC input and other peripherals. It is interfaced via
has only 8 bytes overhead per packet, allows routing on UART to the computer vision processing unit and it operates
an inter-system or intra-system level and has an inbuilt at a maximum update rate of 200-500 Hz.
packet-drop detection. Due to the low overhead, it is both 2) Processing Unit: The processing unit it the core piece
suitable for UDP and UART/radio modem transport layers. of the system and consists of a two-board stack. The px-
The efficient encoding also allows to execute the protocol COMEx base board provides the USB and UART periph-
on microcontrollers. These properties allowed building a ho- erals to interface machine vision cameras, communication
mogenous communication architecture across the PIXHAWK equipment and the pxIMU module. It can accept any micro
system. MAVLink has been already adopted by a number of COM express industry standard module. Currently, a Kontron
other systems (pxIMU autopilot, ArduPilotMega autopilot, etxExpress module with Intel Core 2 DUO 1.86GHz and 2
SLUGS autopilot, UDB autopilot). The MAVLink sentences GB DDR3 RAM is used, but future upgrade options include
are generated based on an XML protocol specification file Intel i7 CPUs. It has 4x UART, 7x USB 2.0 and 1x S-ATA
in the MAVLink format. The code generator ensures well- 2.0 peripheral options. The typical onboard setup consists of
formed messages and generates C89-compatible C-code for 4x PointGrey Firefly MV monochrome, 1x USB 2.0 802.11n
the message packing and unpacking. This allows fast and WiFi adapter and 1x S-ATA 128 GB SSD with more than
safe extensions and changes to the communication protocol 100 MB/s write speed. The pxIMU unit, the GPS module
and ensures that no implementation errors will occur for new and the XBee radio modem are connected via UART to the
messages. Our current implementation supports the use of the processing unit. With a weight of 230 g including cooling
lightweight communication marshalling library (LCM) or the and only 27 W peak power consumption, the processing unit
Robot Operating System (ROS) as transport layers. can be easily lifted by a wide range of aerial systems, not
IV. V EHICLE D ESIGN limited to the quadrotor presented here.
C. Outlier Removal zk = H · x k + v k
The data is filtered with a Kalman filter in the next The speed in the model will therefore only be changed
step, which implies that the filter is parametrized with the by measurements and then again assumed constant during
prediction. From this formulation it is already obvious that
varying time steps can be handled by the filter as long
as they are precisely measured. As this filter does not
include the control input matrix B, the filter is assuming
a constant speed model, which is a valid approximation if
the filter update frequency is fast enough with respect to
the change of speed of the physical object. Because the
PIXHAWK system provides a precise timebase, the filter
uses the measured inter-frame interval as time difference
input ∆t. It is using the standard Kalman prediction-update
scheme. If measurements are rejected as outliers, the filter
only predicts for this iteration and compensates in the next
update step for the then longer time interval. This allows the
system to estimate its egomotion for several seconds without
Fig. 7. QGroundControl Operator View with map and detected patterns
new vision measurements.
roll, pitch and yaw each. The craft is actuated by directly −0.2
0
1
0.5 1
mixing the attitude control output onto the four motors. 1.5 2 2.5 3 3.5
0 Y position (meters)
X position (meters)
VI. O PERATOR C ONTROL U NIT
The design paradigm presented in this paper shows a clear Fig. 8. Trajectory of an autonomous flight using ARToolkit localization
separation of the onboard autonomy system and the off-board including takeoff and landing
operator control. As the MAV is not any more a remote
sensor head, no sensor data needs to be transmitted to the As our system is modular, we can also easily replace the
ground control station for autonomous flight. It is therefore ARToolkit-based localization with other methods for position
desirable to reduce the communication and operator load and control. Fig. 9 shows a trajectory resulting from a flight
only send abstract system information such as remaining using a Vicon motion capture system. The localization is
fuel/battery and position. The QGroundControl application very precise (< 1mm error) at a maximum rate of 250 Hz.
allows to represent multiple vehicles. The map view from We use a low latency wireless link to transfer the current
Fig. 7 shows the aerial map view. position computed by the motion capture system to the
helicopter. The flight trajectory contains autonomous takeoff
VII. E XPERIMENTAL R ESULTS / F LIGHT and landing, as well as several yaw rotations and an obstacle
Fig. 8 shows flight results using artificial marker based lo- avoidance reaction (overlapping parts of the trajectory on top
calization. The plot shows a flight around a rectangular path. of the figure). The onboard view of the helicopter during
The two perpendicular movements are autonomous startoff this flight is shown in Fig. 10. This illustrates the flexibility
and landing. The right vertical trajectory is the open-loop and scalability of the system, as these experimental results
liftoff. As initially no computer-vision based localization is include onboard stereo depth estimation, dynamic obstacle
available, the helicopter runs an open-loop maneuver until it avoidance and pattern recognition operating in parallel on the
has 0.5 m altitude. The left vertical path is the autonomous onboard computer. Although sensors delivering a depth map
without high processing burden currently emerge, such as and pattern recognition however increase significantly higher
the PrimeSense Kinect sensor, for outdoor applications stereo load in in the 40-60 % range if run in parallel. Because of
still remains the best option to obtain a depth map on a micro the choice of an industry standard computing platform, the
air vehicle. The significant higher processing performance of presented system will scale with future increases in process-
the presented platform is therefore a key differentiator to the ing performance and always roughly deliver the processing
previous state of the art. speed of a medium-level notebook computer. Hence enough
capacity for extensions is available onboard. As the system
design provides a precise common time base, IMU-GPS-
vision fusion will be a future extension for outdoor navi-
gation. On a multi-system level, the lightweight MAVLink
1.2
Z position (meters)
IX. ACKNOWLEDGMENTS
3.5
3 We would like to thank our students (in alphabetical
2.5
order) Bastian Bücheler, Andi Cortinovis, Fabian Landau,
2
1.5 Laurens Mackay, Tobias Nägeli, Philippe Petit, Martin
1 Rutschmann, Amirehsan Sarabadani, Christian Schluchter
0.5
0 1 and Oliver Scheuss for their contributions to the current
0.5
Y position (meters) −0.5
0
system and the students of the previous semesters for the
−1 −0.5
X position (meters)
foundations they provided. Raffaello d’Andrea and Sergei
Lupashin (ETH IDSC) provided constant and valuable feed-
back. This work was supported in part by the European
Fig. 9. Trajectory of an autonomous flight using Vicon localization
including takeoff and landing Communitys Seventh Framework Programme (FP7/2007-
2013) under grant #231855 (sFly) and by the Swiss National
Science Foundation (SNF) under grant #200021-125017.
R EFERENCES
[1] M Achtelik, A Bachrach, R He, and S Prentice. Stereo vision
and laser odometry for autonomous helicopters in gps-denied indoor
environments. Proceedings of the SPIE Unmanned Systems Technology
XI, 7332, 733219, Jan 2009.
[2] M Blösch, S Weiss, D Scaramuzza, and R Siegwart. Vision based mav
navigation in unknown and unstructured environments. Proc. of The
IEEE International Conference on Robotics and Automation (ICRA),
2010.
[3] G Conte and P Doherty. An integrated uav navigation system based on
aerial image matching. Proceedings of the IEEE Aerospace Conference,
Jan 2008.
[4] SG Fowers, Dah-Jye Lee, BJ Tippetts, KD Lillywhite, AW Dennis,
and JK Archibald. Vision aided stabilization and the development of
a quad-rotor micro uav. International Symposium on Computational
Intelligence in Robotics and Automation, 2007. CIRA 2007., pages 143
Fig. 10. QGroundControl HUD View with live image streaming from the –148, 2007.
helicopter. The live view shows detected faces and patterns by the helicopter. [5] F Fraundorfer, P Tanskanen, and M Pollefeys. A minimal case solution
On the right top corner the computed depth map from the stereo camera to the calibrated relative pose problem for the case of two known
setup is shown. orientation angles. In Kostas Daniilidis, Petros Maragos, and Nikos
Paragios, editors, Computer Vision ECCV 2010, volume 6314, pages
269–282. Springer Berlin / Heidelberg, 2010.
[6] G Hofiann, D Rajnarqan, and S Waslander. The stanford testbed of
VIII. CONCLUSIONS AND FUTURE WORKS autonomous rotorcraft for multi agent control (starmac). Proceedings
The open-source system presented in this paper provides of Digital Avionics Systems Conference (DASC04).
[7] N Roy, R He, A Bachrach, and M Achtelik. On the design and use of a
a new onboard and offboard architecture for computer vision micro air vehicle to track and avoid adversaries. International Journal
based flight with tight IMU integration. As the PIXHAWK of Robotics Research, Jan 2010.
system is built for onboard computer vision, future work [8] D Wagner and D Schmalstieg. Artoolkitplus for pose tracking on mobile
devices. Proceedings of 12th Computer Vision Winter Workshop, Jan
will focus on natural feature based localization and mapping 2007.
for autonomous flight. Other future improvements are the
optimization of the onboard position and attitude control and
the extension of the current waypoint based scheme to tra-
jectory control. The current system load for artificial feature
based localization is 10 % of the maximum CPU capacity.
Higher-level approaches such as stereo obstacle avoidance