A ROS2 package for interfacing with the Arducam 12 MP UVC Module on Raspberry Pi 5.
- MJPEG camera streaming
- Configurable resolution and frame rate
- Camera calibration support
- Compressed image publishing
- Camera info publishing
- ROS2 (tested on Humble)
- OpenCV
- camera_info_manager
- camera_calibration_parsers
-
Clone this repository into your ROS2 workspace:
cd ~/ros2_ws/src git clone https://github.com/droneblocks/dexi_camera.git
-
Install dependencies:
sudo apt-get install ros-humble-camera-info-manager ros-humble-camera-calibration-parsers
-
Build the package:
cd ~/ros2_ws colcon build --packages-select dexi_camera source install/setup.bash
Launch the camera node with default parameters:
ros2 launch dexi_camera camera.launch.pyYou can override default parameters when launching:
ros2 launch dexi_camera camera.launch.py --ros-args -p camera_id:=1 -p camera_width:=1920 -p camera_height:=1080Available parameters:
camera_id: Camera device ID (default: 0)camera_width: Image width (default: 1280)camera_height: Image height (default: 720)jpeg_quality: JPEG compression quality (default: 80)timer_interval: Frame interval in seconds (default: 1/30)camera_name: Camera name for topics (default: "camera")camera_info_url: Path to camera calibration file
The node publishes the following topics:
/<camera_name>/image_raw/compressed: Compressed image data/<camera_name>/camera_info: Camera calibration information
The package includes a default calibration file in config/camera_calibration.yaml. This is a template with reasonable default values, but for best results, you should calibrate your camera.
-
Print a chessboard pattern (8x6 or similar)
-
Launch the camera node:
ros2 launch dexi_camera camera.launch.py
-
Run the calibration tool:
ros2 run camera_calibration cameracalibrator --size 8x6 --square 0.024 image:=/camera/image_raw
(Adjust the chessboard size and square size to match your calibration target)
-
Move the chessboard around in front of the camera to collect calibration data
-
When enough data is collected, click "Calibrate" in the calibration window
-
Save the calibration file and copy it to
config/camera_calibration.yaml
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Dennis Baldwin (db@droneblocks.io)