Conversation
|
Caution Review failedThe pull request is closed. WalkthroughAdds a new Python ROS package for LiDAR–camera calibration: math utilities for transform/quaternion ops, a ROS node with sensor callbacks, config parsers, unit tests, packaging/linting and CI workflow tweak, plus a comprehensive .gitignore. Changes
Sequence DiagramsequenceDiagram
participant ROS as ROS Master
participant Node as LidarCameraCalibrationNode
participant Math as calibration_math
ROS->>Node: publish Image
Node->>Node: convert Image -> CV2
Node->>Node: detect ArUco markers
Node-->>ROS: log / (marker IDs)
ROS->>Node: publish PointCloud2
Node->>Node: convert -> XYZ points
Node->>Node: apply spatial & intensity filters
Node-->>ROS: log (filtered count)
ROS->>Node: publish CameraInfo
Node-->>ROS: log (intrinsics)
Node->>Node: perform_calibration(camera_pts, lidar_pts)
rect rgb(230,245,255)
Node->>Math: estimate_transform(camera_pts, lidar_pts)
Math->>Math: center points, cross-covariance, SVD
Math-->>Node: (R_est, t_est)
end
Node-->>ROS: log (R_est, t_est)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 8
🧹 Nitpick comments (2)
.gitignore (1)
29-31: Clarify intent for ignored directories.
If the goal is to ignore thewandbandmodal_scriptsdirectories, prefer adding trailing slashes (wandb/,modal_scripts/) so we don’t accidentally exclude files that legitimately belong in the repo (e.g.,modal_scripts.py).lidar_camera_calibration_py/pyproject.toml (1)
11-16: Movepytestto test extras instead of runtime deps.
pytestis only needed for running the test suite; shipping it as a required runtime dependency bloats installations and complicates downstream packaging. Please move it into an optional/test extras group.dependencies = [ - "pytest", "opencv-python", "numpy", "scipy", ] + +[project.optional-dependencies] +test = [ + "pytest", +]
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (12)
.gitignore(1 hunks)lidar_camera_calibration_py/README.md(1 hunks)lidar_camera_calibration_py/package.xml(1 hunks)lidar_camera_calibration_py/pyproject.toml(1 hunks)lidar_camera_calibration_py/ruff.toml(1 hunks)lidar_camera_calibration_py/src/calibration_math.py(1 hunks)lidar_camera_calibration_py/src/calibration_node.py(1 hunks)lidar_camera_calibration_py/src/config_utils.py(1 hunks)lidar_camera_calibration_py/src/main.py(1 hunks)lidar_camera_calibration_py/tests/test_calibration_math.py(1 hunks)lidar_camera_calibration_py/tests/test_calibration_node.py(1 hunks)lidar_camera_calibration_py/tests/test_config_utils.py(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (4)
lidar_camera_calibration_py/tests/test_config_utils.py (1)
lidar_camera_calibration_py/src/config_utils.py (2)
parse_config_file(4-30)parse_marker_coordinates(32-55)
lidar_camera_calibration_py/src/calibration_node.py (2)
lidar_camera_calibration_py/src/config_utils.py (2)
parse_config_file(4-30)parse_marker_coordinates(32-55)lidar_camera_calibration_py/src/calibration_math.py (1)
estimate_transform(6-33)
lidar_camera_calibration_py/tests/test_calibration_node.py (1)
lidar_camera_calibration_py/src/calibration_node.py (4)
LidarCameraCalibrationNode(11-92)image_callback(28-45)lidar_callback(47-62)camera_info_callback(64-72)
lidar_camera_calibration_py/tests/test_calibration_math.py (1)
lidar_camera_calibration_py/src/calibration_math.py (2)
estimate_transform(6-33)average_quaternions(35-49)
🪛 LanguageTool
lidar_camera_calibration_py/README.md
[grammar] ~1-~1: There might be a mistake here.
Context: ...hon3 version of LiDAR-Camera Calibration # This package will contain the Python imp...
(QB_NEW_EN)
🪛 Ruff (0.14.0)
lidar_camera_calibration_py/tests/test_config_utils.py
46-46: Do not assert blind exception: Exception
(B017)
lidar_camera_calibration_py/src/calibration_math.py
27-27: Unpacked variable S is never used
Prefix it with an underscore or any other dummy variable pattern
(RUF059)
lidar_camera_calibration_py/src/config_utils.py
14-14: Unnecessary mode argument
Remove mode argument
(UP015)
41-41: Undefined name List
(F821)
42-42: Unnecessary mode argument
Remove mode argument
(UP015)
Summary by CodeRabbit
New Features
Tests
Documentation
Chores