Skip to content

fix: quote POSIX world paths at launch entry points - #20

Merged
woensug-choi merged 1 commit into
IOES-Lab:mainfrom
yeseorizi:fix/quote-world-paths-posix
Oct 10, 2026
Merged

woensug-choi merged 1 commit into
IOES-Lab:mainfrom
yeseorizi:fix/quote-world-paths-posix

Conversation

@yeseorizi

Copy link
Copy Markdown
Collaborator

Problem

The world and robot launch entry points pass an unquoted world filename through gz_args to the shell-based Gazebo launcher. An installed package share containing spaces (for example, a native macOS application data directory) is consequently split into multiple arguments, and the selected world cannot load.

Change

  • Quote the resolved world filename on POSIX in both posim_world.launch.py and posim_robot.launch.py.
  • Preserve existing launch flags, the empty.sdf case, and Windows command construction.
  • Add 20 regression cases and register them with ament_cmake_pytest.

Validation

  • New tests against the original files: 12 failed / 8 passed; with the fix: 20 passed on both macOS ARM64 and Linux ARM64 Docker (ROS 2 Lyrical).
  • Tests execute the generated arguments through /bin/sh and compare the received filename, including spaces, apostrophes, Unicode, and shell metacharacters. They also check Windows command construction and empty-world flags.
  • Native colcon build / colcon test for posim_demos only pass; changed-file pre-commit hooks pass.
  • The earlier combined executable/world-path integration matrix passed 14/14 actual headless Gazebo launch/exit cases per environment on macOS ARM64 and Linux ARM64 Docker. It used the latest launch-file snapshots with installed engines, not a fresh full-repository build. The robot entry point was checked for Gazebo argument generation, not full robot spawning.
python3 -m pytest -q examples/posim_demos/test/test_world_paths.py

Related boundary: quoting the gz executable itself is handled by ros_gz #980; this PR fixes the separate world filename argument. If both paths contain spaces, both fixes are needed.

Not claimed: Windows execution or fixes, Linux AMD64 validation, or a complete packaged-app/robot-demo acceptance test.

  • Focused change on a fork
  • Regression tests and local package build/test
  • Changed-file pre-commit checks
  • Remote CI (to be checked after submission)

AI assistance: OpenAI Codex was used to prepare the patch, tests, and this description; the checks above were executed locally.

Generated-by: OpenAI Codex
Signed-off-by: yeseorizi <172019512+yeseorizi@users.noreply.github.com>
@woensug-choi
woensug-choi merged commit 487c922 into IOES-Lab:main Oct 10, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants