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

[WIP] [gazebo10] Add new port #8178

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ports/gazebo10/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Source: gazebo10
Version: 10.1.0
Build-Depends: boost-asio, boost-date-time, boost-filesystem, boost-format, boost-interprocess, boost-iostreams, boost-program-options, boost-property-tree, boost-regex, boost-smart-ptr, boost-system, boost-thread, boost-uuid, bullet3, freeimage, ignition-fuel-tools1, ignition-math4, ignition-msgs1, ignition-transport4, ogre, protobuf, qt5-base, qwt, sdformat6, tbb, tinyxml, tinyxml2, zeromq
Homepage: http://gazebosim.org/
Description: Gazebo robot simulator
20 changes: 20 additions & 0 deletions ports/gazebo10/fix-find-package-ogre.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff -r 7c4281fe1229 -r c71622e89674 cmake/SearchForStuff.cmake
--- a/cmake/SearchForStuff.cmake
+++ b/cmake/SearchForStuff.cmake
@@ -357,6 +357,8 @@
pkg_check_modules(OGRE OGRE>=${MIN_OGRE_VERSION})

if (NOT OGRE_FOUND)
+ # Workaround for CMake bug https://gitlab.kitware.com/cmake/cmake/issues/17135
+ unset(OGRE_FOUND CACHE)
# If OGRE was not found, try with the standard find_package(OGRE)
find_package(OGRE COMPONENTS RTShaderSystem Terrain Overlay Paging)
# Add each component include directories to OGRE_INCLUDE_DIRS because
@@ -370,6 +372,7 @@
list(APPEND OGRE_LIBRARIES ${OGRE_Terrain_LIBRARIES})
list(APPEND OGRE_LIBRARIES ${OGRE_Overlay_LIBRARIES})
list(APPEND OGRE_LIBRARIES ${OGRE_Paging_LIBRARIES})
+ set(OGRE_PLUGINDIR ${OGRE_PLUGIN_DIR})
endif ()

if (NOT OGRE_FOUND)
11 changes: 11 additions & 0 deletions ports/gazebo10/fix-link-ignition-common.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
diff -r 7c4281fe1229 -r 735535193dd2 gazebo/common/CMakeLists.txt
--- a/gazebo/common/CMakeLists.txt
+++ b/gazebo/common/CMakeLists.txt
@@ -262,6 +262,7 @@
${TBB_LIBRARIES}
${SDFormat_LIBRARIES}
${IGNITION-FUEL_TOOLS_LIBRARIES}
+ ${IGNITION-COMMON_LIBRARIES}
)

if (UNIX)
29 changes: 29 additions & 0 deletions ports/gazebo10/fix-pkg-config-msvc-workaround.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
diff -r 7c4281fe1229 -r b7e6f837cc8b cmake/SearchForStuff.cmake
--- a/cmake/SearchForStuff.cmake
+++ b/cmake/SearchForStuff.cmake
@@ -91,12 +91,6 @@
########################################
# Find packages

-# In Visual Studio we use configure.bat to trick all path cmake
-# variables so let's consider that as a replacement for pkgconfig
-if (MSVC)
- set (PKG_CONFIG_FOUND TRUE)
-endif()
-
find_package(CURL)
if (CURL_FOUND)
# FindCURL.cmake distributed with CMake exports
@@ -109,6 +103,12 @@
set(CURL_INCLUDEDIR ${CURL_INCLUDE_DIRS})
endif ()

+# In Visual Studio we use configure.bat to trick all path cmake
+# variables so let's consider that as a replacement for pkgconfig
+if (MSVC)
+ set (PKG_CONFIG_FOUND TRUE)
+endif()
+
if (PKG_CONFIG_FOUND)
if (NOT CURL_FOUND)
pkg_check_modules(CURL libcurl)
14 changes: 14 additions & 0 deletions ports/gazebo10/gazebo-3131.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff -r 7c4281fe1229 -r 28fb1b2d8cc5 gazebo/rendering/deferred_shading/GBufferMaterialGenerator.cc
--- a/gazebo/rendering/deferred_shading/GBufferMaterialGenerator.cc
+++ b/gazebo/rendering/deferred_shading/GBufferMaterialGenerator.cc
@@ -136,10 +136,6 @@
Ogre::String programName = this->baseName + "VP_" +
Ogre::StringConverter::toString(_permutation);

