• Stars
    star
    1,245
  • Rank 37,740 (Top 0.8 %)
  • Language
    C++
  • Created over 10 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

RotorS is a UAV gazebo simulator

RotorS

RotorS is a MAV gazebo simulator. It provides some multirotor models such as the AscTec Hummingbird, the AscTec Pelican, or the AscTec Firefly, but the simulator is not limited for the use with these multicopters.

There are simulated sensors coming with the simulator such as an IMU, a generic odometry sensor, and the VI-Sensor, which can be mounted on the multirotor.

This package also contains some example controllers, basic worlds, a joystick interface, and example launch files.

Below we provide the instructions necessary for getting started. See RotorS' wiki for more instructions and examples (https://github.com/ethz-asl/rotors_simulator/wiki).

If you are using this simulator within the research for your publication, please cite:

@Inbook{Furrer2016,
author="Furrer, Fadri
and Burri, Michael
and Achtelik, Markus
and Siegwart, Roland",
editor="Koubaa, Anis",
chapter="RotorS---A Modular Gazebo MAV Simulator Framework",
title="Robot Operating System (ROS): The Complete Reference (Volume 1)",
year="2016",
publisher="Springer International Publishing",
address="Cham",
pages="595--625",
isbn="978-3-319-26054-9",
doi="10.1007/978-3-319-26054-9_23",
url="http://dx.doi.org/10.1007/978-3-319-26054-9_23"
}

Installation Instructions - Ubuntu 16.04 with ROS Kinetic

  1. Install and initialize ROS kinetic desktop full, additional ROS packages, catkin-tools, and wstool:
$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" > /etc/apt/sources.list.d/ros-latest.list'
$ wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install ros-kinetic-desktop-full ros-kinetic-joy ros-kinetic-octomap-ros ros-kinetic-mavlink python-wstool python-catkin-tools protobuf-compiler libgoogle-glog-dev ros-kinetic-control-toolbox ros-kinetic-mavros
$ sudo rosdep init
$ rosdep update
$ source /opt/ros/kinetic/setup.bash
  1. If you don't have ROS workspace yet you can do so by
$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/src
$ catkin_init_workspace  # initialize your catkin workspace
$ wstool init
$ wget https://raw.githubusercontent.com/ethz-asl/rotors_simulator/master/rotors_hil.rosinstall
$ wstool merge rotors_hil.rosinstall
$ wstool update

Note On OS X you need to install yaml-cpp using Homebrew brew install yaml-cpp.

  1. Build your workspace with python_catkin_tools (therefore you need python_catkin_tools)
$ cd ~/catkin_ws/
$ catkin build
  1. Add sourcing to your .bashrc file
$ echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
$ source ~/.bashrc

Installation Instructions - Ubuntu 14.04 with ROS Indigo

  1. Install and initialize ROS indigo desktop full, additional ROS packages, catkin-tools, and wstool:
$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" > /etc/apt/sources.list.d/ros-latest.list'
$ wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install ros-indigo-desktop-full ros-indigo-joy ros-indigo-octomap-ros python-wstool python-catkin-tools protobuf-compiler libgoogle-glog-dev
$ sudo rosdep init
$ rosdep update
$ source /opt/ros/indigo/setup.bash
  1. If you don't have ROS workspace yet you can do so by
$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/src
$ catkin_init_workspace  # initialize your catkin workspace
$ wstool init

Note for setups with multiple workspaces please refer to the official documentation at http://docs.ros.org/independent/api/rosinstall/html/ by replacing rosws by wstool.

  1. Get the simulator and additional dependencies
$ cd ~/catkin_ws/src
$ git clone [email protected]:ethz-asl/rotors_simulator.git
$ git clone [email protected]:ethz-asl/mav_comm.git

Note On OS X you need to install yaml-cpp using Homebrew brew install yaml-cpp.

Note if you want to use wstool you can replace the above commands with wstool set --git local_repo_name [email protected]:organization/repo_name.git Note if you want to build and use the gazebo_mavlink_interface plugin you have to get MAVROS as an additional dependency from link below. Follow the installation instructions provided there and build all of its packages prior to building the rest of your workspace. https://github.com/mavlink/mavros

  1. Build your workspace with python_catkin_tools (therefore you need python_catkin_tools)
$ cd ~/catkin_ws/
$ catkin init  # If you haven't done this before.
$ catkin build

Note if you are getting errors related to "future" package, you may need python future: sudo apt-get install python-pip pip install --upgrade pip pip install future

  1. Add sourcing to your .bashrc file
$ echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
$ source ~/.bashrc

Basic Usage

Launch the simulator with a hex-rotor helicopter model, in our case, the AscTec Firefly in a basic world.

$ roslaunch rotors_gazebo mav_hovering_example.launch mav_name:=firefly world_name:=basic

