2024-05-10 03:46:52 +00:00
|
|
|
# Copyright (C) 2024 Bellande Robotics Sensors Research Innovation Center, Ronaldson Bellande
|
|
|
|
#
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
ARG ROS_ARCHITECTURE_VERSION=latest
|
|
|
|
|
2024-05-15 03:38:41 +00:00
|
|
|
FROM ronaldsonbellande/bellande_robotic_environment_ros1:latest
|
2024-05-22 01:57:01 +00:00
|
|
|
SHELL ["/bin/bash", "-c"]
|
2024-05-10 03:46:52 +00:00
|
|
|
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
ENV PYTHON_VERSION="3.8"
|
|
|
|
|
|
|
|
ARG ROS_ARCHITECTURE_VERSION_GIT_BRANCH=main
|
|
|
|
ARG ROS_ARCHITECTURE_VERSION_GIT_COMMIT=HEAD
|
|
|
|
|
2024-05-10 23:42:01 +00:00
|
|
|
ENV ROS_VERSION=noetic
|
2024-05-15 03:38:41 +00:00
|
|
|
ENV CATKIN_WS=/opt/ros/overlay_ws
|
2024-05-10 03:46:52 +00:00
|
|
|
|
|
|
|
LABEL maintainer=ronaldsonbellande@gmail.com
|
|
|
|
LABEL author=ronaldsonbellande@gmail.com
|
|
|
|
LABEL ROS_architecture_github_branchtag=${ROS_ARCHITECTURE_VERSION_GIT_BRANCH}
|
|
|
|
LABEL ROS_architecture_github_commit=${ROS_ARCHITECTURE_VERSION_GIT_COMMIT}
|
|
|
|
|
2024-05-22 01:57:01 +00:00
|
|
|
# Create local catkin workspace
|
2024-05-10 03:46:52 +00:00
|
|
|
RUN mkdir -p $CATKIN_WS/src
|
|
|
|
|
2024-05-22 01:57:01 +00:00
|
|
|
# Copy Every Package
|
|
|
|
COPY ../ ${CATKIN_WS}/src
|
2024-05-13 02:26:46 +00:00
|
|
|
|
2024-05-22 01:57:01 +00:00
|
|
|
# Set the working directory for Catkin
|
|
|
|
WORKDIR $CATKIN_WS
|
2024-05-13 02:26:46 +00:00
|
|
|
|
2024-05-22 01:57:01 +00:00
|
|
|
# Initialize and configure catkin workspace
|
|
|
|
RUN /bin/bash -c "source /opt/ros/$ROS_VERSION/setup.bash && \
|
|
|
|
cd $CATKIN_WS && \
|
|
|
|
catkin init && \
|
|
|
|
catkin config --extend /opt/ros/$ROS_VERSION && \
|
|
|
|
catkin config --cmake-args -DCATKIN_ENABLE_TESTING=0"
|
2024-05-10 03:46:52 +00:00
|
|
|
|
2024-05-22 01:57:01 +00:00
|
|
|
# Install dependencies using rosdep
|
|
|
|
RUN /bin/bash -c "source /opt/ros/$ROS_VERSION/setup.bash && \
|
|
|
|
cd $CATKIN_WS && \
|
|
|
|
rosdep update && \
|
|
|
|
rosdep install -y --from-paths . --ignore-src --rosdistro $ROS_VERSION"
|
2024-05-10 03:46:52 +00:00
|
|
|
|
2024-05-22 01:57:01 +00:00
|
|
|
# Always source catkin_setup.sh when launching bash
|
2024-05-10 06:41:17 +00:00
|
|
|
COPY ../scripts/catkin_setup.sh /usr/local/bin/catkin_setup.sh
|
2024-05-22 01:57:01 +00:00
|
|
|
RUN echo "source /usr/local/bin/catkin_setup.sh" >> /root/.bashrc && \
|
|
|
|
chmod +x /usr/local/bin/catkin_setup.sh
|
2024-05-10 06:41:17 +00:00
|
|
|
|
2024-05-22 01:57:01 +00:00
|
|
|
# Run catkin setup script
|
2024-05-11 07:32:58 +00:00
|
|
|
RUN /usr/local/bin/catkin_setup.sh
|
2024-05-10 23:42:01 +00:00
|
|
|
CMD ["/bin/bash"]
|