Go2Py/docker/Dockerfile.realsense

36 lines
1.6 KiB
Docker
Raw Normal View History

2024-05-05 02:03:03 +08:00
# 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
FROM ${BASE_IMAGE}
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
RUN chmod +x /opt/realsense/build-librealsense.sh && /opt/realsense/build-librealsense.sh
# Copy hotplug script which will get invoked whenever a devices plugged or un-plugged
RUN mkdir -p /opt/realsense/
COPY scripts/hotplug-realsense.sh /opt/realsense/hotplug-realsense.sh
# Copy custom udev rules file
COPY udev_rules/99-realsense-libusb-custom.rules /etc/udev/rules.d/99-realsense-libusb-custom.rules
# Clone and compile the realsense ros
RUN mkdir -p /home/realsenes-ws/src && cd /home/realsenes-ws/src && \
git clone https://github.com/IntelRealSense/realsense-ros.git && \
cd .. && \
source /opt/ros/humble/setup.bash && \
colcon build --symlink-install
# add the source to the bashrc
RUN echo "source /home/realsenes-ws/install/setup.bash" >> /root/.bashrc