-#if OGRE_DEBUG_MODE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not force OGRE_DEBUG_MODE to 0 in CMakeLists.txt?

Copy link
Contributor Author

@traversaro traversaro Jan 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because OGRE_DEBUG_MODE is already defned to 1 in OGRE headers if OGRE is compiled in Debug, so forcing it to 0 could create problems in the compilation of OGRE headers. See the related upstream PR : https://bitbucket.org/osrf/gazebo/pull-requests/3131 .

- Ogre::LogManager::getSingleton().getDefaultLog()->logMessage(programSource);
-#endif
-
// Create shader object
Ogre::HighLevelGpuProgramPtr ptrProgram =
Ogre::HighLevelGpuProgramManager::getSingleton().createProgram(
14 changes: 14 additions & 0 deletions ports/gazebo10/gazebo-3134.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff -r 05048f450958 -r cc4f1a058d49 gazebo/rendering/deferred_shading/MergeMaterialGenerator.cc
--- a/gazebo/rendering/deferred_shading/MergeMaterialGenerator.cc
+++ b/gazebo/rendering/deferred_shading/MergeMaterialGenerator.cc
@@ -104,10 +104,6 @@
Ogre::String programName = this->baseName + "VP_" +
Ogre::StringConverter::toString(_permutation);

-#if OGRE_DEBUG_MODE
- Ogre::LogManager::getSingleton().getDefaultLog()->logMessage(programSource);
-#endif
-
// Create shader object
Ogre::HighLevelGpuProgramPtr ptrProgram =
Ogre::HighLevelGpuProgramManager::getSingleton().createProgram(
34 changes: 34 additions & 0 deletions ports/gazebo10/gazebo-3135.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
diff -r 783ca3ec62b8 -r ed9e0e54dc86 cmake/SearchForStuff.cmake
--- a/cmake/SearchForStuff.cmake
+++ b/cmake/SearchForStuff.cmake
@@ -312,13 +312,23 @@
message(STATUS "TBB not found, attempting to detect manually")
set (TBB_PKG_CONFIG "")

- find_library(tbb_library tbb ENV LD_LIBRARY_PATH)
- if (tbb_library)
- set(TBB_FOUND true)
- set(TBB_LIBRARIES ${tbb_library})
- else (tbb_library)
- BUILD_ERROR ("Missing: TBB - Threading Building Blocks")
- endif(tbb_library)
+ # Workaround for CMake bug https://gitlab.kitware.com/cmake/cmake/issues/17135
+ unset(TBB_FOUND CACHE)
+
+ find_package(TBB CONFIG)
+ if (TBB_FOUND)
+ set(TBB_LIBRARIES TBB::tbb)
+ endif()
+
+ if (NOT TBB_FOUND)
+ find_library(tbb_library tbb ENV LD_LIBRARY_PATH)
+ if (tbb_library)
+ set(TBB_FOUND true)
+ set(TBB_LIBRARIES ${tbb_library})
+ else (tbb_library)
+ BUILD_ERROR ("Missing: TBB - Threading Building Blocks")
+ endif(tbb_library)
+ endif (NOT TBB_FOUND)
endif (NOT TBB_FOUND)

#################################################
14 changes: 14 additions & 0 deletions ports/gazebo10/gazebo-3141.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff -r 783ca3ec62b8 -r d1dc82f1cf81 deps/opende/CMakeLists.txt
--- a/deps/opende/CMakeLists.txt
+++ b/deps/opende/CMakeLists.txt
@@ -269,7 +269,9 @@
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWIN32 -DODE_DLL")
endif()

-set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_LINK_FLAGS_${CMAKE_BUILD_TYPE}} -MF -MT -fno-strict-aliasing -DPIC ")
+if (NOT MSVC)
+ set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_LINK_FLAGS_${CMAKE_BUILD_TYPE}} -MF -MT -fno-strict-aliasing -DPIC ")
+endif()

