Skip to content
mtbsteve edited this page Oct 13, 2019 · 31 revisions

Introduction

This project contains instructions, code and other artifacts to rebuild the Nvidia Redtail project with a drone running the Arducopter flight stack and the latest Nvidia Jetpack 4.2.x on a TX2.

This wiki will not cover the build instructions and setup for a drone since this is covered in detail in the original Redtail wiki. Focus is on the changes made to make this project run on the Arducopter flightstack and on the Jetpack 4.2.x release.

Prerequisites

In order to rebuild the project, the following components are needed:

  • A Jetson TX2 and a small size carrier board, such as the Auvidia J120 to mount the TX2 on a drone
  • A drone with enough thrust and size to carry all the needed hardware components, eg a Tarot 650 frame
  • A Pixhawk cube with Arducopter installed
  • Needed sensors: a px4flow sensor to navigate w/o GPS, a Lidar ground distance sensor. I am using the original PX4Flow along with a Garmin LidarLite.
  • A ZED Stereo camera
  • A joystick eg Logitech 710
  • A laptop running Ubuntu 16.04 or 18.04 is a convenient way to run GCS software like QGroundcontrol as well to control the drone using a Joystick.

Hardware Setup

Jetson setup

The NVIDIA Jetson platform is used to run most of the components, such as DNN inference, the controller, and video streaming. Install Jetpack 4.2.x by using the Nvidia SDKmanager. If you are using the Auvidea J120 breakout board, you need to apply some kernel patches as described here

Important: you need to have apsync installed in order to have all drone communication set up correctly. Code and instructions can be found here

The Arducopter wiki describes how to connect the Jetson with the Pixhawk here Note: do not use the image file referenced in there since its outdated.

If you are using a Tarot frame, this repo contains the 3D CAD files to build a one-axis gimbal for the ZED Stereo camera.

Redtail Installation on TX2

To install Redtail, please follow the steps as described here.

Groundcontrol Station (GCS) Setup

First, install ROS on your PC. For Ubuntu 16.04 (Xenial) install ROS Kinetic Desktop. For instructions see here. For Ubuntu 18.04, install ROS Melodic Desktop, see here Then install the required joystick driver for your ROS version (kinetic or melodic): http://wiki.ros.org/joy and test if it works as described here. You need to set the following environment variables and add them to your .bashrc.

$ export ROS_MASTER_URI=http://10.0.1.128:11311 #the TX2 IP address should be 10.0.1.128 if you are using apsync

$ export ROS_IP=10.0.1.xxx # enter here the IP of your host PC to find out, use ifconfig

Start the joystick node on the host PC:

rosrun joy joy_node _dev:=/dev/input/js0 & # check the correct address of your joystick with ls -l /dev/input

To test if the joystick is operating correctly with ROS and communicating with the ROS master on the TX2: execute the following commands in a terminal window on the TX2:

roscore &

rostopic echo /joy

Alternatively, you can install the joystick support in a docker container as described in the original Nvidia Redtail project on your host PC.

Note: It seems that Jetpack 4.2.x has an issue with the ROS joystick drivers. I was not able to get it running. Therefore I recommend to connect the joystick to the host PC as described above.

Modeling

The project's AI that enables autonomous navigation is based on a deep neural network (DNN) which can be trained from scratch using publicly available data. A few pre-trained DNNs are also available as a part of this project.

Testing

It is usually a good idea to test your code in a simulator. Follow these steps to test....

Flying

Once the hardware and software setup steps are complete, it's time to take off! Follow these steps to fly the drone.

Clone this wiki locally