Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nav2_system_tests Build Fails: gazebo_ros_pkgs Not Found #4901

Open
abdul-mannan-khan opened this issue Feb 4, 2025 · 2 comments
Open

nav2_system_tests Build Fails: gazebo_ros_pkgs Not Found #4901

abdul-mannan-khan opened this issue Feb 4, 2025 · 2 comments
Labels
question Further information is requested

Comments

@abdul-mannan-khan
Copy link

I encountered a build failure when trying to compile nav2_system_tests on ROS 2 Humble. The error indicates that gazebo_ros_pkgs cannot be found.

--- stderr: nav2_system_tests                            
CMake Error at CMakeLists.txt:17 (find_package):
  By not providing "Findgazebo_ros_pkgs.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "gazebo_ros_pkgs", but CMake did not find one.

  Could not find a package configuration file provided by "gazebo_ros_pkgs"
  with any of the following names:

    gazebo_ros_pkgsConfig.cmake
    gazebo_ros_pkgs-config.cmake

  Add the installation prefix of "gazebo_ros_pkgs" to CMAKE_PREFIX_PATH or
  set "gazebo_ros_pkgs_DIR" to a directory containing one of the above files.
  If "gazebo_ros_pkgs" provides a separate development package or SDK, be
  sure it has been installed.

---
Failed   <<< nav2_system_tests [1.67s, exited with code 1]

Tried installing gazebo_ros_pkgs with:

sudo apt install ros-humble-gazebo-ros-pkgs
But received an "Unable to locate package" error.

Installed ros-humble-ros-gz with:

sudo apt-get install ros-humble-ros-gz

Actual Behavior: The build fails due to missing gazebo_ros_pkgs.

Request for Help:
Is gazebo_ros_pkgs still supported for ROS 2 Humble?
Should nav2_system_tests be updated to use an alternative package?
Are there any additional installation steps required for gazebo_ros_pkgs?
Thank you in advance for your help!

@abdul-mannan-khan abdul-mannan-khan added the question Further information is requested label Feb 4, 2025
@ewak
Copy link
Contributor

ewak commented Feb 4, 2025

See https://community.gazebosim.org/t/gazebo-classic-end-of-life/2563

I migrated to harmonic on ubuntu 22.04 circa August 2024.
Here is my ansible playbook you might get some mileage from.

---
- hosts: ros_humble_gazebo
  tasks:
    - name: Add osrf foundation GPG key
      ansible.builtin.get_url:
        url: https://packages.osrfoundation.org/gazebo.gpg
        dest: /etc/apt/keyrings/pkgs-osrf-archive-keyring.gpg
        mode: '0644'
        force: true
      become: yes

    - name: Add osrf gazebo repo
      ansible.builtin.apt_repository:
        filename: 'gazebo-stable'
        repo: 'deb [signed-by=/etc/apt/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable jammy main'
        update_cache: yes
      become: yes

    - name: Install simulation gazebo related humble packages
      apt:
        pkg: "{{ packages }}"
      become: yes
      vars:
        packages:
          - ros-humble-ros-gzharmonic
          - ros-humble-ros-gzharmonic-bridge
          - ros-humble-ros-gzharmonic-image
          - ros-humble-ros-gzharmonic-interfaces
          - ros-humble-ros-gzharmonic-sim
          - ros-humble-ros-gzharmonic-sim-demos
          - libgz-sensors6-dev
          - gz-harmonic
          - libgz-sim8-dev
          - rapidjson-dev
          - libopencv-dev
          - libgstreamer1.0-dev
          - libgstreamer-plugins-base1.0-dev
          - gstreamer1.0-plugins-bad
          - gstreamer1.0-libav
          - gstreamer1.0-gl

@SteveMacenski
Copy link
Member

I seem to still be able to find them & still in rosdistro: https://github.com/ros/rosdistro/blob/master/humble/distribution.yaml#L2929

steve@reese:~$ sudo apt install ros-humble-gazebo-ros-pkgs
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libfreenect0.5 libfyaml0 libncurses5-dev libopts25 libwxbase3.0-0v5
  libwxgtk3.0-gtk3-0v5 ros-humble-gtsam ros-iron-behaviortree-cpp-v3
  ros-iron-dwb-msgs ros-iron-nav-2d-msgs sntp
Use 'sudo apt autoremove' to remove them.
The following packages will be upgraded:
  ros-humble-gazebo-ros-pkgs
1 upgraded, 0 newly installed, 0 to remove and 192 not upgraded.
Need to get 7,000 B of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://packages.ros.org/ros2/ubuntu jammy/main amd64 ros-humble-gazebo-ros-pkgs amd64 3.7.0-1jammy.20250114.181732 [7,000 B]
Fetched 7,000 B in 0s (23.7 kB/s)                     
(Reading database ... 484305 files and directories currently installed.)
Preparing to unpack .../ros-humble-gazebo-ros-pkgs_3.7.0-1jammy.20250114.181732_
amd64.deb ...
Unpacking ros-humble-gazebo-ros-pkgs (3.7.0-1jammy.20250114.181732) over (3.7.0-
1jammy.20241128.064720) ...
Setting up ros-humble-gazebo-ros-pkgs (3.7.0-1jammy.20250114.181732) ...

But I also updated my rosdistro to be tagged about a year ago before the Jazzy/Rolling move to 24.04 so that may be why (and may work for you):

steve@reese:~$ cat /etc/ros/rosdep/sources.list.d/20-default.list 
# os-specific listings first
yaml https://raw.githubusercontent.com/ros/rosdistro/rolling/2024-02-28/rosdep/osx-homebrew.yaml osx

# generic
yaml https://raw.githubusercontent.com/ros/rosdistro/rolling/2024-02-28/rosdep/base.yaml
yaml https://raw.githubusercontent.com/ros/rosdistro/rolling/2024-02-28/rosdep/python.yaml
yaml https://raw.githubusercontent.com/ros/rosdistro/rolling/2024-02-28/rosdep/ruby.yaml
gbpdistro https://raw.githubusercontent.com/ros/rosdistro/rolling/2024-02-28/releases/fuerte.yaml fuerte

# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants