Commit d4e656d4 authored by Carlos Mastalli's avatar Carlos Mastalli
Browse files

Merge branch 'topic/code-reorganization' into 'devel'

Created robots folder and moved the description folders there, fix #15

See merge request gepetto/example-robot-data!23
parents f2dff659 e3448541
......@@ -41,15 +41,15 @@ IF(BUILD_PYTHON_INTERFACE)
ENDIF(BUILD_PYTHON_INTERFACE)
IF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
INSTALL(DIRECTORY anymal_b_simple_description DESTINATION share/${PROJECT_NAME})
INSTALL(DIRECTORY hyq_description DESTINATION share/${PROJECT_NAME})
INSTALL(DIRECTORY solo_description DESTINATION share/${PROJECT_NAME})
INSTALL(DIRECTORY icub_description DESTINATION share/${PROJECT_NAME})
INSTALL(DIRECTORY talos_data DESTINATION share/${PROJECT_NAME})
INSTALL(DIRECTORY kinova_description DESTINATION share/${PROJECT_NAME})
INSTALL(DIRECTORY tiago_description DESTINATION share/${PROJECT_NAME})
INSTALL(DIRECTORY ur_description DESTINATION share/${PROJECT_NAME})
INSTALL(DIRECTORY romeo_description DESTINATION share/${PROJECT_NAME})
INSTALL(DIRECTORY hector_description DESTINATION share/${PROJECT_NAME})
INSTALL(DIRECTORY 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)
......@@ -7,9 +7,10 @@ from pinocchio.robot_wrapper import RobotWrapper
def getModelPath(subpath, printmsg=False):
base = '../../../share/example-robot-data'
for path in [dirname(dirname(dirname(dirname(__file__)))),
dirname(dirname(dirname(__file__)))] + [join(p, base.strip('/')) for p in sys.path]:
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]:
if exists(join(path, subpath.strip('/'))):
if printmsg:
print("using %s as modelPath" % path)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment