Figure above illustrates the hardware components of the communication subsystem. This subsystem has two XBee modules to implement wireless communication between the GCS and the Arduino. And the Arduino communicates with the SBC using a USB wire. For the software part, the subsystem also applies MAVLink protocol with pre-defined message types.
The basic function of the communication subsystem is to serve as the interfaces between different data types and different hardwares. The MAVLink protocol (described in 4.3.1) enable us to standardize the message format and abstract the data from hardware difference. The capabilities and performance of the subsystem are listed below:
l ) The wireless communication has a data range of larger than 100 meters.
2) The UAV state data is transmitted to the GCS and the SBC at 10 Hz, including its roll, pitch, yaw, GPS location and current waypoint.
3) The subsystem is able to send commands from the SBC and the GCS to the Arduino.
4) Both wireless and wired communications have the heartbeat mechanism and can keep checking the connection availability during the mission.
The flow chart above is of the software in the communication subsystem. It illustrates the processes of sending a message from the SBC to the Arduino and the processes of receiving a message from the Arduino to the GCS. We can observe the communication program (wiredComm.cpp or wirelessComm.cpp) acts as the interface between the ROS nodes on its own device and the messages from other devices. The MAVLink.h file contains the pre-defined message types that the communication program will refer to.