How to fix gazebo_ros building error?
Hello, I've been trying to setup the Turtlebot3 simulation using the e-manual for several days now, but I'm still running into the same problem over and over again. I am using Ubuntu 20.04 and ROS2 Foxy. Following the instruction of the manual made me install Gazebo for ROS using the debian package:
sudo apt-get install ros-foxy-gazebo-*
After i follow the manual for the installation of the simulation I run into the following error when building the workspace:
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
Browsing through the forums for answers I found out that installing the gazebo_ros packages would help. so i did that following these instructions which make me run into the following problem while building:
CMake Error in CMakeLists.txt: Imported target "dart" includes non-existent path
"/include"
in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
The path was deleted, renamed, or moved to another location.
An install or uninstall procedure did not complete successfully.
The installation package was faulty and references files it does not provide.
CMake Generate step failed. Build files cannot be regenerated correctly.
Failed <<< gazebo_ros [30.4s, exited with code 1]
Summary: 9 packages finished [41.5s] 1 package failed: gazebo_ros 1 package had stderr output: gazebo_ros 2 packages not processed
Does anyone know how to fix this? Sicerly Niklas
I have the exact same setup and the exact same problem. I would really appreciate if someone would provide hints on how to resolve this issue.
@irobot I removed ROS2 completely and used the Quick-Start Guide of the E-Manuel to install Foxy. That somehow solved my problem.
So I have the same issue. My src folder contains all folders from
turtlebot3
,turtlebot3_simulations
, andturtlebot3_msgs
. Everything was working fine earlier, but I had to clean my workspace for some reasons. When I didcatkin build
again, this error message popped up. I will re-write it again here:CMake Error in CMakeLists.txt: Imported target "dart" includes non-existent path "/include" in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include: * The path was deleted, renamed, or moved to another location. * An install or uninstall procedure did not complete successfully. * The installation package was faulty and references files it does not provide.
But here is the weird part: If you build again, then all packages build successfully, and everything works. This leads me to believe that this non-existent path is somehow created during the building of other modules. But I did not look too much into that though.