diff --git a/Dockerfile b/Dockerfile index ef639d4..2d622c9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,8 @@ FROM ros:${ROS_DISTRO}-ros-core RUN apt update && apt install -y --no-install-recommends \ build-essential \ python3-colcon-common-extensions \ + libpcap0.8-dev \ + ros-humble-yaml-cpp-vendor \ && rm -rf /var/lib/apt/lists/* COPY ros_entrypoint.sh . @@ -17,5 +19,5 @@ COPY rslidar_msg src/rslidar_msg RUN . /opt/ros/${ROS_DISTRO}/setup.sh && colcon build --symlink-install --event-handlers console_direct+ RUN echo 'alias build="colcon build --symlink-install --event-handlers console_direct+"' >> ~/.bashrc -RUN echo 'source /opt/ros/humble/setup.bash; source /colcon_ws/install/setup.bash; echo UID: $UID; echo ROS_DOMAIN_ID: $ROS_DOMAIN_ID; ros2 launch ros_encoder ros_encoder.launch.py' >> /run.sh && chmod +x /run.sh +RUN echo 'source /opt/ros/humble/setup.bash; source /colcon_ws/install/setup.bash; echo UID: $UID; echo ROS_DOMAIN_ID: $ROS_DOMAIN_ID; ros2 run rslidar_sdk rslidar_sdk_node' >> /run.sh && chmod +x /run.sh RUN echo 'alias run="su - ros --whitelist-environment=\"ROS_DOMAIN_ID\" /run.sh"' >> /etc/bash.bashrc diff --git a/ros_entrypoint.sh b/ros_entrypoint.sh index 17f8205..b6e69bf 100755 --- a/ros_entrypoint.sh +++ b/ros_entrypoint.sh @@ -4,6 +4,6 @@ set -e id -u ros &>/dev/null || adduser --quiet --disabled-password --gecos '' --uid ${UID:=1000} ros source /opt/ros/${ROS_DISTRO}/setup.bash -source /colcon_ws/install/setup.bash +source /colcon_ws/install/setup.bash || true exec "$@" diff --git a/rslidar_sdk b/rslidar_sdk index d9dc998..621aea2 160000 --- a/rslidar_sdk +++ b/rslidar_sdk @@ -1 +1 @@ -Subproject commit d9dc998a92991a99c5609778691cf3cd47226113 +Subproject commit 621aea25df6e369b5a88e30e45978665d7e713c1