ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Why is not building package turtlebot3_gazebo on ROS2?

asked 2020-04-17 19:39:28 -0600

aktec gravatar image

updated 2020-04-18 06:04:52 -0600

marguedas gravatar image

I work with a turtlebot3 burger. In the instructions, when I install packages, http://emanual.robotis.com/docs/en/pl... (16.1.4)

mkdir -p ~/turtlebot3_ws/src

cd ~/turtlebot3_ws

wget https://raw.githubusercontent.com/ROBOTIS-GIT/turtlebot3/ros2/turtlebot3.repos

vcs import src < turtlebot3.repos

colcon build --symlink-install

the following error occurs:

CMake Error at CMakeLists.txt:19 (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   <<< turtlebot3_gazebo [ Exited with code 1 ]

Summary: 12 packages finished [9.23s]
  1 package failed: turtlebot3_gazebo
  1 package had stderr output: turtlebot3_gazebo
  1 package not processed

I work with ROS2 Dashing Diademata and it work fine. Installing package Gazebo9.

edit retag flag offensive close merge delete

5 Answers

Sort by » oldest newest most voted
1

answered 2020-04-18 17:38:31 -0600

That’s the classic “you didn’t install that package” error. Make sure to install it and/or run rosdep.

edit flag offensive delete link more

Comments

I had already installed gazebo still it shows the same error.

bishaljais gravatar image bishaljais  ( 2020-11-23 06:02:09 -0600 )edit
1

answered 2020-05-24 21:28:43 -0600

Yesika Rodriguez gravatar image

You must install the gazebo-ros package

sudo apt-get install ros-melodic-gazebo-ros

change melodic for your ros version

edit flag offensive delete link more
0

answered 2020-11-23 22:40:45 -0600

nuclearsandwich gravatar image

It looks like you may not have sourced the environment script as described in the official install docs linked by the ROBOTIS guide https://index.ros.org/doc/ros2/Instal...

edit flag offensive delete link more

Comments

I had sourced it but still, it shows the same error. I have been following ros2 setup on turtlebot3 https://emanual.robotis.com/docs/en/p...

bishaljais gravatar image bishaljais  ( 2020-11-24 03:56:24 -0600 )edit
0

answered 2021-03-29 20:36:45 -0600

abhishek47 gravatar image

updated 2021-03-30 05:52:59 -0600

The comments to #q360774 are what helped me: gazebo_ros_pkgs has to be installed from source:

  1. Make sure to have Gazebo installed.
  2. Go to workspace src and then git clone https://github.com/ros-simulation/gazebo_ros_pkgs.git -b ros2 (this clones branch ros2)
  3. sudo rosdep update followed by rosdep check --from-paths . --ignore-src --rosdistro $ROS_DISTRO -y. If all goes well you should see "All system dependencies have been satisfied".
  4. Move one level above src and then finally colcon build. Don't forget to source this workspace.
edit flag offensive delete link more

Comments

If you have the ros-galactic-gazebo-ros-pkgs already installed then a solution without downloading source is this: CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:/opt/ros/galactic/share/gazebo_ros_pkgs/cmake/ colcon build --symlink-install --packages-select turtlebot3_gazebo

you can verify the location with this: dpkg-query -L ros-galactic-gazebo-ros-pkgs | grep cmake

jimdinunzio gravatar image jimdinunzio  ( 2022-04-07 02:17:35 -0600 )edit
0

answered 2021-02-18 02:39:24 -0600

rodrigo55 gravatar image

Hi, you have to install all of the necessary packages needed for ros2, and then clone the repositories with the commands

wget https://raw.githubusercontent.com/ROBOTIS-GIT/turtlebot3/ros2/turtlebot3.repos
vcs import src < turtlebot3.repos
colcon build --symlink-install

That should get you to compile the packages. If you want a step by step explanation, I made this video that can help:

https://www.youtube.com/watch?v=766M2...

edit flag offensive delete link more

Comments

Still had the problem with turtlebot3_gazebo, added my own answer explaining how I fixed it.

abhishek47 gravatar image abhishek47  ( 2021-03-29 20:38:42 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2020-04-17 19:39:28 -0600

Seen: 5,097 times

Last updated: Mar 30 '21