# Resources for setting up a Gazebo simulation of a UR5e on my own system

**URL:** <https://get-help.theconstruct.ai/t/resources-for-setting-up-a-gazebo-simulation-of-a-ur5e-on-my-own-system/34363>\
**Category:** ROS2 Manipulation Basics (Humble)\
**Created:** [January 14, 2025, 12:44am UTC](https://get-help.theconstruct.ai/t/resources-for-setting-up-a-gazebo-simulation-of-a-ur5e-on-my-own-system/34363 "2025-01-14T00:44:24Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![rlgraf](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/r/eb8c5e/32.png) [@rlgraf](https://get-help.theconstruct.ai/u/rlgraf)\
**Post date:** [January 14, 2025, 12:44am UTC](https://get-help.theconstruct.ai/t/resources-for-setting-up-a-gazebo-simulation-of-a-ur5e-on-my-own-system/34363/1 "2025-01-14T00:44:24Z")

</div>

Hello,

I’ve garnered some knowledge from my Construct courses and my next step is setting up ROS2 on my lab’s own computer. I have ROS2 installed, but now I don’t know what to do in order to get a Gazebo simulation set up for a UR5e. I’m really in need of baby step instructions that are thorough and explain every step. Does anyone have any idea where I can learn the steps for installing and setting up a UR5e in Gazebo? I can’t seem to find anything online, and AI is overly-vague.

Thank you!

---

<div class="post-metadata">

**Author:** ![girishkumar.kannan](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/girishkumar.kannan/32/6994_2.png) [@girishkumar.kannan](https://get-help.theconstruct.ai/u/girishkumar.kannan)\
**Post date:** [January 14, 2025, 7:44am UTC](https://get-help.theconstruct.ai/t/resources-for-setting-up-a-gazebo-simulation-of-a-ur5e-on-my-own-system/34363/2 "2025-01-14T07:44:42Z")

</div>

Hi @rlgraf ,

Let me get straight to the point:

Install ROS2:

```bash
locale # check for UTF-8
sudo apt update && sudo apt install -y locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8
locale # verify settings
sudo apt install -y software-properties-common
sudo add-apt-repository universe
sudo apt update && sudo apt install -y curl
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
sudo apt update

sudo apt install -y ros-<distro>-desktop
sudo apt install -y ros-dev-tools

```

Install ROS2 Manipulation:

```bash
sudo apt install -y ros-<distro>-moveit
sudo apt install -y ros-<distro>-rmw-cyclonedds-cpp

```

Install ROS2 Control: [Needed for ROS2 Manipulation]

```bash
sudo apt install -y ros-<distro>-ros2-control
sudo apt install -y ros-<distro>-ros2-controllers
sudo apt install -y ros-<distro>-gazebo-ros2-control
sudo apt install -y ros-<distro>-gazebo-ros2-control-demos

```

Install Gazebo Classic (Not the modern Gazebo Sim version):

```bash
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
cat /etc/apt/sources.list.d/gazebo-stable.list
wget https://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
sudo apt update
sudo apt install -y gazebo11

```

Install all Universal Robot packages:

```bash
sudo apt install -y ros-<distro>-ur-client-library
sudo apt install -y ros-<distro>-ur-controllers
sudo apt install -y ros-<distro>-ur-description
sudo apt install -y ros-<distro>-ur-msgs
sudo apt install -y ros-<distro>-ur-robot-driver

```

The `ros-<distro>-ur-description` package contains all robot description files for UR3, UR5, URx…

Replace `<distro>` in all the lines above with the ROS2 distribution you have installed: `foxy`, `galactic`, `humble`, `iron`, `jazzy`, etc.

I hope this helps! Let me know if you need anything else!

Regards,  
Girish

---

<div class="post-metadata">

**Author:** ![rlgraf](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/r/eb8c5e/32.png) [@rlgraf](https://get-help.theconstruct.ai/u/rlgraf)\
**Post date:** [January 16, 2025, 1:26am UTC](https://get-help.theconstruct.ai/t/resources-for-setting-up-a-gazebo-simulation-of-a-ur5e-on-my-own-system/34363/3 "2025-01-16T01:26:09Z")

</div>

When I get down to “sudo apt install -y gazebo11” I am getting the output:

Reading package lists… Done  
Building dependency tree… Done  
Reading state information… Done  
Package gazebo11 is not available, but is referred to by another package.  
This may mean that the package is missing, has been obsoleted, or is only available from another source  
E: Package ‘gazebo11’ has no installation candidate

Do you have an idea of how to remedy this? Thank you for your help so far!

Russell

---

<div class="post-metadata">

**Author:** ![girishkumar.kannan](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/girishkumar.kannan/32/6994_2.png) [@girishkumar.kannan](https://get-help.theconstruct.ai/u/girishkumar.kannan)\
**Post date:** [January 16, 2025, 5:04am UTC](https://get-help.theconstruct.ai/t/resources-for-setting-up-a-gazebo-simulation-of-a-ur5e-on-my-own-system/34363/4 "2025-01-16T05:04:58Z")

</div>

Hi @rlgraf ,

I believe that `gazebo11` has been removed from Ubuntu PPAs.  
**Gazebo 11** reaches End-of-Life on January 2025, which is this month.  
So I was not exactly sure if it was removed (or dereferenced) from downloadable sources.  
I thought it would be removed by the end of January 2025, but I guess I was wrong. The Gazebo developers would have removed it already (I am not 100% sure at this point).

There is an issue page on GitHub about this: [Gazebo Classic (gazebo11) can't be installed on Ubuntu 22.04 Jammy with ROS2 Humble. · Issue #3357 · gazebosim/gazebo-classic · GitHub](https://github.com/gazebosim/gazebo-classic/issues/3357)

Maybe you can try installing the new Gazebo Sim (based on your Ubuntu distribution) from here: [Gazebo Harmonic — Gazebo harmonic documentation](https://gazebosim.org/docs/harmonic/install/)  
(Harmonic is the current LTS, the previous LTS was Ignition Fortress. Ignition Fortress is quite buggy, so I would not recommend using it. Just switch over to Harmonic.)

You can still download `gazebo11` (or Gazebo Classic version) source files and build it on your computer. Here is the link for that: [Gazebo : Tutorial : From source (Ubuntu and Mac)](https://classic.gazebosim.org/tutorials?tut=install_from_source)

You are in a tricky time period unfortunately. You need to decide one option out of these two:

1. Start using Gazebo Sim (Harmonic) from the beginning. Instead of starting with Gazebo Classic.
2. Install Gazebo Classic from source and then switch over to Gazebo Sim eventually.

The migration grace period for switch over from Gazebo Classic to Gazebo Sim is also over, which is evident from you unable to download `gazebo11` (Gazebo Classic). I recommend that you install Gazebo Sim and start with that directly rather than try to install Gazebo Classic (which will be a waste of time for you at this point).

Let me / us know if you face any issues when you are installing Gazebo Sim!

Regards,  
Girish

---

<div class="post-metadata">

**Author:** ![rlgraf](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/r/eb8c5e/32.png) [@rlgraf](https://get-help.theconstruct.ai/u/rlgraf)\
**Post date:** [January 17, 2025, 10:37pm UTC](https://get-help.theconstruct.ai/t/resources-for-setting-up-a-gazebo-simulation-of-a-ur5e-on-my-own-system/34363/5 "2025-01-17T22:37:06Z")

</div>

I have (I believe) successfully installed, Gazebo Sim, am able to open up a blank simulation environment, and I have installed the Universal Robot packages. Now, what steps do I take to get the UR53 to generate in my Gazebo simulation?

Russell

---

<div class="post-metadata">

**Author:** ![girishkumar.kannan](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/girishkumar.kannan/32/6994_2.png) [@girishkumar.kannan](https://get-help.theconstruct.ai/u/girishkumar.kannan)\
**Post date:** [January 20, 2025, 1:36pm UTC](https://get-help.theconstruct.ai/t/resources-for-setting-up-a-gazebo-simulation-of-a-ur5e-on-my-own-system/34363/6 "2025-01-20T13:36:45Z")

</div>

Hi @rlgraf ,

> [@rlgraf](#):
>
> I have (I believe) successfully installed, Gazebo Sim, am able to open up a blank simulation environment, and I have installed the Universal Robot packages. Now, what steps do I take to get the UR53 to generate in my Gazebo simulation?

Good! From this point onward, you will have to configure all your launch files that work with Gazebo Classic version of simulation to work with Gazebo Sim (modern version).

Now the first place to start is to understand how Gazebo Sim works.  
There is already a course present in The Construct that gives you an introductory understanding on how to use Gazebo Sim. The course name is **Introduction to Gazebo Sim with ROS2**.  
This step is going to take you a bit of time, few days to a week, based on your speed of understanding things.

These are the steps you will follow:

1. Convert all your simulation launch files for UR5e to work with Gazebo Sim.
2. Implement the required ROS-GZ bridge to enable communication between ROS2 topics and Gazebo Sim topics. You need this to control the robot in simulation.
3. You need to modify the URDF/xacro files of the robot (if not done already) to work with Gazebo Sim.
4. Do step 3 for the gripper model that you desire to use.

Once you have done all the 4 above steps, you should be able to spawn and control the robot with Gazebo Sim version.

Regards,  
Girish

---

<div class="post-metadata">

**Author:** ![rlgraf](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/r/eb8c5e/32.png) [@rlgraf](https://get-help.theconstruct.ai/u/rlgraf)\
**Post date:** [January 23, 2025, 11:17pm UTC](https://get-help.theconstruct.ai/t/resources-for-setting-up-a-gazebo-simulation-of-a-ur5e-on-my-own-system/34363/7 "2025-01-23T23:17:19Z")

</div>

Great! I am about halfway through the course, and will reach back out if I have any more questions about spawning the UR5e once I have finished. Thank you!

Russell

---

<div class="post-metadata">

**Author:** ![system](https://get-help.theconstruct.ai/uploads/default/original/2X/9/9d3ce8305cc0d0d9b6e07d15767a6f245c526f1b.jpeg) [@system](https://get-help.theconstruct.ai/u/system)\
**Post date:** [January 28, 2025, 11:18pm UTC](https://get-help.theconstruct.ai/t/resources-for-setting-up-a-gazebo-simulation-of-a-ur5e-on-my-own-system/34363/8 "2025-01-28T23:18:09Z")

</div>

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.
