simulation-testing

Write launch_testing integration tests for ROS 2 navigation in headless Gazebo simulation.

Updated Aug 16, 2026
One-click install
npx skills add https://github.com/three1324/yeonjinautomotive --skill simulation-testing-three1324
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: simulation-testing
Source: https://github.com/three1324/yeonjinautomotive/tree/main/.claude/skills/simulation-testing
Command: npx skills add https://github.com/three1324/yeonjinautomotive --skill simulation-testing-three1324

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Testing robot navigation on real hardware is slow, non-repeatable, and risky. This Skill provides a complete pattern for writing automated integration tests that launch Gazebo simulation, Nav2, and ROS 2 nodes together, then assert navigation outcomes programmatically. ## Core Features & Use Cases - launch_testing Integration Tests: Complete pytest/unittest template that launches Gazebo headless, the ros_gz bridge, and Nav2, then sends NavigateToPose action goals and asserts success status. - CI Pipeline Configuration: Ready-to-adapt GitHub Actions workflow with software rendering (Mesa) for GPU-less runners, plus colcon test invocation and result reporting. - Robustness Patterns: Covers waiting for /clock, AMCL initial pose convergence, rosbag recording during tests, deterministic seeds, and common CI failure modes like zombie Gazebo processes. - Use Case: A robotics team wants every pull request to verify that their robot can still navigate to a goal in simulation. Use this Skill to scaffold the test file, CMakeLists/package.xml test dependencies, and CI job. ## Quick Start Write a launch_testing integration test that starts Gazebo headless with Nav2 and asserts the robot reaches a NavigateToPose goal.

Frequently Asked Questions about simulation-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write integration tests for ROS 2 navigation?

Use the launch_testing framework with a pytest-marked generate_test_description function that launches Gazebo, the ros_gz bridge, and Nav2. Then create an ActionClient for NavigateToPose, send goals, and assert the result status equals GoalStatus.STATUS_SUCCEEDED.

How to run Gazebo headless in CI without a GPU?

Launch Gazebo with 'gz sim -r -s --headless-rendering world.sdf' and set MESA_GL_VERSION_OVERRIDE=3.3 and LIBGL_ALWAYS_SOFTWARE=1. Without --headless-rendering, GPU-based sensors like cameras and gpu_lidar produce no data.

Why does my launch_testing navigation test fail or time out?

Common causes are sending goals before Gazebo publishes /clock, not waiting for AMCL to converge after setting the initial pose, and timeouts too short for slow CI machines. Wait for /clock first, sleep 5+ seconds after initialpose, and use 60-second timeouts.

Can I record rosbag data during a simulation test?

Yes. Start 'ros2 bag record' via subprocess.Popen with topics like /scan, /odom, /cmd_vel, /tf, and --use-sim-time at test start, then terminate the process after the test completes to save the recording.

How do I make Gazebo simulation tests deterministic?

Set a fixed seed in the Gazebo SDF physics plugin, use pause-step mode to control simulation progression, avoid time-dependent assertions in favor of goal status checks, and pin Gazebo and ROS 2 versions in the CI container.