To use ROSflight to its full potential, you will need the following parts on your MAV (Minature Aerial Vehicle). ROSflight supports both multirotor and fixedwing vehicles.
- Aircraft Frame, Motor(s), ESC(s), Battery and Propeller(s)
- Flight Controller (FC)
- Any external sensors
- Vibration Isolation for FC
- Onboard Computer
- Wi-Fi Router and Dongle
- RC transmitter and receiver
- Laptop or base station computer
- Joystick (Xbox controller)
Frame, Motors, ESCs, Battery and Propeller
We do not officially support any specific multirotor or airplane frame, motor, ESC, Battery or Propeller combination. There are a lot of great resources for building your own MAV, and there are a lot of great kits out there that have all of these parts.
If you are designing your own multirotor or airplane, you may want to look at ecalc, an online tool which can help you design a proper ESC/Battery/Motor/Propeller system for your MAV.
Some things to keep in mind as you design or build your MAV.
- Most kits do not include space for an onboard computer, cameras, laser scanners or other sensors. Be sure to think about where these components are going to go, and how their placement will affect the CG of the MAV.
- You will likely also need to customize the power circuitry of your MAV to provide power at some specific voltage to your onboard computer. Many people like to separate the power electronics (The ESCs and motors) from the computer and onboard sensors. This can really come in handy if you are trying to develop code on the MAV, because you can have the computer on and sensors powered, and not worry at all about propellers turning on and causing injury as you move the aircraft about by hand. We will talk about this more when we talk about wiring up your MAV.
- Cheap propellers can cause a huge amount of vibration. Consider buying high-quality propellers, doing a propeller balance, or both. RCGroups, DIY Drones and Youtube have some awesome guides on how to do propeller balancing.
- ESCs will need to be calibrated from 2000 to 1000 us
ROSflight is best supported on the Openpilot Revolution from hobbyking.com. It works on most variants of the revo and naze32 flight controller. Configuring a new board is relatively straight-forward, assuming that the board uses an STM32F4xx or STM32F1xx processor.
!!! warning We have seen some problems using off-brand versions of flight controllers because there are fake versions of accelerometers which can mess with the firmware; try to avoid those if you can.
Additional Sensors you may want for your ROSflight setup include:
- Sonar – MB1030 – $25 on MaxBotix
- GPS – u-blox NEO-M8N – $35 from Drotek
- Digital Airspeed Sensor – $65 on JDrones
The I2C sonar (MB124X) is also supported, but PWM sonars are preferred (https://www.adafruit.com/product/982?gclid=CjwKCAiA47DTBRAUEiwA4luU2QSNTXTLpAU6YI31w_cgVRXgiTB6v326aibrkUAaLYFRMMUWjI5uSBoCm80QAvD_BwE).
It is really important to isolate your flight controller from vibrations from propellers and motors. We recommend using small amounts of Kyosho Zeal to mount a fiberglass plate holding the FC to the MAV. You may also want to try adding mass to the flight control board. We have accomplished this by gluing steel washers to the fiberglass mounting plate.
You may need to experiment with the amount of gel you use, how far apart the gel is spaced, and the amount of mass added to the flight control board. The interaction of these factors is difficult to predict, therefore it takes a little bit of experimentation to get it right.
The only requirement for the onboard computer is that it runs Linux 16.04, ROS, has at least one USB port, and can be carried by the aircraft. We have had success with the following onboard computers, but by no means is this a comprehensive list, it is more by way of suggestion.
- MSI CUBI – i7-5500U – $350 on Amazon
- GIGABYTE BRIX Gaming- i7-4710HQ/GTX 760 – $850 on Amazon
- Intel NUC Skullcanyon – i7-6770HQ – $570 on Amazon
- ODROID-XU4 – Exynos5 2GHz 8-core – $77 on Ameridroid
- ODROID-C2 – Cortex A53 2GHz 4-core – $42 on Ameridroid
- Rasberry Pi 3 – Cortex A53 1.2GHz 4-core – $36 on Amazon
- NVIDIA Tegra TX1 - Cortex-A57 4-core CPU, 256-core Maxwell GPU - $435 from NVIDA (Educational Discounts Available)
You will need Wi-Fi to communicate with your MAV when it is in the air. ROS communicates over TCP, so it is really easy to use ROS to view what is going on in your MAV while it is flying, send commands and read sensor data. For most applications, a standard Wi-Fi router and dongle will suffice. For long-range applications, you may want to look into Ubiquiti point-to-point Wi-Fi. (We have seen ranges over a mile with these networks)
RC Transmitter and Reciever
For RC Control, you will need a transmitter with between 6 and 8 channels. Any additional channels will be wasted. We require RC control for safe operation, and only support arming and disarming via RC control.
As of version 1.0, ROSflight only supports PPM (pulse position modulation) receivers. A recommended RC setup is described below, but is meant as an example. Any configurations with PPM and 6-8 channels will be sufficient.
Laptop or Base Station Computer
You will need a laptop which can run Ubuntu 16.04 and ROS to communicate with the MAV over WiFi. If you are new to Linux, and want to also use windows, I would recommend dual booting your computer rather than using a virtual machine.
The Joystick is not technically a required component, because it is possible to control your MAV over command line. It does make things easier, however. We recommend XBOX 360 controllers and have default parameters set for the XBOX configuration. Other joysticks are supported, but you may need to perform custom axis and button mappings.
Below is an example wiring diagram for a multirotor using a MSI Cubi as an onboard computer. This diagram also includes the motor power switch, which allows for the sensors, flight controller and onboard computer to be power on while the motors are off. This is a safer way to work on the aircraft as the motors are unable to spin while the switch is off.
Your needs will likely be slightly different than what is shown. This is meant as an example only and can be adapted to fit your needs.
The desired mixer can be chosen by setting the the
MIXER parameter to the following values:
|10||Fixed wing (traditional AETR)|
The associated motor layouts are shown below for each mixer. The ESC calibration mixer directly outputs the throttle command equally to each motor, and can be used for calibrating the ESCs.
Connecting to the Flight Controller
The flight controller communicates with the onboard computer over a serial link. ROSflight only supports one serial connection at a time and by default should be the serial link connected to the USB connector on the board.
Using secondary serial links (example: use with telemetry radio)
In the case of an F4 flight controller, which has a USB peripheral, the highest bandwidth connection will be the USB connector, however UART3 can be also used to communicate with the onboard computer if you desire a more secure connection (micro USB connectors have been known to come off in high vibrations) or if you would like to use a telemetry radio for remote control.
If a usb connection is detected on the USB peripheral, ROSflight will direct all communication on this port, however if the
PARAM_SERIAL_DEVICE parameter is set to
3 and the
PARAM_BAUD_RATE parameter is set properly, then UART3 will be enabled when the USB connection is absent.
We have had the most sucess with the SiK radios (AKA 3DR telemetry radios). These require a 5V supply and ground and connect directly to the UART3 pins. We like the SiK radios because they can be easily configured using the
AT-commands, which are used by MissionPlanner(Windows only), sikset.py or with the AT-commands directly on the command line. There are a number of configuration options available which should be used to optimize the radios for their intended usage.
This is just an example, any UART-based communication interface should be supported through this interface.