Skip to content

Commit edac77d

Browse files
libcamera install & build instructions
1 parent 906abe3 commit edac77d

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,18 @@ sudo dnf install ros-$ROS_DISTRO-camera-ros
2121

2222
## Build Instructions
2323

24-
### libcamera dependency
24+
### libcamera
2525

26-
The `camera_ros` node depends on libcamera version 0.1 or later.
26+
The `camera_ros` node depends on libcamera version 0.1 or later. There are different ways to install this dependency:
2727

28-
Some Linux and ROS distributions provide binary libcamera packages. Check your package manager for `libcamera` and `rosdep resolve libcamera` to see if binary packages are available.
28+
- __System Package:__ Most Linux distributions provide a binary libcamera package. However, the Raspberry Pi OS uses a [custom libcamera fork](https://github.com/raspberrypi/libcamera) with additional support for newer camera modules. When using the distribution packages, you have to skip the `libcamera` rosdep key when resolving dependencies (`rosdep install [...] --skip-keys=libcamera`).
29+
30+
- __ROS Package:__ You can also install a newer version from the ROS repo (package `ros-$ROS_DISTRO-libcamera`). This package will be installed by default when building `camera_ros` from source and resolving the rosdep keys.
31+
32+
- __Source:__ Finally, you can always build libcamera from source. This is currently the only option for using the "raspberrypi" fork on Ubuntu. You can build libcamera as part of the ROS workspace using `colcon-meson`. This is recommended over a system-wide installation as it avoids conflicts with the system package. You will need to install the following dependencies:
33+
1. Install the libcamera build dependencies according to https://libcamera.org/getting-started.html#dependencies.
34+
2. Install `colcon-meson` via the package manager, `sudo apt install -y python3-colcon-meson`, or pip, `pip install colcon-meson`.
2935

30-
If your distribution does not provide a binary libcamera package, you have to compile libcamera from source either independent of the colcon workspace according to the [official build instructions](https://libcamera.org/getting-started.html) or as part of the colcon workspace. Either way, you have to install libcamera's build dependencies manually:
31-
```sh
32-
# DEB
33-
sudo apt install pkg-config python3-yaml python3-ply python3-jinja2 openssl libyaml-dev libssl-dev libudev-dev libatomic1 meson
34-
# RPM
35-
sudo dnf install pkgconfig python3-yaml python3-ply python3-jinja2 openssl libyaml-devel openssl-devel libudev-devel libatomic meson
36-
```
3736

3837
### build camera_ros
3938

0 commit comments

Comments
 (0)