Skip to content

Setting up the RotorS Simulator

Fadri Furrer edited this page Dec 6, 2018 · 6 revisions

This is a basic installation setup, including the indigo-version of Gazebo (2.2.3), if you want a newer version please refer to this installation guide of specific Gazebo versions with the suiting ros-bindings.

  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
$ sudo apt-get install libgeographic-dev ros-indigo-geographic-msgs  # Required for mavros. 
# For indigo: sudo apt-get install libgeographiclib-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 git@github.com:ethz-asl/rotors_simulator.git
$ git clone git@github.com:ethz-asl/mav_comm.git
$ git clone git@github.com:ethz-asl/glog_catkin.git
$ git clone git@github.com:catkin/catkin_simple.git

Note if you want to use wstool you can replace the above commands with bash wstool set --git local_repo_name git@github.com:organization/repo_name.git and then do bash wstool update

  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
  1. Add sourcing to your .bashrc file
$ echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
$ source ~/.bashrc