ros-simulation / gazebo_ros_pkgs

Wrappers, tools and additional API's for using ROS with Gazebo
http://wiki.ros.org/gazebo_ros_pkgs
742 stars 766 forks source link

gazebo_plugins causing colcon build to fail #1497

Closed EGAlberts closed 11 months ago

EGAlberts commented 11 months ago

I'm trying to port a gazebo plugin made for ROS1 to ROS2 humble for use with Gazebo classic (11).

In the code they use the following header file:

#include <gazebo_plugins/gazebo_ros_utils.h>

Naturally, to resolve this dependency I add find_package(gazebo_plugins REQUIRED) (A package which I can confirm is installed within my ROS2) to the CMakeLists for the package. However, introducing this as a dependency appears to break the colcon build completely. I tried for example to create an entirely fresh package. As soon as this dependency is added it breaks.

EGAlberts commented 11 months ago

After a lot of messing around I discovered the following: I was including this command in my cmakeLists list(APPEND CMAKE_CXX_FLAGS "${GAZEBO_CXX_FLAGS}") Which was harmless and I picked up in some gazebo tutorial along the way, but triggered errors when I include packages such as gazebo_ros and gazebo_plugins