GithubHelp home page GithubHelp logo

tiers / drone-racing Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 4.0 6.62 MB

Gazebo simulator with Hector quadrotor for training drone racing. The races are later done with a Tello drone controlled via ROS.

License: MIT License

CMake 0.76% Python 0.78% Jupyter Notebook 98.47%

drone-racing's Introduction

TIERS Drone Racing

Gazebo simulator with Hector quadrotor to train for the TIERS drone racing challenge.

The races are later done with a Tello drone controlled via ROS, as part of the master course Perception and Navigation in Robotics.

Get Started

This instructions are for Ubuntu 18.04 with ROS Melodic already installed.

Clone this repo into your workspace (the code below creates a new catkin workspace named drone_racing_ws in your home folder):

mkdir -p  ~/drone_racing_ws/src && cd ~/drone_racing_ws/src
git clone --recursive https://github.com/TIERS/drone_racing.git

Install dependencies

sudo apt install ros-melodic-geographic-msgs ros-melodic-hector-gazebo-plugins ros-melodic-hector-sensors-*

We also need some Gazebo models that we use for the virtual race scenario. You have two opcions here, download the full Gazebo models database, or just a few that we provide to be able to run this simulations. Either way, first create a folder where Gazebo can find your models:

mkdir -p ~/.gazebo/models

Option 1: Full Gazebo Database

Download Gazebo models database (we actually only use a few of them, this will download the full database with approx. 400MB of basic models):

git clone https://github.com/osrf/gazebo_models/ ~/.gazebo/models

Read more about the Gazebo database here.

Option 2: Minimal amount of models

Copy to the same folder the models included in this repo (change the path if you cloned the repo somewhere else):

cp -r ~/drone_racing_ws/src/drone_racing/gazebo_models/* ~/.gazebo/models/

Build the workspace

We recommend using catkin build. Install it if needed with

sudo apt install python-catkin-tools

and then run

cd ~/drone_racing_ws
catkin init
catkin build

Build the uav messages with

catkin build hector_uav_msgs

Run the simulator

Run the simulator with

source ~/drone_racing_ws/devel/setup.bash
roslaunch tiers_drone_racing hector_dronerace.launch

Start the motors in another terminal window/tab:

source ~/drone_racing_ws/devel/setup.bash
rosservice call /enable_motors "enable: true"

In order to control the UAV with keyboard teleop, install it with

sudo apt install ros-melodic-teleop-twist-keyboard

if you don't have it yet, and run the teleop node in a separate terminal window/tab:

rosrun tiers_drone_racing tello_controller.py 

Camera view

Install the image_view package:

sudo apt install ros-melodic-image-view
rosrun image_view image_view image:=/camera/rgb/image_raw

Contact

For any questions, write to [email protected].

Visit us at https://tiers.utu.fi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.