if (WIN32)
add_library(gazebo_ode SHARED ${sources})
27 changes: 27 additions & 0 deletions ports/gazebo10/gazebo-3142.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
diff -r 783ca3ec62b8 -r e94dd55a2a26 gazebo/rendering/deferred_shading/GBufferMaterialGenerator.cc
--- a/gazebo/rendering/deferred_shading/GBufferMaterialGenerator.cc
+++ b/gazebo/rendering/deferred_shading/GBufferMaterialGenerator.cc
@@ -255,9 +255,6 @@
Ogre::String programName = this->baseName + "FP_" +
Ogre::StringConverter::toString(_permutation);

-#if OGRE_DEBUG_MODE
- Ogre::LogManager::getSingleton().getDefaultLog()->logMessage(programSource);
-#endif

// Create shader object
Ogre::HighLevelGpuProgramPtr ptrProgram =
diff -r 783ca3ec62b8 -r e94dd55a2a26 gazebo/rendering/deferred_shading/MergeMaterialGenerator.cc
--- a/gazebo/rendering/deferred_shading/MergeMaterialGenerator.cc
+++ b/gazebo/rendering/deferred_shading/MergeMaterialGenerator.cc
@@ -289,10 +289,6 @@
Ogre::String programName = this->baseName + "FP_" +
Ogre::StringConverter::toString(_permutation);

-#if OGRE_DEBUG_MODE
- Ogre::LogManager::getSingleton().getDefaultLog()->logMessage(programSource);
-#endif
-
// Create shader object
Ogre::HighLevelGpuProgramPtr ptrProgram =
Ogre::HighLevelGpuProgramManager::getSingleton().createProgram(
15 changes: 15 additions & 0 deletions ports/gazebo10/gazebo-3143.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff -r 783ca3ec62b8 -r 6f45867b9258 gazebo/gui/InsertModelWidgetPrivate.hh
--- a/gazebo/gui/InsertModelWidgetPrivate.hh
+++ b/gazebo/gui/InsertModelWidgetPrivate.hh
@@ -25,6 +25,11 @@
#include <boost/thread/mutex.hpp>

#ifdef HAVE_IGNITION_FUEL_TOOLS
+ #ifdef _WIN32
+ // DELETE is defined in winnt.h and causes a problem with
+ // ignition::fuel_tools::REST::DELETE
+ #undef DELETE
+ #endif
#include <ignition/fuel_tools/FuelClient.hh>
#include <ignition/fuel_tools/ModelIdentifier.hh>
#endif
146 changes: 146 additions & 0 deletions ports/gazebo10/gazebo-3144.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
diff -r 13b71990d544 -r f0c77c4ef2bb CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -154,7 +154,13 @@
# 2. In the generation of cmake/setup.sh from cmake/setup.sh.in
set(GAZEBO_DEFAULT_MASTER_HOST localhost)
set(GAZEBO_DEFAULT_MASTER_PORT 11345)
-set(GAZEBO_PLUGIN_PATH ${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/gazebo-${GAZEBO_MAJOR_VERSION}/plugins)
+set(GAZEBO_PLUGIN_LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/gazebo-${GAZEBO_MAJOR_VERSION}/plugins)
+set(GAZEBO_PLUGIN_BIN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/${BIN_INSTALL_DIR}/gazebo-${GAZEBO_MAJOR_VERSION}/plugins)
+if(WIN32)
+ set(GAZEBO_PLUGIN_PATH ${GAZEBO_PLUGIN_BIN_INSTALL_DIR})
+else()
+ set(GAZEBO_PLUGIN_PATH ${GAZEBO_PLUGIN_LIB_INSTALL_DIR})
+endif()
FILE(TO_NATIVE_PATH "${GAZEBO_PLUGIN_PATH}" GAZEBO_PLUGIN_PATH)
set(GAZEBO_MODEL_PATH ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/gazebo-${GAZEBO_MAJOR_VERSION}/models)
FILE(TO_NATIVE_PATH "${GAZEBO_MODEL_PATH}" GAZEBO_MODEL_PATH)
diff -r 13b71990d544 -r f0c77c4ef2bb cmake/GazeboUtils.cmake
--- a/cmake/GazeboUtils.cmake
+++ b/cmake/GazeboUtils.cmake
@@ -115,7 +115,10 @@
#################################################
macro (gz_install_library _name)
set_target_properties(${_name} PROPERTIES SOVERSION ${GAZEBO_MAJOR_VERSION} VERSION ${GAZEBO_VERSION_FULL})
- install (TARGETS ${_name} DESTINATION ${LIB_INSTALL_DIR} COMPONENT shlib)
+ install (TARGETS ${_name}
+ LIBRARY DESTINATION ${LIB_INSTALL_DIR} COMPONENT shlib
+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR} COMPONENT shlib
+ RUNTIME DESTINATION ${BIN_INSTALL_DIR} COMPONENT shlib)
endmacro ()

#################################################
diff -r 13b71990d544 -r f0c77c4ef2bb plugins/CMakeLists.txt
--- a/plugins/CMakeLists.txt
+++ b/plugins/CMakeLists.txt
@@ -159,8 +159,5 @@
GravityCompensationPlugin
)

