Skip to main content

Gazebo simulation

This repository provides a Gazebo simulation of the Navigation and Science Task for the ERC Remote competition.


📄Install ROS on a bootable USB drive
Learn how to create a bootable USB drive with Ubuntu and ROS preinstalled for easy setup and testing.
📄Install ROS on your computer
Learn how to install the Robot Operating System (ROS) on your computer. Step-by-step guide for beginners.

Copied from the official repository of the European Rover Challenge Remote Edition GitHub:

This repository provides a Gazebo simulation of the Navigation and Science Task for the ERC Remote competition.

The simulation requires ROS (Robot Operating System) and was mainly developed and tested with these distributions:

Other distributions might not work properly so it is recommended to use one of these two setups.


The guide will refer to the distribution of your choice (for example melodic or noetic) as <distro>.

The rest of the tools used in this guide can be installed with apt:

# if using ROS Melodic
sudo apt install python-rosdep python-catkin-tools
# if using ROS Noetic
sudo apt install python3-rosdep python3-catkin-tools
Leo Rover model in Gazebo


This repository uses git submodules to link external repositories that contain the ROS packages.

When cloning this repository, add the --recurse-submodules flag to recursively pull the submodules:

git clone --recurse-submodules

Or if you have already cloned the repository without this option, clone the submodules using:

git submodule update --init

Use the rosdep tool to install any missing dependencies. If you are running rosdep for the first time, you might have to first run:

sudo rosdep init

Then, to install the dependencies, type:

rosdep update
sudo apt update
rosdep install --rosdistro ${ROS_DISTRO} --from-paths src -iy

Now, use the catkin tool to build the workspace:

catkin config --extend /opt/ros/${ROS_DISTRO}
catkin build


To pull the newest commits and recursively update the submodules, simply type:

git pull --recurse-submodules

If you have already pulled the new commits without the --recurse-submodules flag, you can simply update the submodules:

git submodule update --init

Run the rosdep install command again. The new versions of the packages may have pulled some additional dependencies, so you need to install them.

rosdep install --rosdistro ${ROS_DISTRO} --from-paths src -iy

And rebuild the workspace:

catkin build


Make sure you source the devel space on each terminal session you want to use the simulation on:

source devel/setup.bash

o start the simulation and gazebo GUI, type:

roslaunch leo_erc_gazebo leo_marsyard.launch

To visualize the model in Rviz, type on another terminal session:

roslaunch leo_erc_viz rviz.launch

Turn on the Image panel in Rviz to show the simulated camera images.

To test teleoperation with a keyboard, you can run the key_teleop node:

rosrun leo_erc_teleop key_teleop

To control the Rover using a joystick, type:

roslaunch leo_erc_teleop joy_teleop.launch

The command mapping was set for the Xbox 360 controller and looks like this:

Xbox 360ControllerCommand
RBbutton enable - hold it to send commands
Left joystick Up/Downlinear velocity
Right joystick Up/Downangular velocity

To modify it, you can edit the joy_mapping.yaml file inside the leo_erc_teleop package.