From d5831504124d0dcbb3f8d2dada336ebe2b44abfb Mon Sep 17 00:00:00 2001 From: Vincent Belpois Date: Thu, 11 Jan 2024 15:49:59 +0100 Subject: [PATCH] Added world folder to the install path the launch file for the simulation can now be launched from anywhere --- src/ezbot_descr_simul/launch/launch_sim.launch.py | 3 ++- src/ezbot_gazebo/CMakeLists.txt | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ezbot_descr_simul/launch/launch_sim.launch.py b/src/ezbot_descr_simul/launch/launch_sim.launch.py index efbd6d7..576fc42 100644 --- a/src/ezbot_descr_simul/launch/launch_sim.launch.py +++ b/src/ezbot_descr_simul/launch/launch_sim.launch.py @@ -55,7 +55,8 @@ def generate_launch_description(): return LaunchDescription([ DeclareLaunchArgument( 'world', - default_value=[os.path.join('ezbot_gazebo','worlds','table2024.world'), ''], + #default_value=[os.path.join('ezbot_gazebo','worlds','table2024.world'), ''], + default_value=[os.path.join(get_package_share_directory("ezbot_gazebo"), 'worlds', 'table2024.world'), ''], description='SDF world file'), rsp, gazebo, diff --git a/src/ezbot_gazebo/CMakeLists.txt b/src/ezbot_gazebo/CMakeLists.txt index 0fd26df..12fa135 100644 --- a/src/ezbot_gazebo/CMakeLists.txt +++ b/src/ezbot_gazebo/CMakeLists.txt @@ -23,4 +23,9 @@ if(BUILD_TESTING) ament_lint_auto_find_test_dependencies() endif() +# add worlds as files to install +install(DIRECTORY worlds/ + DESTINATION share/${PROJECT_NAME}/worlds/ +) + ament_package()