From 76352be770c9c9f47ed13b7fdd07fd3099b8ae69 Mon Sep 17 00:00:00 2001 From: frederik Date: Thu, 7 Dec 2023 16:30:20 +0100 Subject: [PATCH] filter resource path for world sdf Signed-off-by: frederik --- ROMFS/px4fmu_common/init.d-posix/px4-rc.simulator | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ROMFS/px4fmu_common/init.d-posix/px4-rc.simulator b/ROMFS/px4fmu_common/init.d-posix/px4-rc.simulator index f5776001474d..ff63b4ee88ef 100644 --- a/ROMFS/px4fmu_common/init.d-posix/px4-rc.simulator +++ b/ROMFS/px4fmu_common/init.d-posix/px4-rc.simulator @@ -71,12 +71,12 @@ elif [ "$PX4_SIMULATOR" = "gz" ] || [ "$(param show -q SIM_GZ_EN)" = "1" ]; then # shellcheck disable=SC2153 echo "INFO [init] PX4_GZ_WORLD: ${PX4_GZ_WORLD}" - echo "INFO [init] GZ_SIM_RESOURCE_PATH: ${GZ_SIM_RESOURCE_PATH}" if [ -z "${gz_world}" ] && [ -n "${GZ_SIM_RESOURCE_PATH}" ] && [ -n "${PX4_GZ_WORLD}" ]; then - echo "INFO [init] starting gazebo with world: ${GZ_SIM_RESOURCE_PATH}/worlds/${PX4_GZ_WORLD}.sdf" + echo "INFO INFO INFO ${GZ_SIM_RESOURCE_PATH%/models}" + echo "INFO [init] starting gazebo with world: ${GZ_SIM_RESOURCE_PATH%/models}/worlds/${PX4_GZ_WORLD}.sdf" - ${gz_command} ${gz_sub_command} --verbose=1 -r -s "${GZ_SIM_RESOURCE_PATH}/worlds/${PX4_GZ_WORLD}.sdf" & + ${gz_command} ${gz_sub_command} --verbose=1 -r -s "${GZ_SIM_RESOURCE_PATH%/models}/worlds/${PX4_GZ_WORLD}.sdf" & if [ -z "${HEADLESS}" ]; then # HEADLESS not set, starting gui