Imported from YeonUk-Kim0120/Hand_Eye_Calibration (
AGENTS.md). Install upstream withnpx skills add YeonUk-Kim0120/Hand_Eye_Calibration. Copyright stays with the author.
Repository Guidelines
Project Structure & Module Organization
This is a ROS 2 ament_python workspace for ZED 2i/UR5e hand-eye calibration. The package is under src/hand_eye_calibration/; nodes live in hand_eye_calibration/, diagnostics in scripts/, and ROS metadata in package.xml, setup.py, and setup.cfg. Root Markdown files document workflows. Images, .npz samples, and calibration YAML files are data artifacts; build/, install/, and log/ are generated and must not be edited.
Change Control & Field-Proven Behavior
Treat the current behavior as field-validated and preserve it as the known-good baseline. Before editing any source code or configuration, tell the user which files will change, the exact intended behavior, why it is needed, its impact on the working environment, and how it will be tested and rolled back. Wait for explicit approval before applying edits. Never overwrite uncommitted user changes. Prefer a dedicated Git branch for experiments in another environment, while retaining a tagged or committed known-good revision.
Build, Test, and Development Commands
Run commands from the workspace root:
rosdep install --from-paths src --ignore-src -r -y # install ROS dependencies
colcon build --symlink-install # build for iterative Python work
source install/setup.bash # expose built ROS packages
ros2 run hand_eye_calibration detector # detect checkerboards
ros2 run hand_eye_calibration collector # collect samples and calibrate
ros2 run hand_eye_calibration verify # verify a saved calibration
colcon test --packages-select hand_eye_calibration # run package tests and linters
colcon test-result --verbose # inspect failures
Each terminal running a node must source install/setup.bash. Use mock_robot plus tf_to_pose when hardware is unavailable.
Coding Style & Naming Conventions
Use Python 3, four-space indentation, PEP 8 layout, and concise docstrings. Name modules, functions, parameters, and ROS topics with snake_case; use PascalCase for node classes. Keep console entry points in setup.py aligned with node main() functions. Run ament_flake8 and ament_pep257 before submitting. Preserve transform conventions: 4x4 NumPy homogeneous matrices, meters for translation, and ROS quaternion order (x, y, z, w).
Testing Guidelines
No automated suite is committed. Add src/hand_eye_calibration/test/test_*.py tests, using pytest for matrix logic and ROS 2 launch tests for interactions. Cover both calibration modes and invalid samples; default CI must not require hardware.
Commit & Pull Request Guidelines
History uses short Korean or English subjects (for example, verification node safety update). Keep commits brief, imperative, and focused on one behavior. Pull requests should describe the calibration mode affected, commands run, parameter or topic changes, and hardware/mock validation. Link relevant issues and attach screenshots only for visualization changes. Do not commit new generated build/, install/, log/, timestamped result YAML, or machine-specific paths.
