refactor: unify usb camera launch configuration

This commit is contained in:
2026-07-23 15:36:21 +08:00
parent 51a3b3ff0b
commit 64d8ac6c44
7 changed files with 228 additions and 137 deletions

View File

@@ -18,11 +18,12 @@ Add `config/usb_camera.yaml` as the single source of runtime camera parameters:
- `io_method`: `mmap`
- `zero_copy`: `false`
- `frame_id`: `default_usb_cam`
- `camera_calibration_file_path`: the existing
`config/usb_camera_calibration.yaml`
The calibration data remains in `usb_camera_calibration.yaml`; it is not mixed
with ROS runtime parameters.
with ROS runtime parameters. The shared base launch resolves its installed path
and applies it to the camera node after loading the runtime YAML. Both launch
variants therefore receive the same calibration path without a source-tree
absolute path.
## Launch Structure
@@ -31,7 +32,9 @@ with ROS runtime parameters.
1. Declare one `camera_config` launch argument whose default is the installed
`config/usb_camera.yaml` path.
2. Start the shared-memory environment once.
3. Start one `hobot_usb_cam` node with the YAML file as its parameter source.
3. Resolve the installed `usb_camera_calibration.yaml` path.
4. Start one `hobot_usb_cam` node with the YAML file as its parameter source and
the resolved calibration resource path.
`hobot_usb_cam_websocket.launch.py` will: