From 41720c2552a4fc65402c2bac2ad815ae5d0610ef Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Tue, 7 Jul 2020 14:00:57 +0200 Subject: [PATCH] Add a workaround for https://github.com/osrf/gazebo/issues/2728 Fix https://github.com/robotology/icub-models/issues/39 --- CMakeLists.txt | 8 ++++++++ feet_fixed_model.sdf.in | 2 +- fixed_model.sdf.in | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e7adba5..9e4f7fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,14 @@ file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/ros DESTINATION ${CMAKE_CURRENT_BINARY_DIR # is enabled option(ICUB_MODELS_INSTALL_ALL_GAZEBO_MODELS OFF) +# Workaround for https://github.com/robotology/icub-models/issues/39 and +# https://github.com/osrf/gazebo/issues/2728 +set(ICUB_MODELS_SDF_VERSION "1.5") +find_package(GAZEBO QUIET) +if(GAZEBO_FOUND AND GAZEBO_VERSION VERSION_GREATER_EQUAL 11.0) + set(ICUB_MODELS_SDF_VERSION "1.7") +endif() + # Note: all the models run in Gazebo, but this two are the only one that # run with the default physics settings of Gazebo, see issue # https://github.com/robotology/icub-model-generator/issues/52 for more info diff --git a/feet_fixed_model.sdf.in b/feet_fixed_model.sdf.in index 60bc297..b4c8a49 100644 --- a/feet_fixed_model.sdf.in +++ b/feet_fixed_model.sdf.in @@ -1,5 +1,5 @@ - + model://@ROBOT_NAME@ diff --git a/fixed_model.sdf.in b/fixed_model.sdf.in index 55525a7..852f1bf 100644 --- a/fixed_model.sdf.in +++ b/fixed_model.sdf.in @@ -1,5 +1,5 @@ - + model://@ROBOT_NAME@