From 92213ce2893c88cf80c1e595685be9bacdab3f99 Mon Sep 17 00:00:00 2001 From: Niko Feith Date: Wed, 14 Feb 2024 11:36:25 +0000 Subject: [PATCH] =?UTF-8?q?Dateien=20hochladen=20nach=20=E2=80=9E=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 26 ++++++++++++++++++++++++++ docker-compose.yaml | 14 ++++++++++++++ requirements.txt | 1 + 3 files changed, 41 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yaml create mode 100644 requirements.txt diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..26b456f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,26 @@ +# Use ROS 2 Humble Hawksbill base image +FROM osrf/ros:humble-desktop-full + +# Update and install dependencies +RUN apt-get update && apt-get install -y \ + python3-colcon-common-extensions \ + && rm -rf /var/lib/apt/lists/* + +COPY requirements.txt ./ +RUN pip install --no-cache-dir -r requirements.txt + +# Create a workspace +WORKDIR /ros2_ws + +# Copy your ROS 2 package into the workspace +COPY ./src /ros2_ws/src + +# Build your package +RUN . /opt/ros/humble/setup.sh && \ + colcon build + +RUN echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc + + +# Source the workspace +CMD ["/bin/bash"] diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..335dbd8 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,14 @@ +version: '3.8' +services: + ros2: + build: .. + volumes: + - ./src:/ros2_ws/src + networks: + - ros_network + tty: true + stdin_open: true + +networks: + ros_network: + driver: bridge diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..cd1df23 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +numpy==1.26.4