robotics-testing

Write unit, integration, simulation, and hardware-in-the-loop tests for ROS robotics systems.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pytest, hypothesis, numpy, rclpy, launch_testing, mujoco.

What problem does it solve? Robotics software is hard to test because it depends on hardware, real-time message passing, and non-deterministic physics. This Skill provides concrete patterns for testing ROS1/ROS2 nodes, perception pipelines, planners, and controllers at every level of the testing pyramid, from fast unit tests to full simulation and hardware-in-the-loop validation. ## Core Features & Use Cases - ROS2 Node Testing with pytest: Fixtures for node lifecycle, parameter validation, and message-passing verification without flaky sleep-based waits. - Property-Based and Golden-File Testing: Use Hypothesis to verify kinematics and trajectory invariants, and golden-file comparisons to catch planner regressions. - Mock Hardware and Simulation Harnesses: Deterministic mock cameras, joint state publishers, and seeded MuJoCo simulation tests for CI/CD pipelines. - Use Case: You are building a ROS2 perception node and need CI coverage. Use this Skill to write pytest fixtures that feed synthetic images into the node, verify detection output, mock the camera for offline runs, and wire everything into a GitHub Actions workflow with colcon test and launch_testing. ## Quick Start Ask the AI to write a pytest test suite for your ROS2 node that mocks the camera input and verifies the node publishes detections within a timeout.

Frequently Asked Questions about robotics-testing

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

FAQPage Schema
How do I test a ROS2 node with pytest?

Initialize rclpy once per module with a fixture, create the node in a per-test fixture, then invoke callbacks directly with synthetic messages and spin briefly to verify published output. Avoid time.sleep; use event-driven waits with timeouts instead.

How to write integration tests for multiple ROS2 nodes?

Use launch_testing to start the nodes under a LaunchDescription with use_sim_time enabled, then publish test inputs and subscribe to expected outputs from a test node. Assert that messages arrive within a bounded spin loop rather than fixed sleeps.

What is property-based testing for robotics kinematics?

Property-based testing with Hypothesis generates random inputs and checks mathematical invariants, such as FK/IK roundtrips, unit quaternion preservation, and monotonic trajectory interpolation. It catches edge cases that hand-picked test vectors miss.

Can I run robotics tests in CI without real hardware?

Yes. Mock cameras and joint state publishers provide deterministic synthetic inputs, and simulation harnesses with fixed random seeds replace physical robots. A GitHub Actions workflow can run colcon test, launch_test, and simulation tests in ROS containers.

Why are my ROS tests flaky and how do I fix them?

Flakiness usually comes from time.sleep waits, unfixed random seeds, and dependence on message timing. Replace sleeps with threading.Event waits with timeouts, seed all randomness, and use deterministic mock data instead of live sensors.

What is golden-file testing for trajectory planners?

Golden-file testing saves a known-good planner output as a reference file and compares future runs against it with a tolerance. Any deviation signals a regression in planner behavior, while the first run bootstraps the reference file.