|
| 1 | +# Installing Gazebo11 side by side with new Gazebo |
| 2 | + |
| 3 | +## Supported Gazebo versions and Ubuntu platforms for this tutorial |
| 4 | + |
| 5 | +This tutorial affects the Gazebo Classic users on Ubuntu `Jammy` (latest |
| 6 | +Ubuntu release were Gazebo Classic packages supported by the Gazebo team) |
| 7 | +that plan on migrating code to new Gazebo `Fortress`, `Garden` or `Harmonic.` |
| 8 | + |
| 9 | +There is no guarantee that the Gazebo Classic version detailed in this document |
| 10 | +will be updated in any case. Please consider the migration to the new Gazebo |
| 11 | +as the recommended alternative. |
| 12 | + |
| 13 | +## General context and migrations to new Gazebo |
| 14 | + |
| 15 | +New versions of Gazebo can not be installed together with Gazebo Classic |
| 16 | +(aka `gazebo11`) since both use the `gz` command line tool. Trying to |
| 17 | +install `gz-garden` or `gz-harmonic` from `packages.osrfoundation.org` |
| 18 | +on a system that already has gazebo-classic installed from binaries |
| 19 | +will cause gazebo-classic and its dependencies to be uninstalled. |
| 20 | + |
| 21 | +Having a side by side installation of both can make easier the recommended |
| 22 | +migration to newer versions of Gazebo. |
| 23 | + |
| 24 | +## Alternative approach for Gazebo Classic without the gz tool |
| 25 | + |
| 26 | +A possible workaround could be to use Gazebo Classic without the `gz` |
| 27 | +command or with a renamed `gz` command. This can be particularly |
| 28 | +interesting since the ROS (Robot Operative System) wrapper known as |
| 29 | +`gazebo_ros_pkgs` do not use the `gz` command but the `gzserver` and |
| 30 | +`gzclient` commands. |
| 31 | + |
| 32 | +Not shipping the `gz` command by default in a Gazebo Classic installation |
| 33 | +would be a disruptive change for existing users so it should not be hosted in |
| 34 | +`packages.osrfoundation.org`. |
| 35 | + |
| 36 | +## Gazebo11 with a separate gz tool package |
| 37 | + |
| 38 | +This alterntive approach has been implemented and packages for `jammy` are |
| 39 | +hosted in the Open Robotics `gazebo11-gz-cli` PPA: |
| 40 | +https://launchpad.net/~openrobotics/+archive/ubuntu/gazebo11-gz-cli |
| 41 | + |
| 42 | +The PPA contains a `gazebo11` version that ships the `gz` executable in |
| 43 | +an independent packages called `gazebo11-gz-cli` while the main `gazebo11` |
| 44 | +package has a `gz11` command. Both are really symlinks to `gz-11.x.y`. |
| 45 | + |
| 46 | +### How the packaging works for the gz command |
| 47 | + |
| 48 | +The `gazebo11-gz-cli` is a soft dependency on `gazebo11`. It is installed |
| 49 | +by default but it will be uninstalled when installing the new Gazebo |
| 50 | +packages and the effect is that the `gz` command for Gazebo Classic replaced |
| 51 | +by the `gz` tool from new Gazebo. The `gz11` command can be used instead of |
| 52 | +the `gz` command to access to the same functionality. |
| 53 | + |
| 54 | +## Installing the new packaging from the PPA |
| 55 | + |
| 56 | +From an existing `gazebo11` installation (on `jammy` the Ubuntu official |
| 57 | +repositories will install `11.10.2+dfsg-1` version) or a non existing |
| 58 | +`gazebo11` installation the steps are the following: |
| 59 | + |
| 60 | +```bash |
| 61 | +sudo add-apt-repository ppa:openrobotics/gazebo11-gz-cli |
| 62 | +sudo apt update |
| 63 | +sudo apt-get install gazebo11 |
| 64 | +``` |
| 65 | + |
| 66 | +If `gazebo11` was installed before, it will be upgraded to the version in the |
| 67 | +PPA. From this point, a new Gazebo installation for `fortress`, `garden` or |
| 68 | +`harmonic` can be executed. |
| 69 | + |
| 70 | +If a new Gazebo installation was installed before, the `gazebo11-gz-cli` package |
| 71 | +won't be installed. |
0 commit comments