Coombes 2014
Coombes 2014
Abstract—This paper describes the development of a system for • Simultaneous control of multiple vehicles.
autonomous vehicle testing, utilising conventional network infras- • Control signals and data to be sent using high bandwidth
tructure for communication and control; allowing simultaneous network communication (between any vehicles or con-
control of multiple vehicles of differing vehicle types. A basic level
of autonomy is achieved through the use of an Arduino based nected devices).
commercial autopilot (ArduPilot), which also allows for remote • Compatibility with common development environments,
vehicle control via MAVLink protocol commands given through i.e. MATLAB and Simulink.
serial communication. Traditionally messages are sent using The final point highlights that the main aim of this system is
point-to-point wireless serial modems. As these are restricted
in terms of bandwidth and flexibility, an improved set-up is to provide a capability of testing high level control algorithms,
suggested, where an embedded computer system is attached to without the usual time investment in hardware specific code
each vehicle. A custom written Node.js program (MAVNode) is adaptation. As the intended users will be of various skill levels,
then used to encode and decode MAVLink messages onboard the system was designed for use with MATLAB and Simulink,
allowing communication over a Local Area Network via Wi-Fi. as many people are familiar with this software environment.
A selection of hardware configurations are discussed, including
the use of conventional Wi-Fi and long range Ubiquiti airMAX A set of accompanying functions and blocks were also
wireless routers. Both software and hardware in the loop testing developed for Matlab/Simulink. These functions act as an
is discussed, in addition to the ability to to perform control from interface, providing vehicle data and accepting commands as
Matlab/Simulink. With all the infrastructure in place, algorithms appropriate. Once a vehicle is set-up to use the system, it can
can be rapidly prototyped. As an example use of the system, a be given to an interested party as a ‘black box’, leaving them
quad-rotor visually tracks a robot while using a remote Matlab
installation for image processing and control. to concentrate on algorithm development. To enhance safety
Index Terms—Autopilot; rapid prototyping; algorithm devel- and reduce development time, all testing can be done under
opment; hardware in the loop; software in the loop; invariant both Software In the Loop (SIL) and Hardware In the Loop
object recognition; Ethernet Networks. (HIL) condition before moving on to real world testing. The
virtues of going through this testing procedure is discussed in
I. I NTRODUCTION
[3].
While developing test environments for autonomous-vehicle This rest of this paper discusses the development of the
research, it has been observed that despite the focus of the system in stages. The chosen autopilot and its functions are
research being on the software algorithms, it is often the described in Section II, with the additional system components
development of the physical hardware that takes the longest described in III. Section IV explains how a program called
time. For example, multi-vehicle control algorithms often MAVNode enables the use of the system over the network
require testing on ground vehicles before moving to aircraft, while section V discusses the network infrastructure, its ad-
yet this migration between vehicles can increase development vantages, and alternate configurations. Section VI presents SIL
time significantly. and HIL testing and finally in Section VII an example use of
As such, a generic baseline system that can be used on a the system is presented.
range of development platforms has been developed. When
implemented, this should lower costs and reduce development II. AUTOPILOT S ELECTION
time, while also improving reliability and safety. For this There are already several examples of autopilot systems
system to satisfy the majority of research needs, the following developed by research organisations, usually designed to assist
were considered requirements: with their own research goals; such as [3], [5], [6], and [7].
• A standardised embedded computer structure on board Producing a bespoke autopilot offers the chance to tailor it
each vehicle; providing a low level of autonomy and the to the research requirements exactly, adding only the func-
ability to interface with a range of sensors. tionality required. However, there are many drawbacks to
• Compatibility with multiple vehicle types; for example this approach. Developing control hardware requires specialist
fixed wing and rotary wing aircraft (both multi rotor and knowledge in electronic engineering, systems integration, and
single rotor) and ground vehicles. software engineering, with the additional requirements of
622
Fig. 2: The internal layout of a ground robot
Fig. 3: Quad-rotor with gyro-stabilised camera
623
an Ethernet cable and communicates with a ground robot and a
fixed wing aircraft via airMAX PicoStations on each vehicle.
A short range quad-rotor is also connected via USB Wi-Fi
dongle, directly to the wireless router.
Many networking devices support additional features useful
for research , such as the ability to extend the wireless network
beyond the range of a single access point. For example Wire-
less Distributed Service (WDS), and mesh networks. Provided
that a communication route can be established, it is possible
to send a message to a device that is beyond Wi-Fi range
by ’bouncing’ the signal off one that is closer. For example,
Fig. 4: Application requesting data stream from MAVNode a series of ground robots stationed a few hundreds metres
apart would allow the furthest robot to communicate with the
GCS, despite being well beyond Wi-Fi range. The downside
to this approach is the added latency, as each redirection
shown. For any message sent in this way, all parameter values
requires additional processing. A detailed summary of mesh
must be set or the message will not be delivered. In this
networking is shown in [11].
example message, a pitch angle of 0 rad and a roll angle of
An additional benefit of using Wi-Fi is that the MavLink
1 rad, and a throttle setting of 0.5 are demanded and would
data packages only constitute a tiny percentage of the total
be used to control the FBW mode on a fixed wing aircraft.
available bandwidth. This allows other data, such as video
V. N ETWORK A RCHITECTURE footage or sensor readings, to be sent back to the ground
station, or data from the ground station to be sent to a vehicle.
The most generic and reconfigurable part of the system If the GCS is given access to the Internet, this connection can
is the network architecture. Depending on the range and be shared throughout the network bringing a number of new
bandwidth required, different implementations of Wi-Fi com- possibilities; such as streaming webcam footage, gaining live
munications can be used. For short range testing, such as updates on predicted weather data or even remote controlling
within a single room, a generic wireless router can be used as vehicles from extreme range. If the entire network is outside,
the gateway and wireless access point, with small scale USB and there is no local wired internet connect, a mobile network
WiFi Adaptors used aboard the vehicles. This is sufficient to 3G/4G dongle could be attached to any device to enable web
provide full 150 Mbit/s network capability, with the additional access for the whole network from the cell towers. Rather
benefit of the minimal payload increase. than the GCS providing internet to the attached vehicles,
For long range testing, such as when using aircraft outdoors, the vehicles equipped with mobile broadband can be used to
more specialised equipment is required. After experimentation provide internet to the GCS.
with multiple COTS Wi-Fi systems, the airMAX range of
equipment from Ubiquiti Networks was found to be the VI. S OFTWARE AND HARDWARE IN THE LOOP
most practical solution, offering long range, high integrity Due to the inherent risks in testing novel algorithms on
communications wireless communications. vehicles it is important to verify code functionality before per-
To avoid adding additional complexity, airMAX devices forming real world testing. Risk can be significantly reduced
connect directly to an ethernet port on the embedded system by putting algorithms through the full development cycle of
and operate as wireless bridge. As the Wi-Fi configuration SIL, HIL, which enables systematic debugging to occur. SIL
is dealt with by the device, no additional drivers or software testing allows the flaws in the software implementation to
are required, allowing the devices to be both plug-and-play, be resolved, whilst HIL brings to light any issues which
and interchangeable. For example, the airMAX PicoStation are caused by the software’s interaction with the hardware
is small, has an omni-directional antenna and offers full or networking setup. Eventual real-world testing should then
bandwidth Wi-Fi up to 300m range, making it suitable for use validate the systems capabilities, only testing the functionality
onboard an aircraft. The airMAX Nano station is larger, and of the communications system at range, and the systems ability
is restricted by its 60◦ sector antenna, but offers greater range to handle real world interference, such as weather conditions.
and bandwidth options, making it useful as the connection This SIL and HIL method of testing is easy to implement
point on the ground. When used together, this setup provides using the chosen system arrangement, especially when using
a very reliable connection. APM. In addition to being open source, it is possible to build
An example network configuration is shown in Fig. 5, where the ArduPilot autopilot code to run on a conventional desktop
a network is based around a gateway router. Two GCS are computer running Linux. By interfacing this software-only
connected to the gateway; one of which is monitoring the ArduPilot with a simulated environment, it is possible to have
vehicles through the mission planner software, while the other any control strategy tested on a virtual vehicle beforehand.
is running the high level control algorithms for vehicle control. As ArduPilot is already well established, many software titles,
An airMAX NanoStation is connected to the gateway through such as the X-Plane flight simulator, already support this form
624
GCS 1 GCS 2
Internet 10.0.255.2 10.0.255.3 Human
Supervisor
airMAX Wi-Fi
of interaction. Therefore, the model vehicle within the simula- ground vehicle moved independently and a helipad symbol
tion software is controlled by a desktop build of ArduPilot, and was displayed on its roof for the quadrotor to track. This was
in turn ArduPilot is controlled by an external system (such as intended to represent a scenario such as a helicopter landing
MatLab/Simulink) running high level control algorithms. This on a moving ship, where the general coordinates are known
SIL method enables development to be undertaken without via GPS, and the precision navigation can be achieved through
any ArduPilot hardware, or the associated risks. visual means.
HIL is much the same, but with the actual ArduPilot
hardware physically connected to the computer running the
simulator using a USB cable. As APM is usually the source A. Requirements
of vehicle data (attitude and position) the same simulated data
as used in SIL must be sent out to the ArduPilot hardware As the task was to locate and manoeuvre the aircraft to
for processing, before its response can be assessed. The remain above the helipad (although the landing stage was not
communication between the simulator and ArduPilot is now considered for this demonstration) the process needed to be
done over a virtual serial connection. For actual flight tests both robust and obtainable quick enough for real time control.
APM is once more used as the source of sensor data, however The main disadvantage of this approach is that it limits the
there is no need to adjust the software onboard the autopilot helipad detection to only occurring directly within the field
or the embedded system. ArduPilot and MAVLink have both of view below the aircraft. Therefore, prior knowledge of the
been abstracted to such a high level that the same code can helipads location, such as a rough GPS position, is required
be used unchanged, throughout the whole development cycle. for the aircraft to be in right place for detection to occur.
However, the downward view allows for a great reduction
VII. V ISUAL H ELIPAD D ETECTION AND T RACKING in complexity in the detection process itself. If the aircraft
As a demonstration of the capabilities of this system, an only achieves small angles in roll and pitch, or if the camera
image processing algorithm was developed where the quad- itself is stabilised via a gimbal to look downwards, no reverse
rotor visually tracks a moving ground vehicle. The intention affine or perspective transformation is required. Therefore, the
of the demonstration was to produce similar results to [12], helipad will appear as a shape on a plane, and two dimensional
but using off board processing, an alternative helipad detection template matching can be employed. As the height of the
algorithm and with a moving target on the ground. quad-rotor and its orientation compared to the helipad will
Using the network connection, a video image from the vary, the template recognition algorithm must be scale,rotation
quad-rotor was transmitted to a ground station for processing, and translation invariant. This is know as Invariant Object
before commands were relayed back via MAVLink. The Recognition (IOR).
Fig. 7: Circular and Radial Sampling Filters
626
developed and tested. As each vehicle is network enabled, any
25 Quad
device on the network can read data or send commands.
Robot
By using COTS components, the system is cheap and easy
to integrate into a range of vehicles. As APM is well developed
20 and extremely robust, using the system makes real world
testing easier, quicker and safer.
The flexibility of the system is demonstrated in the above
15 example. Despite the quad-rotor following the helipad well,
North (m)
627