Installing Gazebo

Installation instructions for Gazebo.
Updated 28 July 2021

Gazebo is an open-source 3D robotics simulator. This guide we will outline the steps for installing and running Gazebo.

The following instructions are for running Gazebo on Windows only.

Prerequisites

Ubuntu

Follow the instructions to setup Ubuntu with WSL here under 'docker'.

Gazebo 9

  1. Install Gazebo (version 9 last tested) using Ubuntu.

  2. Install Gazebo dev libaries.

    sudo apt-get install libgazebo9-dev

VcXsrv Windows X Server

VcXsrv allows you to run a graphical GUI from Ubuntu WSL.

Download and install VcXsrv here.

Running NUbots simulation

  1. Clone this repo.

    git clone https://github.com/NUbots/Gazebo.git
  2. Install the plugin.

    cd gazebo
    sudo bash ./install_plugin.sh
    Ensure your firewall is disabled for Ubuntu before continuing.
  3. Setup WSL to connect with VcXsrv server.

    export GAZEBO_IP=127.0.0.1
    export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0
    export LIBGL_ALWAYS_INDIRECT=0
  4. Run XLaunch (VcXsrv server).

  5. Change the Display number to 0.

    Display number settings
    Display number

  6. Leave all settings default except for 'Native opengl' and 'Disable access control'

    Xlaunch settings
    Extra settings

  7. Run the plugin.

    sudo bash ./run_plugin.sh

You are now ready to simulate!

Copyright © 2022 NUbots - CC-BY-4.0
Deploys by Netlify