https://github.com/ar-ray-code/picamera_ros2
PiCamera wrapper using libcamera (RasPi-CSI2)
https://github.com/ar-ray-code/picamera_ros2
raspberry-pi ros2
Last synced: 5 months ago
JSON representation
PiCamera wrapper using libcamera (RasPi-CSI2)
- Host: GitHub
- URL: https://github.com/ar-ray-code/picamera_ros2
- Owner: Ar-Ray-code
- License: bsd-2-clause
- Created: 2022-05-21T08:04:59.000Z (almost 3 years ago)
- Default Branch: ros2
- Last Pushed: 2024-07-21T07:09:10.000Z (10 months ago)
- Last Synced: 2024-07-21T08:25:42.859Z (10 months ago)
- Topics: raspberry-pi, ros2
- Language: C++
- Homepage:
- Size: 94.7 KB
- Stars: 15
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# picamera_ros2
PiCamera wrapper using libcamera (RasPi-CSI2)
## Depends (Development environment)
- Raspberry Pi Bookworm (64bit)
- [libcamera-dev 0.1.0](https://github.com/raspberrypi/libcamera) `sudo apt install libcamera-dev`
- [ROS2-Iron](https://github.com/Ar-Ray-code/rpi-bullseye-ros2)
- OpenCV4
- libboost```bash
sudo apt install build-essential cmake git libcamera-dev libopencv-dev libdrm-dev libboost-dev libboost-program-options-dev
```### building libcamera
[URL](https://www.raspberrypi.com/documentation/accessories/camera.html#building-libcamera)
## Usage
```bash
source /opt/ros/galactic/setup.bash
git clone https://github.com/Ar-Ray-code/picamera_ros2.git ~/ros2_ws/src
cd ~/ros2_ws
colcon build --symlink-install
```
## Topic
### Publish
- image_raw (sensor_msgs/msg/Image)
## Parameter
- video_width: width of publishing image (Default: 1280)
- video_height height of publishing image (Default: 720)
- framerate: publishing rate (Default: 30)> Note: The actual frame rate may be lower than the set frame rate.
## Context (by kbarni)
In Raspbian Bullseye, the Raspberry Pi camera framework was completely rebased from MMAL to the libcamera library - thus breaking most of the previous camera dependencies.
Raspbian comes with the handy libcamera-apps package that duplicates the old raspistill and raspivid applications, with some added functionnality, like the possibility of adding postprocessing routines to the capturing process.
However this is still limited, as it doesn't allow full integration of the camera in your software.
LCCV aims to provide a simple to use wrapper library that allows you to access the camera from a C++ program and capture images in cv::Mat format.
## License
BSD 2-Clause License (Raspberry Pi)
## Reference
- [LCCV](https://github.com/kbarni/LCCV) by kbarni
- [libcamera-apps](https://github.com/raspberrypi/libcamera-apps) by raspberrypi