Note The first run of gazebo might take considerably long, as it will download some models from an online database. Should you receive a timeout error, try running gazebo by itself (e.g. roslaunch gazebo_ros empty_world.launch ) so it has sufficient time to actually download all of the models.

The simulator starts by default in paused mode. To start it you can either

  • use the Gazebo GUI and press the play button

  • or you can send the following service call.

    $ rosservice call gazebo/unpause_physics
    

There are some basic launch files where you can load the different multicopters with additional sensors. They can all be found in ~/catkin_ws/src/rotors_simulator/rotors_gazebo/launch.

The world_name argument looks for a .world file with a corresponding name in ~/catkin_ws/src/rotors_simulator/rotors_gazebo/worlds. By default, all launch files, with the exception of those that have the world name explicitly included in the file name, use the empty world described in basic.world.

Getting the multicopter to fly

To let the multicopter fly you need to generate thrust with the rotors, this is achieved by sending commands to the multicopter, which make the rotors spin. There are currently a few ways to send commands to the multicopter, we will show one of them here. The rest is documented here in our Wiki. We will here also show how to write a stabilizing controller and how you can control the multicopter with a joystick.

Send direct motor commands

We will for now just send some constant motor velocities to the multicopter.

$ rostopic pub /firefly/command/motor_speed mav_msgs/Actuators '{angular_velocities: [100, 100, 100, 100, 100, 100]}'

Note The size of the motor_speed array should be equal to the number of motors you have in your model of choice (e.g. 6 in the Firefly model).

You should see (if you unpaused the simulator and you have a multicopter in it), that the rotors start spinning. The thrust generated by these motor velocities is not enough though to let the multicopter take off.

You can play with the numbers and will realize that the Firefly will take off with motor speeds of about 545 on each rotor. The multicopter is unstable though, since there is no controller running, if you just set the motor speeds.

Let the helicopter hover with ground truth odometry

You can let the helicopter hover with ground truth odometry (perfect state estimation), by launching:

$ roslaunch rotors_gazebo mav_hovering_example.launch mav_name:=firefly world_name:=basic

Create an attitude controller

TODO(ff): Write something here.

Usage with a joystick

Connect a USB joystick to your computer and launch the simulation alongside ROS joystick driver and the RotorS joystick node:

$ roslaunch rotors_gazebo mav_with_joy.launch mav_name:=firefly world_name:=basic

Depending on the type of joystick and the personal preference for operation, you can assign the axis number using the axis_<roll/pitch/thrust>_ parameter and the axis direction using the axis_direction_<roll/pitch/thrust> parameter.

Usage with a keyboard

First, perform a one-time setup of virtual keyboard joystick as described here: https://github.com/ethz-asl/rotors_simulator/wiki/Setup-virtual-keyboard-joystick.

Launch the simulation with the keyboard interface using the following launch file:

$ roslaunch rotors_gazebo mav_with_keyboard.launch mav_name:=firefly world_name:=basic

If everything was setup correctly, an additional GUI should appear with bars indicating the current throttle, roll, pitch, and yaw inputs. While this window is active, the Arrows and W, A, S, D keys will generate virtual joystick inputs, which can then be processed by the RotorS joystick node in the same way as real joystick commands.

Gazebo Version

At a minimum, Gazebo v2.x is required (which is installed by default with ROS Indigo). However, it is recommended to install at least Gazebo v5.x for full functionlity, as there are the following limitations:

  1. iris.sdf can only be generated with Gazebo >= v3.0, as it requires use of the gz sdf ... tool. If this requirement is not met, you will not be able to use the Iris MAV in any of the simulations.
  2. The Gazebo plugins GazeboGeotaggedImagesPlugin, LidarPlugin and the LiftDragPlugin all require Gazebo >= v5.0, and will not be built if this requirement is not met.

More Repositories

1

kalibr

The Kalibr visual-inertial calibration toolbox
C++
4,357
star
2

maplab

A Modular and Multi-Modal Mapping Framework
C++
2,610
star
3

voxblox

A library for flexible voxel-based mapping, mainly focusing on truncated and Euclidean signed distance fields.
C++
1,336
star
4

okvis

OKVIS: Open Keyframe-based Visual-Inertial SLAM.
C++
1,158
star
5

rovio

C++
1,126
star
6

segmap

A map representation based on 3D segments
C++
1,070
star
7

ethzasl_msf

MSF - Modular framework for multi sensor fusion based on an Extended Kalman Filter (EKF)
C++
985
star
8

lidar_align

A simple method for finding the extrinsic calibration between a 3D lidar and a 6-dof pose sensor
C++
836
star
9

hfnet

