-
Notifications
You must be signed in to change notification settings - Fork 145
/
Dockerfile.realsense
44 lines (38 loc) · 2.31 KB
/
Dockerfile.realsense
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.
# Dockerfile for setting up Realsense driver
# https://github.com/jetsonhacks/installRealSenseSDK
ARG BASE_IMAGE=ubuntu:22.04
FROM ${BASE_IMAGE}
ARG LIBREALSENSE_SOURCE_VERSION=v2.55.1
ARG REALSENSE_ROS_GIT_URL=https://github.com/NVIDIA-ISAAC-ROS/realsense-ros.git
ARG REALSENSE_ROS_VERSION=release/4.51.1-isaac
COPY scripts/build-librealsense.sh /opt/realsense/build-librealsense.sh
COPY scripts/install-realsense-dependencies.sh /opt/realsense/install-realsense-dependencies.sh
RUN chmod +x /opt/realsense/install-realsense-dependencies.sh && \
/opt/realsense/install-realsense-dependencies.sh; \
chmod +x /opt/realsense/build-librealsense.sh && /opt/realsense/build-librealsense.sh -v ${LIBREALSENSE_SOURCE_VERSION};
# Copy hotplug script for udev rules/hotplug for RealSense
RUN mkdir -p /opt/realsense/
COPY scripts/hotplug-realsense.sh /opt/realsense/hotplug-realsense.sh
COPY udev_rules/99-realsense-libusb-custom.rules /etc/udev/rules.d/99-realsense-libusb-custom.rules
# Install realsense-ros ROS 2 package
RUN --mount=type=cache,target=/var/cache/apt \
mkdir -p ${ROS_ROOT}/src && cd ${ROS_ROOT}/src \
&& git clone ${REALSENSE_ROS_GIT_URL} -b ${REALSENSE_ROS_VERSION} \
&& cd realsense-ros && source ${ROS_ROOT}/setup.bash \
&& cd realsense2_camera_msgs && bloom-generate rosdebian && fakeroot debian/rules binary \
&& cd ../ && apt-get install -y ./*.deb && rm ./*.deb \
&& cd realsense2_description && bloom-generate rosdebian && fakeroot debian/rules binary \
&& cd ../ && apt-get install -y ./*.deb && rm ./*.deb \
&& cd realsense2_camera && bloom-generate rosdebian \
&& sed -i 's/dh_shlibdeps -/dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info -/g' debian/rules \
&& sed -i 's/ros-humble-librealsense2, //g' debian/control \
&& fakeroot debian/rules binary \
&& cd ../ && apt-get install -y ./*.deb && rm ./*.deb \
&& cd ../ && rm -Rf realsense-ros