From 4625509f7ce358d1730434451032947f3cf667db Mon Sep 17 00:00:00 2001
From: Demian Frister <demian.frister@kit.edu>
Date: Mon, 19 Sep 2022 11:12:10 +0000
Subject: [PATCH] moveit added und ausgelagert in downloadable image

---
 .devcontainer/Dockerfile        |  8 +-------
 .devcontainer/Dockerfile_core   | 20 ++++++++++++++++++++
 .devcontainer/devcontainer.json |  7 ++++++-
 3 files changed, 27 insertions(+), 8 deletions(-)
 create mode 100644 .devcontainer/Dockerfile_core

diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index cb89653..a594027 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -1,9 +1,3 @@
 # See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/ubuntu/.devcontainer/base.Dockerfile
 
-FROM osrf/ros:noetic-desktop-full
-
-# [Optional] Uncomment this section to install additional OS packages.
-RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
-    && apt-get -y install --no-install-recommends ros-noetic-libfranka ros-noetic-franka-ros
-
-RUN echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
\ No newline at end of file
+FROM chillerrobot/ros-noetic-moveit-panda:first
\ No newline at end of file
diff --git a/.devcontainer/Dockerfile_core b/.devcontainer/Dockerfile_core
new file mode 100644
index 0000000..eaf34b7
--- /dev/null
+++ b/.devcontainer/Dockerfile_core
@@ -0,0 +1,20 @@
+# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/ubuntu/.devcontainer/base.Dockerfile
+
+FROM osrf/ros:noetic-desktop-full
+
+# [Optional] Uncomment this section to install additional OS packages.
+RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
+    && apt-get -y install --no-install-recommends ros-noetic-libfranka ros-noetic-franka-ros ros-noetic-moveit git
+
+
+RUN echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
+RUN rosdep update
+
+RUN apt install -y --no-install-recommends ros-noetic-catkin python3-catkin-tools python3-osrf-pycommon python3-wstool
+
+RUN mkdir -p ~/ws_moveit/src
+RUN cd ~/ws_moveit/src && wstool init . && wstool merge -t . https://raw.githubusercontent.com/ros-planning/moveit/master/moveit.rosinstall && wstool remove  moveit_tutorials && wstool update -t .
+RUN cd ~/ws_moveit/src git clone https://github.com/ros-planning/moveit_tutorials.git -b master && rosdep install -y --from-paths . --ignore-src --rosdistro noetic && cd ~/ws_moveit && catkin config --extend /opt/ros/${ROS_DISTRO} --cmake-args -DCMAKE_BUILD_TYPE=Release && catkin build && echo 'source ~/ws_moveit/devel/setup.bash' >> ~/.bashrc
+
+
+EXPOSE 6080/tcp
\ No newline at end of file
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 5df32a3..1e9aea7 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -16,6 +16,11 @@
 
 	"features": {
 		"git": "latest",
-		"git-lfs": "latest"
+		"git-lfs": "latest",
+		"desktop-lite": {
+			"password": "vscode",
+			"webPort": "6080",
+			"vncPort": "5901"
+		}
 	}
 }
-- 
GitLab