rosros2gazebo-simu

package 'turtlebot3_gazebo' not found, searching: ['/opt/ros/foxy']


I completed the Quick Start Guide for Foxy. All went well.

I'm using Ubuntu 20.04 on WSL2 Windows 11.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.5 LTS
Release:        20.04
Codename:       focal
$ printenv ROS_DISTRO
foxy
$ gazebo -version
Gazebo multi-robot simulator, version 11.11.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org


Gazebo multi-robot simulator, version 11.11.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

However, when try to run the simulation

$ export TURTLEBOT3_MODEL=burger
$ ros2 launch turtlebot3_gazebo empty_world.launch.py

It failed with the message

Package 'turtlebot3_gazebo' not found: "package 'turtlebot3_gazebo' not found, searching: ['/opt/ros/foxy']"

How to fix it? I found a similar thread on Reddit but it didn't help much.


Solution

  • As pointed by @Bilal in the comment, I solved the issue by running

    sudo apt-install ros-foxy-turtlebot3-gazebo
    

    Then, run the simulation:

    set env export TURTLEBOT3_MODEL=burger
    run ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py
    

    Result: Gazezo WSL sceenshot