Gazebo Simulation Environment Requirements and Limitations
Robotics System Toolbox™ provides an interface for a simulation environment visualized using the Gazebo Simulator. Gazebo enables you to test and experiment using robots in realistically simulated physical scenarios with high quality graphics.
Gazebo runs on Linux® machines or Linux virtual machines, and uses a plugin package to communicate with MATLAB® and Simulink®. When simulating in Gazebo, the requirements and limitations in mind.
Run Gazebo Simulator on Linux Virtual Machine
Download and install the virtual machine (VM) from Virtual Machine with ROS
and Gazebo. In the VM, the required Gazebo plugin is located in the
/home/user/src/GazeboPlugin
folder. The VM contains these
software and has these hardware requirements.
Software Included in VM
Operating System — Ubuntu® Ubuntu 20.04 LTS (Focal Fossa)
Software packages — CMake 3.16.3, Gazebo 11, and the Gazebo plugin
Minimum Hardware Requirements
Processor (CPU) — Quad core Intel® i5, or equivalent
Memory (RAM) — 4 GB or more
Graphics card (GPU) — Dedicated GPU with 1 GB or more graphics memory
Disk space — At least 20 GB free disk space
Install and Run Gazebo Simulator on Linux Machine
You can also install and run the Gazebo Simulator on a Linux machine.
Software Requirements
Operating System — Ubuntu 16.04 LTS (Xenial Xerus) or Ubuntu 18.04 LTS (Bionic Beaver) or Ubuntu 20.04 LTS (Focal Fossa)
Software packages — CMake 2.8 or later, Gazebo 9 or Gazebo 10 or Gazebo 11, and the Gazebo plugin
Gazebo Version | Supported Ubuntu Version |
---|---|
Gazebo 9 | Ubuntu Xenial and Ubuntu Bionic |
Gazebo 10 | Ubuntu Xenial and Ubuntu Bionic |
Gazebo 11 | Ubuntu Bionic and Ubuntu Focal |
Minimum Hardware Requirements
Processor (CPU) — Quad core Intel i5, or equivalent
Memory (RAM) — 4 GB or more
Graphics card (GPU) — Dedicated GPU with 1 GB or more graphics memory
Disk space — At least 500 MB free disk space
Gazebo Simulator Installation
Install the CMake and Gazebo packages on Ubuntu by running these commands at the Linux terminal. For more information on installing Gazebo on Ubuntu machine, see Install Gazebo using Ubuntu packages.
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 https://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add - sudo apt-get update sudo apt-get install cmake gazebo11 libgazebo11-dev
Note
Gazebo co-simulation framework supports Gazebo 9, Gazebo 10, and Gazebo 11.
Gazebo Plugin Installation
Create a Gazebo plugin package on the host computer in MATLAB by using the
packageGazeboPlugin
function. This function creates a folder calledGazeboPlugin
in your current working directory and compresses it into aGazeboPlugin.zip
file.packageGazeboPlugin
Copy
GazeboPlugin.zip
to the home directory of your Linux machine.Create a directory,
src
, and unzip the plugin package to that directory.mkdir src unzip GazeboPlugin.zip -d ~/src/
Change the directory to the uncompressed
GazeboPlugin
folder.cd ~/src/GazeboPlugin/
Run these commands in the Linux terminal to compile and install the plugin.
mkdir build cd build cmake .. make
Optionally, you can remove the generated plugin from the host computer using MATLAB.
if exist("GazeboPlugin","dir") rmdir("GazeboPlugin","s"); end if exist("GazeboPlugin.zip","file") delete("GazeboPlugin.zip"); end
Limitations
MATLAB
Code generation is not supported.
Communication between MATLAB and the Gazebo Simulator is asynchronous.
Simulink
Code generation is not supported.
Rapid accelerator mode is not supported.
Tips
Use matching values for sample time across the Simulink model and sensor update rate in Gazebo World specifications to get the desired sensor data update rate.
Related Topics
- Gazebo Simulation for Robotics System Toolbox
- How Gazebo Simulation for Robotics System Toolbox Works