From e34485419c855b04706e3f8e01181d63297b1a5c Mon Sep 17 00:00:00 2001 From: Carlos Mastalli <carlos.mastalli@gmail.com> Date: Thu, 21 Nov 2019 14:44:17 +0000 Subject: [PATCH] [cmake] Changed installation path of robot data to match devel and install space --- CMakeLists.txt | 22 +++++++++++----------- python/example_robot_data/robots_loader.py | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ecc0fc..0d190a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,15 +41,15 @@ IF(BUILD_PYTHON_INTERFACE) ENDIF(BUILD_PYTHON_INTERFACE) IF(NOT INSTALL_PYTHON_INTERFACE_ONLY) - INSTALL(DIRECTORY robots/anymal_b_simple_description DESTINATION share/${PROJECT_NAME}) - INSTALL(DIRECTORY robots/hyq_description DESTINATION share/${PROJECT_NAME}) - INSTALL(DIRECTORY robots/solo_description DESTINATION share/${PROJECT_NAME}) - INSTALL(DIRECTORY robots/icub_description DESTINATION share/${PROJECT_NAME}) - INSTALL(DIRECTORY robots/talos_data DESTINATION share/${PROJECT_NAME}) - INSTALL(DIRECTORY robots/kinova_description DESTINATION share/${PROJECT_NAME}) - INSTALL(DIRECTORY robots/tiago_description DESTINATION share/${PROJECT_NAME}) - INSTALL(DIRECTORY robots/ur_description DESTINATION share/${PROJECT_NAME}) - INSTALL(DIRECTORY robots/romeo_description DESTINATION share/${PROJECT_NAME}) - INSTALL(DIRECTORY robots/hector_description DESTINATION share/${PROJECT_NAME}) - INSTALL(DIRECTORY robots/double_pendulum_description DESTINATION share/${PROJECT_NAME}) + INSTALL(DIRECTORY robots/anymal_b_simple_description DESTINATION share/${PROJECT_NAME}/robots) + INSTALL(DIRECTORY robots/hyq_description DESTINATION share/${PROJECT_NAME}/robots) + INSTALL(DIRECTORY robots/solo_description DESTINATION share/${PROJECT_NAME}/robots) + INSTALL(DIRECTORY robots/icub_description DESTINATION share/${PROJECT_NAME}/robots) + INSTALL(DIRECTORY robots/talos_data DESTINATION share/${PROJECT_NAME}/robots) + INSTALL(DIRECTORY robots/kinova_description DESTINATION share/${PROJECT_NAME}/robots) + INSTALL(DIRECTORY robots/tiago_description DESTINATION share/${PROJECT_NAME}/robots) + INSTALL(DIRECTORY robots/ur_description DESTINATION share/${PROJECT_NAME}/robots) + INSTALL(DIRECTORY robots/romeo_description DESTINATION share/${PROJECT_NAME}/robots) + INSTALL(DIRECTORY robots/hector_description DESTINATION share/${PROJECT_NAME}/robots) + INSTALL(DIRECTORY robots/double_pendulum_description DESTINATION share/${PROJECT_NAME}/robots) ENDIF(NOT INSTALL_PYTHON_INTERFACE_ONLY) diff --git a/python/example_robot_data/robots_loader.py b/python/example_robot_data/robots_loader.py index 2c525af..c2c8caa 100644 --- a/python/example_robot_data/robots_loader.py +++ b/python/example_robot_data/robots_loader.py @@ -7,7 +7,7 @@ from pinocchio.robot_wrapper import RobotWrapper def getModelPath(subpath, printmsg=False): - base = '../../../share/example-robot-data' + base = '../../../share/example-robot-data/robots' main_dir = dirname(dirname(dirname(__file__))) for path in [join(dirname(main_dir), 'robots'), join(main_dir, 'robots') ] + [join(p, base.strip('/')) for p in sys.path]: -- GitLab