From 8b46f61fb94ba179752256bbebd1f0ad742d8222 Mon Sep 17 00:00:00 2001 From: Anton Tetov Date: Mon, 10 Jun 2024 18:03:04 +0200 Subject: [PATCH] tweaks to build --- Dockerfile | 8 ++++++-- dependencies.repos | 10 +++++----- package.xml | 2 +- bashrc_fragment.sh => ros_catkin_entrypoint.sh | 8 ++++++-- 4 files changed, 18 insertions(+), 10 deletions(-) rename bashrc_fragment.sh => ros_catkin_entrypoint.sh (70%) diff --git a/Dockerfile b/Dockerfile index 29664d2..521608a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,8 +25,12 @@ RUN rosdep install -y --from-paths . --ignore-src --rosdistro ${ROS_DISTRO} RUN . /opt/ros/${ROS_DISTRO}/setup.bash && catkin build +COPY ros_catkin_entrypoint.sh /usr/local/bin/ros_catkin_entrypoint.sh + +RUN chmod +x /usr/local/bin/ros_catkin_entrypoint.sh + +# Always source ros_catkin_entrypoint.sh when launching bash (e.g. when attaching to container) RUN echo "source /usr/local/bin/ros_catkin_entrypoint.sh" >> /root/.bashrc -RUN echo 'source $CATKIN_WS/src/biodigitalmatter_ros/bashrc_fragment' >> /root/.bashrc -ENTRYPOINT ["roslaunch" "biodigitalmatter_ros" "bringup.lauch"] +ENTRYPOINT ["/usr/local/bin/ros_catkin_entrypoint.sh"] CMD ["bash"] diff --git a/dependencies.repos b/dependencies.repos index ec66972..73f1f15 100644 --- a/dependencies.repos +++ b/dependencies.repos @@ -1,6 +1,10 @@ # -*- mode: yaml -*- --- repositories: + abb: + type: git + url: https://github.com/ros-industrial/abb.git + version: kinetic-devel abb_irb4600_40_255: type: git url: https://github.com/gramaziokohler/abb_irb4600_40_255.git @@ -13,14 +17,10 @@ repositories: type: git url: https://github.com/compas-rrc/compas_rrc_ros.git version: v1.1.3 - ros_file_server: + file_server: type: git url: https://github.com/gramaziokohler/ros_file_server.git version: master - abb: - type: git - url: https://github.com/ros-industrial/abb.git - version: kinetic-devel axis_camera: # need newer than what's in rosdep type: git url: https://github.com/ros-drivers/axis_camera.git diff --git a/package.xml b/package.xml index ce8cf4d..2df201a 100644 --- a/package.xml +++ b/package.xml @@ -18,7 +18,7 @@ compas_rrc_driver abb_irb4600_40_255_moveit_config file_server - depthai-ros + depthai realsense2_camera rgbd_launch axis_camera diff --git a/bashrc_fragment.sh b/ros_catkin_entrypoint.sh similarity index 70% rename from bashrc_fragment.sh rename to ros_catkin_entrypoint.sh index 956ca53..85bdd72 100644 --- a/bashrc_fragment.sh +++ b/ros_catkin_entrypoint.sh @@ -1,6 +1,8 @@ -source /opt/ros/noetic/setup.bash +#!/bin/bash -export CATKIN_WS=~/catkin_ws +source "/opt/ros/$ROS_DISTRO/setup.bash" + +export CATKIN_WS=${CATKIN_WS:-$HOME/catkin_ws} if [ -f $CATKIN_WS/devel/setup.bash ] ; then source $CATKIN_WS/devel/setup.bash @@ -13,3 +15,5 @@ if [ -f $CATKIN_WS/src/biodigitalmatter_ros/.env ] ; then fi mkdir -p ~/rosbags + +exec "$@"