Skip to content

Commit

Permalink
filter resource path for world sdf
Browse files Browse the repository at this point in the history
Signed-off-by: frederik <[email protected]>
  • Loading branch information
frede791 committed Dec 7, 2023
1 parent 5631859 commit 76352be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ROMFS/px4fmu_common/init.d-posix/px4-rc.simulator
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 76352be

Please sign in to comment.