Cymulator: ROS-Gazebo based Simulator

Installation

The installation steps below are also assembled in this shell script that should work for Ubuntu 16.04. These commands requires sudo permission. Please run them with caution.

  1. Install ROS Kinetic and create a workspace for catkin. We assume it is under catkin_ws.

  2. Install Gazebo 9 for ROS Kinetic

    sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
    wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
    sudo apt-get update
    sudo apt install -y \
         ros-kinetic-gazebo9-ros ros-kinetic-gazebo9-ros-control \
         ros-kinetic-gazebo9-plugins ros-kinetic-gazebo9-ros-pkgs
    
  3. Install required ROS packages available on APT

    sudo apt install -y \
         ros-kinetic-ackermann-msgs ros-kinetic-geographic-msgs ros-kinetic-serial \
         ros-kinetic-ros-control ros-kinetic-ros-controllers \
         ros-kinetic-hector-localization ros-kinetic-hector-models \
         ros-kinetic-geometry2 ros-kinetic-robot
    
  4. Install other system packages available on APT

    sudo apt install -y git
    sudo apt install -y cppad coinor-libipopt-dev  # For MPC controller
    sudo apt install -y python3 python3-pip
    
  5. Install required Python packages available on PyPI

    pip3 install --user pip --upgrade
    pip3 install --user \
         catkin_pkg rospkg \
         empy numpy scipy \
         defusedxml netifaces \
         pathlib pyyaml
    
  6. Inside the catkin_ws/src directory of your catkin workspace clone the following repos:

    git clone https://github.com/tu-darmstadt-ros-pkg/hector_quadrotor.git --branch kinetic-devel
    git clone https://github.com/tu-darmstadt-ros-pkg/hector_gazebo.git --branch kinetic-devel
    git clone https://github.com/cyphyhouse/racecar.git --branch RacecarJTransitory
    git clone https://github.com/cyphyhouse/racecar_gazebo.git --branch master
    git clone https://github.com/cyphyhouse/Decawave.git --branch for-cymulator
    git clone https://github.com/cyphyhouse/Cymulator.git --branch master
    

Compile using catkin_make

  1. Run these commands under your catkin_ws directory to compile relevant ROS packages in the cloned repositories.

    source /opt/ros/kinetic/setup.bash
    catkin_make --only-pkg-with-deps cym_gazebo --cmake-args -DPYTHON_VERSION=3.5  # Build only cym_gazebo with Python>=3.5
    

Compile using colcon

  1. Run these commands under your catkin_ws directory to compile only relevant ROS packages in catkin_ws/src.

    source /opt/ros/kinetic/setup.bash
    colcon build --base-paths src/* --packages-up-to cym_gazebo --cmake-args -DPYTHON_VERSION=3.5
    

Usage

rosrun cym_gazebo cymulate.py scenes/empty-1_car.yml

Todo

Add sample YAML file for scenes and explain shell commands that start the Gazebo simulation