robotics-testinglisted
Install: claude install-skill vicky23383/robotics-agent-skills
# Robotics Testing Skill
## When to Use This Skill
- Writing unit tests for ROS1/ROS2 nodes
- Setting up integration tests with launch_testing
- Mocking hardware (sensors, actuators) for CI/CD
- Building simulation-based test suites
- Testing perception pipelines with ground truth
- Validating trajectory planners and controllers
- Setting up CI/CD pipelines for robotics packages
- Debugging flaky tests in robotics systems
## The Robotics Testing Pyramid
```
╱╲
╱ ╲ Field Tests
╱ ╲ (Real robot, real environment)
╱──────╲
╱ ╲ Hardware-in-the-Loop (HIL)
╱ ╲ (Real hardware, controlled environment)
╱────────────╲
╱ ╲ Simulation Tests
╱ ╲ (Full sim, realistic physics)
╱──────────────────╲
╱ ╲ Integration Tests
╱ ╲ (Multi-node, message passing)
╱────────────────────────╲
╱ ╲ Unit Tests
╱____________________________╲ (Single function/class, fast, deterministic)
MORE tests at the bottom, FEWER at the top.
Bottom = fast, cheap, deterministic. Top = slow, expensive, realistic.
```
## Unit Testing Patterns
### Testing ROS2 Nodes with pytest
```python
# test_perception_node.py
import pytest
import rclpy
from rclpy.node import Node
from sensor_msgs.msg impor