Ryan Rasmussen Maggie Krause Jiajun Yang Stratus projectMidterm Presentation
Hardware Progress • Mechanical assembly complete • Received APM case and power module last week • Connected wi-fi module in January but have encountered several problems so far
Hardware Problems • APM and Xbee Explorer not compatible without modification • Dr. Detweiler removed a diode and soldered additional resistors • First wi-fi module is no longer functional, now using spare • We are not sure how it broke, possibly hooked up incorrectly? • Initially used TCP connection, but discovered that when the connection is lost, it was very difficult to recover • Now using UDP, which requires connecting to module with static IP • Several connection problems when working in NIMBUS Lab • Sponsors said they have always encountered wi-fi problems in the building • We don’t have the same problems when using outside the lab
Progress • First semester was focused on assembly and choosing communication hardware • This semester is focused on software with two major goals • Direct connection to phone, which will display copter status and send basic commands • Adding node to existing NIMBUS framework to allow the lab’s ROS system to communicate with the copter’s MAVlink system • Separation of tasks • NIMBUS Integration – Maggie • iOS App – Jiajun • Android App - Ryan
NIMBUS Integration: ROS Overview • Robot Operating System (ROS) • Open-source "meta-operating system" for communicating with robots • Built to be modular and adaptable • Provides a host of command-line tools for testing and development • rosmake, rosrun, roslaunch, rxgraph, etc.
ROS Concepts • Uses a Computation Graph: a network of communicating nodes • Node: A process that performs a specific computation • Topic: A stream of messages published by a node and subscribed to by one or many nodes • Message: a data structure with typed fields, used for sending info or commands • Others: Manifests, stacks, services, bags
NIMBUS ROS System Drone I/O cluster • Runs on Linux, uses ROS system MITAscTec • MITAscTec • Collection of packages for communicating with and monitoring drones • Capabilities: • GUI interface for sending state-based commands • Integration with Vicon infrared camera system in NIMBUS lab and GPS for positioning • Remote access capabilities • Serial communication with drone using XBee module State machine Control cluster
Progress: MAVLink/ROS Node Integration • Quadcopter uses MAVLink protocol, but MITAscTec uses AscTec protocol • Need for intermediate node to translate • Integrating an open-source node • Install MAVLink/ROS package • Determine placement of new node and create launch files specifying node and topic configuration • MAVLink/ROS package: • Outbound data translated from AscTec protocol to MAVLink • Inbound data translated from MAVLink to AscTec protocol
Progress: Integration • Sending commands: • ROS command input • /a/robot_trans translates command to AscTec, /a/robot_prot handles AscTec protocol • MAVLink node translates AscTec to MAVLink and sends commands, receives data similarly
Future Plans: Integration • Test MAVLink inbound node by receiving status/heartbeat (no outbound components) • Test MAVLink outbound node with Vicon launch configuration (Relies on input from Vicon camera system) • Make alterations to MAVLink/ROS node based on differences between MAVLink and ArduCopter protocols • Build other launch configurations once MAVLink/ROS node is tested
iOS App Status • Ability to communicate with APM using UDP • When app starts, it detects heartbeat from APM and extracts APM system ID, which is then used to request a data stream that contains status information • App also accesses iPhone GPS to get current location which will be used to implement “Follow Me” function
iOS App Implementation • MAVlink is a messaging library only available in C • iOS Objective-C allows for easy integration of MAVlink library with no modificationThinking more on the stream pack(ByteBuffer) when send and receive • Using open source iOS code (AsyncUdpSocket) to implement UPD communicationEasy to sent with the port and IP address, and receive Objective-C type Data with action immediately. • Wrote the phone GPS class with the Objective-C framework.
Next Plan • Done on the display part • Available for send actually command. • Test outside with iPhone.
Android App Status • Ability to communicate using UDP and display all copter status info • Notifies user if connection is lost • All commands are implemented, but so far only Arm/Disarm is confirmed to be working • Access to Android GPS for “Follow Me” coordinates
Android App Implementation • Attempted to implement MAVlink library using JNI • Ended up writing Java classes to implement messages and commands • Only implement messages we need (about 15) • Involved working with raw byte data (ByteArray, ByteBuffer) • Wrote custom class for UDP connection that implements InputStream • Same functions as TCP InputStream (avoid refactoring code) • Utilizing Android AsyncTask • Main thread is reserved for UI • AsyncTask allows you to easily launch tasks in a new thread • One thread is dedicated to receiving and unpacking UDP communication • Each command launches an AsyncTask to send command and wait for acknowledgement from APM
Setbacks/Problems • Testing commands must be done outside • Requires GPS • Weather not cooperative • Requirement from sponsors that at least 2 people are present • How did wi-fi module break? • Replacing parts after crashes is time consuming. • Currently need to replace at least one motor
Setbacks/Problems ctd... • ArduCopter does not implement all MAVlink commands • Makes potentially easy commands much harder to implement (Takeoff) • ArduCopter has made several modifications that are not documented • Requires going through source code in detail • May add difficulty to implementation of NIMBUS node • Implemented commands on Android currently not working • Takeoff and Land commands were not working as of last week • Guided Mode vs. Auto Mode? • ArduCopter does not implement MAVlink Takeoff command, which may require sending mission script to copter and changing flight mode and throttle level