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

iCub Manual Models used from build #43

Merged
merged 1 commit into from
Jul 27, 2020
Merged
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
23 changes: 19 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ endmacro()
# Copy the iCub folder in the build tree
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/iCub DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

# Copy the iCub_manual folder in the build tree
SUBDIRLIST(subdirs ${CMAKE_CURRENT_SOURCE_DIR}/iCub_manual)
foreach(subdir ${subdirs})
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/iCub_manual/${subdir}/ DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/iCub/${subdir})
endforeach()

# Copy the ros folder
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/ros DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/iCub)

Expand All @@ -44,7 +50,7 @@ list(APPEND GAZEBO_SUPPORTED_MODELS "iCubGazeboV2_5")
list(APPEND GAZEBO_SUPPORTED_MODELS "iCubGazeboV2_5_plus")

SUBDIRLIST(ROBOTS_NAMES ${CMAKE_CURRENT_BINARY_DIR}/iCub/robots)
foreach (ROBOT_DIRNAME ${ROBOTS_NAMES})
foreach(ROBOT_DIRNAME ${ROBOTS_NAMES})
set(ROBOT_NAME ${ROBOT_DIRNAME})
set(ROBOT_MODEL_CONFIG_FILE "${CMAKE_CURRENT_BINARY_DIR}/iCub/robots/${ROBOT_NAME}/model.config")

Expand Down Expand Up @@ -92,12 +98,21 @@ foreach (ROBOT_DIRNAME ${ROBOTS_NAMES})
file(REMOVE_RECURSE ${ROBOT_FIXED_MODEL_FOLDER})
file(REMOVE_RECURSE ${ROBOT_FEET_FIXED_MODEL_FOLDER})
endif()
endforeach()

# Deal with manually generated models
set(GAZEBO_SUPPORTED_MODELS "")
list(APPEND GAZEBO_SUPPORTED_MODELS "iCubGazeboV2_5_visuomanip")

SUBDIRLIST(ROBOTS_NAMES ${CMAKE_CURRENT_SOURCE_DIR}/iCub_manual/robots)
foreach(ROBOT_NAME ${ROBOTS_NAMES})
if(ROBOT_NAME IN_LIST GAZEBO_SUPPORTED_MODELS)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/iCub_manual/robots/${ROBOT_NAME}/model.config
${CMAKE_CURRENT_BINARY_DIR}/iCub/robots/${ROBOT_NAME}/model.config
@ONLY)
endif()
endforeach()

# Install the whole iCub directory
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/iCub DESTINATION share)

# Install the whole iCub_manual directory within share/iCub
# Please do not remove the trailing '/' in 'iCub_manual/'
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/iCub_manual/ DESTINATION share/iCub)
2 changes: 1 addition & 1 deletion iCub_manual/robots/iCubGazeboV2_5_visuomanip/model.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<model>
<name>iCubGazeboV2_5_visuomanip</name>
<version>1.0</version>
<sdf version='1.5'>model.urdf</sdf>
<sdf version='@ICUB_MODELS_SDF_VERSION@'>model.urdf</sdf>
<description>Model for the iCub humanoid robot. For more information check icub.org</description>
</model>
2 changes: 1 addition & 1 deletion model.config.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<model>
<name>@ROBOT_NAME_CONFIG@</name>
<version>1.0</version>
<sdf version='1.5'>@ROBOT_MODEL_CONFIG@</sdf>
<sdf version='@ICUB_MODELS_SDF_VERSION@'>@ROBOT_MODEL_CONFIG@</sdf>
<author>
<name>Silvio Traversaro</name>
<email>silvio.traversaro@iit.it</email>
Expand Down