diff --git a/vrx_urdf/wamv_description/hooks/resource_paths.dsv.in b/vrx_urdf/wamv_description/hooks/resource_paths.dsv.in index 18bfdc43d..d0cb7bbf6 100644 --- a/vrx_urdf/wamv_description/hooks/resource_paths.dsv.in +++ b/vrx_urdf/wamv_description/hooks/resource_paths.dsv.in @@ -1 +1,2 @@ +prepend-non-duplicate;GZ_SIM_RESOURCE_PATH;@CMAKE_INSTALL_PREFIX@/share/ prepend-non-duplicate;GZ_SIM_RESOURCE_PATH;@CMAKE_INSTALL_PREFIX@/share/@PROJECT_NAME@/models diff --git a/vrx_urdf/wamv_description/hooks/resource_paths.sh b/vrx_urdf/wamv_description/hooks/resource_paths.sh index 13efdad48..e9a2368da 100644 --- a/vrx_urdf/wamv_description/hooks/resource_paths.sh +++ b/vrx_urdf/wamv_description/hooks/resource_paths.sh @@ -1 +1,2 @@ +ament_prepend_unique_value GZ_SIM_RESOURCE_PATH "$AMENT_CURRENT_PREFIX/share" ament_prepend_unique_value GZ_SIM_RESOURCE_PATH "$AMENT_CURRENT_PREFIX/share/wamv_description/models" diff --git a/vrx_urdf/wamv_gazebo/CMakeLists.txt b/vrx_urdf/wamv_gazebo/CMakeLists.txt index af296c7b8..ac8176496 100644 --- a/vrx_urdf/wamv_gazebo/CMakeLists.txt +++ b/vrx_urdf/wamv_gazebo/CMakeLists.txt @@ -5,6 +5,10 @@ find_package(ament_cmake REQUIRED) find_package(xacro REQUIRED) find_package(wamv_description REQUIRED) +# Hooks +ament_environment_hooks("hooks/resource_paths.dsv.in") +ament_environment_hooks("hooks/resource_paths.sh") + # Generate urdf files from xacro and install # xacro_add_files( # urdf/wamv_gazebo.urdf.xacro diff --git a/vrx_urdf/wamv_gazebo/hooks/resource_paths.dsv.in b/vrx_urdf/wamv_gazebo/hooks/resource_paths.dsv.in new file mode 100644 index 000000000..d0cb7bbf6 --- /dev/null +++ b/vrx_urdf/wamv_gazebo/hooks/resource_paths.dsv.in @@ -0,0 +1,2 @@ +prepend-non-duplicate;GZ_SIM_RESOURCE_PATH;@CMAKE_INSTALL_PREFIX@/share/ +prepend-non-duplicate;GZ_SIM_RESOURCE_PATH;@CMAKE_INSTALL_PREFIX@/share/@PROJECT_NAME@/models diff --git a/vrx_urdf/wamv_gazebo/hooks/resource_paths.sh b/vrx_urdf/wamv_gazebo/hooks/resource_paths.sh new file mode 100644 index 000000000..64b1b7455 --- /dev/null +++ b/vrx_urdf/wamv_gazebo/hooks/resource_paths.sh @@ -0,0 +1,2 @@ +ament_prepend_unique_value GZ_SIM_RESOURCE_PATH "$AMENT_CURRENT_PREFIX/share" +ament_prepend_unique_value GZ_SIM_RESOURCE_PATH "$AMENT_CURRENT_PREFIX/share/wamv_gazebo/models"