From Coarse to Fine: Robust Hierarchical Localization at Large Scale with HF-Net (https://arxiv.org/abs/1812.03506)
Python
739
star
10

mav_active_3d_planning

Modular framework for online informative path planning.
C++
564
star
11

mav_trajectory_generation

Polynomial trajectory generation and optimization, especially for rotary-wing MAVs.
C++
548
star
12

polygon_coverage_planning

Coverage planning in general polygons with holes.
C++
528
star
13

aerial_mapper

Real-time Dense Point Cloud, Digital Surface Map (DSM) and (Ortho-)Mosaic Generation for UAVs
C++
524
star
14

voxgraph

Voxblox-based Pose graph optimization
C++
513
star
15

robust_point_cloud_registration

Robust Point Cloud Registration Using Iterative Probabilistic Data Associations ("Robust ICP")
C++
513
star
16

mav_voxblox_planning

MAV planning tools using voxblox as the map representation.
Makefile
463
star
17

hand_eye_calibration

Python tools to perform time-synchronization and hand-eye calibration.
Python
439
star
18

dynablox

Real-time detection of diverse dynamic objects in complex environments.
C++
436
star
19

voxblox-plusplus

A volumetric object-level semantic mapping framework.
C++
409
star
20

mav_control_rw

Control strategies for rotary wing Micro Aerial Vehicles using ROS
C
350
star
21

ethzasl_sensor_fusion

time delay single and multi sensor fusion framework based on an EKF
C++
327
star
22

nbvplanner

A real-time capable exploration and inspection path planner (next best view planning)
C++
295
star
23

panoptic_mapping

A flexible submap-based framework towards spatio-temporally consistent volumetric mapping and scene understanding.
C++
275
star
24

ethzasl_icp_mapping

3D mapping tools for robotic applications
C++
268
star
25

okvis_ros

OKVIS: Open Keyframe-based Visual-Inertial SLAM (ROS Version)
C++
256
star
26

versavis

An Open Versatile Multi-Camera Visual-Inertial Sensor Suite
C++
256
star
27

kitti_to_rosbag

Dataset tools for working with the KITTI dataset raw data ( http://www.cvlibs.net/datasets/kitti/raw_data.php ) and converting it to a ROS bag. Also allows a library for direct access to poses, velodyne scans, and images.
C++
248
star
28

laser_slam

This package provides an end-to-end system to laser-based graph SLAM using laser point clouds.
C++
248
star
29

geodetic_utils

Simple library for converting coordinates to/from several geodetic frames (lat/lon, ECEF, ENU, NED, etc.)
C++
247
star
30

COIN-LIO

🪙 COIN-LIO: Complementary Intensity-Augmented LiDAR Inertial Odometry (ICRA 2024)
C++
245
star
31

image_undistort

A compact package for undistorting images directly from kalibr calibration files. Can also perform dense stereo estimation
C++
245
star
32

ethzasl_ptam

Modified version of Parallel Tracking and Mapping (PTAM)
C++
235
star
33

wavemap

Fast, efficient and accurate multi-resolution, multi-sensor 3D occupancy mapping
C++
226
star
34

cblox

Voxblox-based submapping
C++
207
star
35

aslam_cv2

C++
196
star
36

glocal_exploration

Efficient local and global exploration on submap collections with changing past pose estimates.
C++
186
star
37

volumetric_mapping

A repository for 3D volumetric (occupancy) maps, providing a generic interface for disparity map and pointcloud insertion, and support for custom sensor error models.
C++
186
star
38

vgn

Real-time 6 DOF grasp detection in clutter.
Python
181
star
39

hierarchical_loc

Deep image retrieval for efficient 6-DoF localization
Python
172
star
40

orb_slam_2_ros

ROS interface for ORBSLAM2!!
C++
171
star
41

mav_dji_ros_interface

Interface of DJI autopilot based on its OSDK (3.2)
C++
156
star
42

lidar_undistortion

Catkin package that provides lidar motion undistortion based on an external 6DoF pose estimation input.
C++
145
star
43

programming_guidelines

This repository contains style-guides, discussions, eclipse/emacs auto-formatter for commonly used programming languages
Emacs Lisp
139
star
44

tsdf-plusplus

TSDF++: A Multi-Object Formulation for Dynamic Object Tracking and Reconstruction
C++
135
star
45

odom_predictor

Integrates an IMU to predict future odometry readings
C++
134
star
46

depth_segmentation

A collection of segmentation methods working on depth images
C++
133
star
47

grid_map_geo

Geolocalization for grid map using GDAL.
C++
129
star
48

neuralblox

Real-time Neural Representation Fusion for Robust Volumetric Mapping
Python
127
star
49

StructuralInspectionPlanner

ASL Structural Inspection Planner
C++
108
star
50

phaser

A robust pointcloud registration pipeline based on correlation.
C++
106
star
51

eth_supermegabot

Instructions for ETH center for robotics summer school 2019.
Python
102
star
52

terrain-navigation

Repository for Safe Low Altitude Navigation in steep terrain for fixed-wing Aerial Vehicles
C++
98
star
53

waypoint_navigator

Stand-alone waypoint navigator
C++
96
star
54

ethzasl_xsens_driver

Driver for xsens IMUs
Python
96
star
55

mav_tools_public

General launch files, parameters and wiki entries on our systems and related issues
95
star
56

data-driven-dynamics

Data Driven Dynamics Modeling for Aerial Vehicles
Python
94
star
57

reinmav-gym

Reinforcement Learning framework for MAVs using the OpenAI Gym environment
Python
93
star
58

cuckoo_time_translator

algorithms for synchronizing clocks
C++
88
star
59

minkindr

A minimal library for transformations, following the kindr interface. Uses active quaternions of rotation in Hamilton notation.
C++
88
star
60

unreal_airsim

Simulation interface to Unreal Engine 4 based on the AirSim plugin.
C++
87
star
61

waverider

RMPs on multi-resolution occupancy maps for efficient reactive collision avoidance
87
star
62

ethz_piksi_ros

ROS drivers for the Piksi RTK GPS module
C++
85
star
63

sl_sensor

SL Sensor: An open-source, real-time and ROS-based structured light sensor for high accuracy construction robotic applications
C++
84
star
64

voxblox_ground_truth

Create ground truth voxblox maps from Gazebo worlds or .ply files
C++
83
star
65

vicon_bridge

This is a driver providing data from VICON motion capture systems. It is based on the vicon_mocap package from the starmac stacks. Additionally, it can handle multiple subjects / segments and allows to calibrate an origin of the vehicle(s) as this is somehow tedious with the VICON Tracker.
C++
80
star
66

ros-system-monitor

System monitoring tools for ROS.
Python
80
star
67

navrep

Python
73
star
68

curves

A library of curves for estimation.
C++
72
star
69

schweizer_messer

Programming tools for robotics.
C++
65
star
70

time_autosync

Automatically syncs a camera to a rigidly attached IMUs time frame
C++
63
star
71

unreal_cv_ros

Unreal CV ROS Perception Simulator
Python
62
star
72

ai_for_robotics

Programming Exercises Accompanying the Lecture "Artificial Intelligence for Robotics"
Python
60
star
73

lcd

Line Clustering and Description for Place Recognition
C++
59
star
74

trajectory_toolkit

Python tool for analyzing and evaluating trajectory data
Python
59
star
75

dataset_tools

Loader for the generic ASL dataset formats.
MATLAB
58
star
76

rl-navigation

OpenEdge ABL
57
star
77

asl-student-templates

Templates and overview information for student projects at ASL
PostScript
56
star
78

libseekthermal

Driver library for Seek Thermal imaging devices
C++
55
star
79

reactive_avoidance

Reactive obstacle avoidance using raytracing or lidars
C++
52
star
80

plotty

matplotlib-cpp with Eigen interfaces.
C++
52
star
81

forest_gen

Generates randomized Poisson forests to use for UAV collision avoidance evaluations.
Python
49
star
82

3d_vsg

3D Variable Scene Graphs for long-term semantic scene change prediction.
Python
49
star
83

sampling_based_control

Jupyter Notebook
47
star
84

mav_comm

This repository contains message and service definitions used for mavs. All future message definitions go in here, existing ones in other stacks should be moved here where possible.
C++
46
star
85

tmplanner

Terrain monitoring planner
C++
45
star
86

3d3l

Deep Learned Keypoint Detection and Description for 3D LiDARs
Python
44
star
87

fgsp

Jupyter Notebook
44
star
88

autolabel

A project for computing high-quality ground truth training examples for RGB-D data.
Python
43
star
89

mav_gtsam_estimator

A GTSAM based state estimation framework.
C++
43
star
90

visensor_node

Visual inertial SLAM sensor ROS node.
C++
43
star
91

Learn-to-Calibrate

We utilize deep reinforcement learning to obtain favorable trajectories for visual-inertial system calibration.
C++
43
star
92

cvae_exploration_planning

Learning informed sampling distributions and information gains for efficient exploration planning.
Python
42
star
93

active_grasp

Closed-loop next-best view planning for grasp detection in clutter.
Python
41
star
94

two_state_information_filter

C++
41
star
95

ssc_exploration

Incremental 3D Scene Completion for Safe and Efficient Exploration Mapping and Planning
41
star
96

maplab_rovio

Hard-fork of ROVIO to integrate localization.
C++
40
star
97

rtklibros

rtklib with ros interfacing and adapted feedback from external Kalman filter
C
40
star
98

libvisensor

Low level hardware driver for the visual inertial SLAM sensor.
C++
39
star
99

3dsnet

3DSNet: Unsupervised Shape-to-shape 3D Style Transfer
C++
39
star
100

mav_system_identification

Matlab scripts to perform system identification for muti-rotor systems
MATLAB
38
star