Cymulator: ROS-Gazebo based Simulator


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 `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
    wget -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 --branch kinetic-devel
    git clone --branch kinetic-devel
    git clone --branch RacecarJTransitory
    git clone --branch master
    git clone --branch for-cymulator
    git clone --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


rosrun cym_gazebo scenes/empty-1_car.yml


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