From a73ce992ba6830e9567791808685383f566ac71d Mon Sep 17 00:00:00 2001 From: Tim Kluge <timklge@gmail.com> Date: Thu, 27 Aug 2020 15:42:01 +0200 Subject: [PATCH] Update vnc setup --- Dockerfile | 31 ++++++++++++------------------- README.md | 16 +++------------- docker-run-vnc.bat | 8 -------- docker-run-vnc.sh | 8 -------- entrypoint.sh | 4 ---- vnc-entrypoint.sh | 4 ---- vnc/simple_simulation.sh | 4 ++++ 7 files changed, 19 insertions(+), 56 deletions(-) delete mode 100644 docker-run-vnc.bat delete mode 100644 docker-run-vnc.sh delete mode 100644 entrypoint.sh delete mode 100644 vnc-entrypoint.sh create mode 100644 vnc/simple_simulation.sh diff --git a/Dockerfile b/Dockerfile index 1584de1..4430957 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,23 +1,16 @@ -FROM henry2423/ros-vnc-ubuntu:melodic +FROM fbottarel/ros-desktop-full-vnc:melodic -USER root - -# Updated ros gpg key: https://github.com/henry2423/docker-ros-vnc/issues/1 -RUN apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 -RUN apt-key del 421C365BD9FF1F717815A3895523BAEEB01FA116 - -COPY ./vnc-entrypoint.sh /entrypoint.sh -RUN chmod +x /entrypoint.sh - -RUN apt-get update && apt-get install -y \ - python-catkin-tools bash \ - mesa-utils libgl1-mesa-glx -COPY ./src /src/src -WORKDIR /src/ +RUN apt-get update && apt-get dist-upgrade -y +RUN apt-get install -y \ + ros-melodic-libfranka python-catkin-tools libeigen3-dev +#WORKDIR /src/ +COPY ./vnc/simple_simulation.sh /root/Desktop/ +RUN chmod a+x /root/Desktop/simple_simulation.sh ENV ROS_DISTRO=melodic -RUN apt-get update && rosdep install --from-paths . -r -y +WORKDIR /home/ubuntu/ros_ws +RUN rm build devel src -rf +COPY ./src /home/ubuntu/ros_ws/src +RUN apt-get update && rosdep install --from-paths . -r -y && apt-get clean RUN catkin config \ --extend /opt/ros/melodic && \ - catkin build - -ENTRYPOINT ["/entrypoint.sh"] + catkin build \ No newline at end of file diff --git a/README.md b/README.md index e159019..88dec4c 100644 --- a/README.md +++ b/README.md @@ -15,19 +15,9 @@ instructions further below in this document. Please note that the setup uses vnc - Clone this repo and its submodules: - as a guest: `git clone --recurse-submodules https://git-st.inf.tu-dresden.de/ceti/ros/panda_gazebo_workspace.git panda_gazebo_workspace` - as a project member with a registered ssh key: `git clone --recurse-submodules git@git-st.inf.tu-dresden.de:ceti/ros/panda_gazebo_workspace.git panda_gazebo_workspace` -- Follow the steps for your operating system. - -### Linux - -- Install Docker for your linux distribution -- Run `./docker-run-vnc.sh roslaunch sample_applications sample_simple_simulation.launch` to build and run a docker image tagged with `ceti-panda-gazebo-workspace` -- Open `http://localhost:6901` in a web browser and enter the password `vncpassword` - -### Windows 10 - -- Install [Docker Desktop for Windows](https://hub.docker.com/editions/community/docker-ce-desktop-windows) -- Run `docker-run-vnc.bat roslaunch sample_applications sample_simple_simulation.launch` -- Open `http://localhost:6901` in a web browser and enter the password `vncpassword` +- Install Docker for your system (for Windows and Mac OS, install Docker Desktop) +- Run the container: `docker run -it -p 6080:80 --rm git-st.inf.tu-dresden.de:4567/ceti/ros-internal/panda_gazebo_workspace`. A webserver is run inside the container that is exposed to port `6080` on your system. +- Open `http://localhost:6080` in a web browser ## Requirements for development diff --git a/docker-run-vnc.bat b/docker-run-vnc.bat deleted file mode 100644 index c5d3bf3..0000000 --- a/docker-run-vnc.bat +++ /dev/null @@ -1,8 +0,0 @@ -docker build . -t ceti-panda-gazebo-workspace - -docker run -it^ - -p 5901:5901 -p 6901:6901^ - ceti-panda-gazebo-workspace^ - %* - -pause \ No newline at end of file diff --git a/docker-run-vnc.sh b/docker-run-vnc.sh deleted file mode 100644 index c0f40ed..0000000 --- a/docker-run-vnc.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -docker build . -t ceti-panda-gazebo-workspace - -docker run -it \ - -p 5901:5901 -p 6901:6901 \ - ceti-panda-gazebo-workspace \ - "$@" \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh deleted file mode 100644 index 527ef79..0000000 --- a/entrypoint.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -source /opt/ros/melodic/setup.bash -source $HOME/devel/setup.bash -exec "$@" \ No newline at end of file diff --git a/vnc-entrypoint.sh b/vnc-entrypoint.sh deleted file mode 100644 index 483d5fa..0000000 --- a/vnc-entrypoint.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -source /opt/ros/melodic/setup.bash -source /src/devel/setup.bash -exec /dockerstartup/vnc_startup.sh $@ \ No newline at end of file diff --git a/vnc/simple_simulation.sh b/vnc/simple_simulation.sh new file mode 100644 index 0000000..f51f750 --- /dev/null +++ b/vnc/simple_simulation.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +source ~/ros_ws/devel/setup.bash +roslaunch sample_applications simple_simulation.launch \ No newline at end of file -- GitLab