diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..eb32425 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,30 @@ +FROM gramaziokohler/ros-noetic-base:latest + +LABEL maintainer "Anton Tetov " + +# Create local catkin workspace +ENV CATKIN_WS=/root/catkin_ws +RUN mkdir -p $CATKIN_WS/src +WORKDIR $CATKIN_WS + +# copy repo to src +COPY . ./src/biodigitalmatter_ros + +RUN source /opt/ros/${ROS_DISTRO}/setup.bash \ + && apt-get update \ + && rosdep update + +RUN apt-get install python3-vcstool python3-catkin-tools -y + +RUN vcs import src < src/biodigitalmatter_ros/dependencies.repos \ + && vcs import src < src/abb_robot_driver/pkgs.repos + +RUN rosdep install -y --from-paths . --ignore-src --rosdistro ${ROS_DISTRO} + +RUN /opt/ros/${ROS_DISTRO}/bin/catkin_make + +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"] +CMD ["bash"] \ No newline at end of file diff --git a/README.md b/README.md index 110308c..0b0b959 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ ROS Noetic installation on Ubuntu 20.04 assumed. ```sh +grep -qxF 'source ~/catkin_ws/src/biodigitalmatter_ros/bashrc_fragment.sh' ~/.bashrc || echo 'source ~/catkin_ws/src/biodigitalmatter_ros/bashrc_fragment.sh' >> ~/.bashrc sudo apt install python3-vcstool python3-catkin-tools mkdir -p ~/catkin_ws/src cd ~/catkin_ws/src @@ -16,3 +17,5 @@ rosdep update rosdep install --from-paths src --ignore-src -y catkin build ``` + +Create an .env file based on .env.example adding the passwords needed. \ No newline at end of file diff --git a/bashrc_fragment.sh b/bashrc_fragment.sh new file mode 100644 index 0000000..d423cab --- /dev/null +++ b/bashrc_fragment.sh @@ -0,0 +1,15 @@ +source /opt/ros/noetic/setup.bash + +export CATKIN_WS=~/catkin_ws + +if [ -f $CATKIN_WS/devel/setup.bash ] ; then + source $CATKIN_WS/devel/setup.bash +fi + +if [ -f $CATKIN_WS/src/biodigitalmatter_ros/.env ] ; then + set -a # automatically export all vars + source $CATKIN_WS/src/biodigitalmatter_ros/.env + set +a +fi + +mkdir -p ~/rosbags \ No newline at end of file diff --git a/dependencies.repos b/dependencies.repos index 6c57968..f20985d 100644 --- a/dependencies.repos +++ b/dependencies.repos @@ -13,19 +13,23 @@ repositories: type: git url: https://github.com/compas-rrc/compas_rrc_ros.git version: v1.1.3 - file_server: + ros_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/ + 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 + url: https://github.com/ros-drivers/axis_camera.git version: noetic-devel camera_info_manager_py: # upstream has no noetic release, axis dep type: git - url: https://github.com/lucasw/camera_info_manager_py + url: https://github.com/lucasw/camera_info_manager_py.git version: noetic-devel + abb_robot_driver: + type: git + url: https://github.com/ros-industrial/abb_robot_driver.git + version: master \ No newline at end of file diff --git a/package.xml b/package.xml index 2df201a..ce8cf4d 100644 --- a/package.xml +++ b/package.xml @@ -18,7 +18,7 @@ compas_rrc_driver abb_irb4600_40_255_moveit_config file_server - depthai + depthai-ros realsense2_camera rgbd_launch axis_camera