Open traversaro opened 5 years ago
Thanks for the report. @seanyen-msft, can you look into this?
@traversaro Sorry for the delay on this.
It seems to me that gazebo-config.cmake
is quite sensitive to what CMake files in current search path. For example, depending on FindOgre.cmake
or OgreConfig.cmake
is used, OGRE_xxx_INCLUDE_DIRS
or OGRE-xxx_INCLUDE_DIRS
is defined. However, gazebo-config.cmake
only deals with OGRE_xxx_INCLUDE_DIRS
.
For now, I will accommodate this by updating gazebo-config.cmake
in our gazebo9
chocolatey package like this:
# Find OGRE
find_package(OGRE REQUIRED COMPONENTS Terrain Paging)
list(APPEND GAZEBO_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS})
list(APPEND GAZEBO_LIBRARIES ${OGRE_LIBRARIES})
# When including OGRE, also include the Terrain and Paging components
list(APPEND GAZEBO_INCLUDE_DIRS
${OGRE_Terrain_INCLUDE_DIRS}
${OGRE_Paging_INCLUDE_DIRS}
${OGRE-Terrain_INCLUDE_DIRS}
${OGRE-Paging_INCLUDE_DIRS})
list(APPEND GAZEBO_LIBRARIES
${OGRE_Terrain_LIBRARIES}
${OGRE_Paging_LIBRARIES}
${OGRE-Terrain_LIBRARIES}
${OGRE-Paging_LIBRARIES})
Let me know if it fixes your issue. Meanwhile, I will need to open a new discussion with Gazebo team on this.
Adding conversation link in Gazebo side. https://bitbucket.org/osrf/gazebo/pull-requests/3090/
Describe the bug Compilation of a Gazebo plugin that uses the header
<gazebo/rendering/Camera.hh>
is not working.To Reproduce After executing
C:\opt\ros\melodic\x64\setup.bat
andC:\opt\rosdeps\x64\share\gazebo-9\setup.bat
, try to compile in Release a simple Gazebo plugin that includes<gazebo/rendering/Camera.hh>
(based on http://gazebosim.org/tutorials/?tut=plugins_hello_world) https://gist.github.com/traversaro/8b47312cb53a1228aa59ead900522c17 :The last command results in the following error:
Uncommenting the following lines in the CMakeLists.txt:
the compilation works as expected. For some reason, this workaround is not necessary on Linux and macOS. Note that
gazebo_pkg_ros
has a similar workaround, but based onpkg-config
: https://github.com/ros-simulation/gazebo_ros_pkgs/blob/melodic-devel/gazebo_plugins/CMakeLists.txt#L59 .Expected behavior I would expect the plugin to compile correctly without workarounds, as it is the case on Linux and macOS .
Environment information:
winver
Version 1709 (OS Build 16299.192)choco list --local-only
C:\src\gazebo_plugin_tutorial\build>