-set(GAZEBO_PLUGIN_INSTALL_DIR
- ${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/gazebo-${GAZEBO_MAJOR_VERSION}/plugins/
-)

foreach (src ${plugins_single_header})
@@ -179,7 +178,10 @@
${ogre_libraries}
${IGNITION-TRANSPORT_LIBRARIES}
)
- install (TARGETS ${src} DESTINATION ${GAZEBO_PLUGIN_INSTALL_DIR})
+ install (TARGETS ${src}
+ LIBRARY DESTINATION ${GAZEBO_PLUGIN_LIB_INSTALL_DIR}
+ ARCHIVE DESTINATION ${GAZEBO_PLUGIN_LIB_INSTALL_DIR}
+ RUNTIME DESTINATION ${GAZEBO_PLUGIN_BIN_INSTALL_DIR})
gz_install_includes("plugins" ${src}.hh)
endforeach ()

@@ -198,7 +200,10 @@
${ogre_libraries}
${IGNITION-TRANSPORT_LIBRARIES}
)
- install (TARGETS ${src} DESTINATION ${GAZEBO_PLUGIN_INSTALL_DIR})
+ install (TARGETS ${src}
+ LIBRARY DESTINATION ${GAZEBO_PLUGIN_LIB_INSTALL_DIR}
+ ARCHIVE DESTINATION ${GAZEBO_PLUGIN_LIB_INSTALL_DIR}
+ RUNTIME DESTINATION ${GAZEBO_PLUGIN_BIN_INSTALL_DIR})
gz_install_includes("plugins" ${src}.hh)
gz_install_includes("plugins" ${src}Private.hh)
endforeach ()
@@ -214,7 +219,10 @@
${Qt5Widgets_LIBRARIES}
${IGNITION-TRANSPORT_LIBRARIES}
)
- install (TARGETS ${src} DESTINATION ${GAZEBO_PLUGIN_INSTALL_DIR})
+ install (TARGETS ${src}
+ LIBRARY DESTINATION ${GAZEBO_PLUGIN_LIB_INSTALL_DIR}
+ ARCHIVE DESTINATION ${GAZEBO_PLUGIN_LIB_INSTALL_DIR}
+ RUNTIME DESTINATION ${GAZEBO_PLUGIN_BIN_INSTALL_DIR})
gz_install_includes("plugins" ${src}.hh)
endforeach ()

