Skip to content

Commit

Permalink
Update how-to-migrate-from-gazebo-classic.md
Browse files Browse the repository at this point in the history
  • Loading branch information
xela-95 authored Apr 9, 2024
1 parent 9e4130e commit 2252b5b
Showing 1 changed file with 28 additions and 13 deletions.
41 changes: 28 additions & 13 deletions docs/how-to-migrate-from-gazebo-classic.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# How to migrate from Gazebo Classic and `gazebo-yarp-plugins`

## Table of Contents

- [Introduction](#introduction)
- [Update of the robot model](update-of-the-robot-model)
- [Update of plugins configurations](update-of-plugins-configuration)
- [World set up](world-set-up)
- [Environment variables](environment-variables)
- [Examples of projects with Modern Gazebo support](examples-of-projects-with-modern-gazebo-support)

## Introduction

This brief guide will help you migrate an existing project created initially for Gazebo Classic simulator and `gazebo-yarp-plugins` to Modern Gazebo (`gz-sim`) and `gz-sim-yarp-plugins`.
Expand All @@ -26,18 +35,18 @@ Both approaches work fine, in the latter case you end up with a single model tha

### gz-sim-yarp-plugins

In the table below are described the `gz-sim-yarp-plugins` currently available, along with the `name` and `filename` attributes that have to be used to make Modern Gazebo load them.
In the table below are listed the `gz-sim-yarp-plugins` currently available: for each of them the `gazebo-yarp-plugins` `filename` attribute is present along with the new `name` and `filename` attributes that have to be used to make Modern Gazebo load them.

| Plugin | `name` attribute | `filename` attribute |
|-----------------|--------------------------|-------------------------------------|
| Base state | `gzyarp::BaseState` | `gz-sim-yarp-basestate-system` |
| RGB Camera | `gzyarp::Camera` | `gz-sim-yarp-camera-system` |
| Clock | `gzyarp::Clock` | `gz-sim-yarp-clock-system` |
| Control board | `gzyarp::ControlBoard` | `gz-sim-yarp-controlboard-system` |
| Force-Torque | `gzyarp::ForceTorque` | `gz-sim-yarp-forcetorque-system` |
| IMU | `gzyarp::Imu` | `gz-sim-yarp-imu-system` |
| Laser | `gzyarp::Laser` | `gz-sim-yarp-laser-system` |
| Robot interface | `gzyarp::RobotInterface` | `gz-sim-yarp-robotinterface-system` |
| Plugin | Gazebo Classic `filename` attribute | Modern Gazebo `filename` attribute | Modern Gazebo `name` attribute |
|-----------------|-------------------------------------|-------------------------------------|--------------------------------|
| Base state | `libgazebo_yarp_basestate.so` | `gz-sim-yarp-basestate-system` | `gzyarp::BaseState` |
| RGB Camera | `libgazebo_yarp_camera.so` | `gz-sim-yarp-camera-system` | `gzyarp::Camera` |
| Clock | `libgazebo_yarp_clock.so` | `gz-sim-yarp-clock-system` | `gzyarp::Clock` |
| Control board | `libgazebo_yarp_lasersensor.so` | `gz-sim-yarp-controlboard-system` | `gzyarp::ControlBoard` |
| Force-Torque | `libgazebo_yarp_forcetorque.so` | `gz-sim-yarp-forcetorque-system` | `gzyarp::ForceTorque` |
| IMU | `libgazebo_yarp_imu.so` | `gz-sim-yarp-imu-system` | `gzyarp::Imu` |
| Laser | `libgazebo_yarp_lasersensor.so` | `gz-sim-yarp-laser-system` | `gzyarp::Laser` |
| Robot interface | `libgazebo_yarp_robotinterface.so` | `gz-sim-yarp-robotinterface-system` | `gzyarp::RobotInterface` |

#### URDF

Expand Down Expand Up @@ -141,6 +150,12 @@ The most important variables are:

Visit the [official documentation](https://gazebosim.org/api/sim/8/resources.html) to learn more.

These variables contain a colon-separated list of paths that Gazebo uses to find the resources it needs, hence in order to be able to run the simulation they have to be configured, ideally placing the `export` commands in the `.bashrc` or in conda activate scripts based on how you installed Modern Gazebo.
These variables contain a colon-separated list of paths that Gazebo uses to find the resources it needs, hence in order to be able to run the simulation they have to be configured, ideally placing the `export` commands in the `.bashrc` or in conda activate scripts based on how you installed Modern Gazebo. If you followed the [README](../README.md), the `GZ_SIM_SYSTEM_PLUGIN_PATH` is already configured properly, while you should add to the `GZ_SIM_RESOURCE_PATH` variable the path(s) to your model(s).

## Examples of projects with Modern Gazebo support

In the following are listed the projects that already have support for Modern Gazebo along with the PR that introduced it.

If you followed the [README](../README.md), the `GZ_SIM_SYSTEM_PLUGIN_PATH` is already configured properly, while you should add to the `GZ_SIM_RESOURCE_PATH` variable the path(s) to your model(s).
| Project | Repository | PR introducing Modern Gazebo support |
|------------------|---------------------------------------------------|------------------------------------------------------------|
| ergocub-software | https://github.com/icub-tech-iit/ergocub-software | https://github.com/icub-tech-iit/ergocub-software/pull/230 |

0 comments on commit 2252b5b

Please sign in to comment.