@@ -225,7 +233,10 @@
libgazebo
${DART_LIBRARIES}
)
- install (TARGETS ${src} DESTINATION ${GAZEBO_PLUGIN_INSTALL_DIR})
+ install (TARGETS ${src}
+ LIBRARY DESTINATION ${GAZEBO_PLUGIN_LIB_INSTALL_DIR}
+ ARCHIVE DESTINATION ${GAZEBO_PLUGIN_LIB_INSTALL_DIR}
+ RUNTIME DESTINATION ${GAZEBO_PLUGIN_BIN_INSTALL_DIR})
gz_install_includes("plugins" ${src}.hh)
endforeach ()
endif()
@@ -234,7 +245,7 @@
# Plus, set RPATH to the directory so they can dynamically link.
target_link_libraries(LedPlugin FlashLightPlugin)
set_target_properties(
- LedPlugin PROPERTIES INSTALL_RPATH ${GAZEBO_PLUGIN_INSTALL_DIR})
+ LedPlugin PROPERTIES INSTALL_RPATH ${GAZEBO_PLUGIN_LIB_INSTALL_DIR})

add_subdirectory(events)

diff -r 13b71990d544 -r f0c77c4ef2bb plugins/events/CMakeLists.txt
--- a/plugins/events/CMakeLists.txt
+++ b/plugins/events/CMakeLists.txt
@@ -46,10 +46,16 @@

add_library(SimEventsPlugin SHARED ${sim_event_src})
target_link_libraries(SimEventsPlugin gazebo_physics gazebo_msgs)
-install (TARGETS SimEventsPlugin DESTINATION ${GAZEBO_PLUGIN_INSTALL_DIR})
+install (TARGETS SimEventsPlugin
+ LIBRARY DESTINATION ${GAZEBO_PLUGIN_LIB_INSTALL_DIR}
+ ARCHIVE DESTINATION ${GAZEBO_PLUGIN_LIB_INSTALL_DIR}
+ RUNTIME DESTINATION ${GAZEBO_PLUGIN_BIN_INSTALL_DIR})
gz_install_includes("plugins/events" ${sim_event_include})

add_library(RegionEventBoxPlugin SHARED ${src})
target_link_libraries(RegionEventBoxPlugin gazebo_physics gazebo_msgs)
-install (TARGETS RegionEventBoxPlugin DESTINATION ${GAZEBO_PLUGIN_INSTALL_DIR})
+install (TARGETS RegionEventBoxPlugin
+ LIBRARY DESTINATION ${GAZEBO_PLUGIN_LIB_INSTALL_DIR}
+ ARCHIVE DESTINATION ${GAZEBO_PLUGIN_LIB_INSTALL_DIR}
+ RUNTIME DESTINATION ${GAZEBO_PLUGIN_BIN_INSTALL_DIR})
gz_install_includes("plugins/events" ${inc})
diff -r 13b71990d544 -r f0c77c4ef2bb plugins/rest_web/CMakeLists.txt
--- a/plugins/rest_web/CMakeLists.txt
+++ b/plugins/rest_web/CMakeLists.txt
@@ -42,10 +42,16 @@

add_library(RestWebPlugin SHARED ${server_src} )
target_link_libraries(RestWebPlugin ${GAZEBO_libraries} gazebo_msgs)
-install (TARGETS RestWebPlugin DESTINATION ${GAZEBO_PLUGIN_INSTALL_DIR})
+install (TARGETS RestWebPlugin
+ LIBRARY DESTINATION ${GAZEBO_PLUGIN_LIB_INSTALL_DIR}
+ ARCHIVE DESTINATION ${GAZEBO_PLUGIN_LIB_INSTALL_DIR}
+ RUNTIME DESTINATION ${GAZEBO_PLUGIN_BIN_INSTALL_DIR})
gz_install_includes("plugins" ${server_inc})

add_library(RestUiPlugin SHARED ${client_src} ${headers_MOC})
target_link_libraries(RestUiPlugin ${GAZEBO_libraries} gazebo_msgs)
-install (TARGETS RestUiPlugin DESTINATION ${GAZEBO_PLUGIN_INSTALL_DIR})
+install (TARGETS RestUiPlugin
+ LIBRARY DESTINATION ${GAZEBO_PLUGIN_LIB_INSTALL_DIR}
+ ARCHIVE DESTINATION ${GAZEBO_PLUGIN_LIB_INSTALL_DIR}
+ RUNTIME DESTINATION ${GAZEBO_PLUGIN_BIN_INSTALL_DIR})
gz_install_includes("plugins" ${client_inc})
Loading