Skip to content
Snippets Groups Projects
Commit 178f2ce8 authored by René Schöne's avatar René Schöne
Browse files

working on docker setup and readme

parent fb31e58e
No related branches found
No related tags found
No related merge requests found
......@@ -2,25 +2,34 @@
## Docker
To quickly run the graphical example applications, you can use Docker. For development purposes, please use the regular installation
instructions further below in this document. Please note that the setup uses vnc and thus offers limited graphics performance.
To quickly run the graphical example applications, you can use Docker.
Please note that the setup uses vnc and thus offers limited graphics performance.
:warning: TODO: check what is needed for VNC setup
:warning: TODO: check what is needed for VNC setup, and check everything labelled with "(OLD)"
- Install Docker and docker-compose for your system (for Windows and Mac OS, install Docker Desktop)
- Build the container `docker build --tag cgvsim .`
- Run the container: `docker run -it -p 6080:80 --rm cgvsim`. A webserver is run inside the container that is exposed to port `6080` on your system.
- Open `http://localhost:6080` in a web browser
- (OLD) Build the container `docker build --tag cgvsim .`
- (OLD) Run the container: `docker run -it -p 6080:80 --rm cgvsim`. A webserver is run inside the container that is exposed to port `6080` on your system.
- (OLD) Open `http://localhost:6080` in a web browser
## Installation
## Installation and Preparation
- Clone this repo and its submodules:
- `git clone --recurse-submodules https://git-st.inf.tu-dresden.de/ceti/ros/models2022.git models2022`
- (as a project member with a registered ssh key: `git clone --recurse-submodules git@git-st.inf.tu-dresden.de:ceti/ros/models2022.git models2022`)
- change into the workspace `cd models2022`
- Prepare/Build all docker images: `docker-compose build`
## Running the Case Study
- (Optional) Use the Web UI to observe MQTT message and view the runtime model of place B
- `docker-compose up -d web_rag`
- Open your browser at <http://0.0.0.0:8050/>
- Start the case study
- `docker-compose up [-d] coordinator` (the `-d` flag is optional to run the coordinator in the background)
- (OLD) Start the case study
- (OLD) `docker-compose up [-d] coordinator` (the `-d` flag is optional to run the coordinator in the background)
## Experiment with RagConnect
-> Still TODO
To experiment with a less complex scenario and verify the functionality of the tool RagConnect itself, you can use the
......@@ -3,31 +3,59 @@ services:
# ros_core:
# build: "robotic-controller"
# user: "user"
# command: ['/entrypoint.sh', 'roscore']
# command: ['roscore']
# ros_place_a:
# build: "robotic-controller"
# user: "user"
# # TODO: update command
# command: ['/entrypoint.sh', 'rosrun', 'cgv_connector', 'dummy_rag_connector']
# command: ['rosrun', 'cgv_connector', 'dummy_rag_connector']
ros_place_b1:
build: "robotic-controller"
user: "user"
command: ['/entrypoint.sh', 'roslaunch', 'ccf_immersive_sorting', 'noop-sim-cell_ceti-table-1-placeworld.launch']
# build: "robotic-controller"
build:
context: robotic-controller
dockerfile: Dockerfile-vnc
# command: ['roslaunch', 'ccf_immersive_sorting', 'noop-sim-cell_ceti-table-1-placeworld.launch']
# command: ['roslaunch', 'ccf_immersive_sorting', 'noop-sim-cell_ceti-table-1-placeworld.launch', 'use_rviz:=false', 'mqtt_server:="tcp://mosquitto:1883"']
# deploy:
# resources:
# limits:
# cpus: '0.50'
# memory: 2G
volumes:
# - "/tmp/.X11-unix:/tmp/.X11-unix:rw"
# - "/tmp/.docker.xauth:/tmp/.docker.xauth:rw"
- "./ros_place_b1_logs/:/home/root/.ros/log"
# environment:
# - "XAUTHORITY=/tmp/.docker.xauth"
# - "DISPLAY=$DISPLAY"
# devices:
# - "/dev/dri"
# user: "user"
ports:
- "6081:80"
ros_place_b2:
build: "robotic-controller"
command: ['/entrypoint.sh', 'roslaunch', 'ccf_immersive_sorting', 'noop-sim-cell_ceti-table-2-placeworld.launch']
# command: ['roslaunch', 'ccf_immersive_sorting', 'noop-sim-cell_ceti-table-2-placeworld.launch']
# deploy:
# resources:
# limits:
# cpus: '0.50'
# memory: 2G
volumes:
- "/tmp/.X11-unix:/tmp/.X11-unix:rw"
- "/tmp/.docker.xauth:/tmp/.docker.xauth:rw"
environment:
- "XAUTHORITY=/tmp/.docker.xauth"
- "DISPLAY=$DISPLAY"
devices:
- "/dev/dri"
user: "ros"
# - "/tmp/.X11-unix:/tmp/.X11-unix:rw"
# - "/tmp/.docker.xauth:/tmp/.docker.xauth:rw"
- "./ros_place_b2_logs/:/home/root/.ros/log"
# environment:
# - "XAUTHORITY=/tmp/.docker.xauth"
# - "DISPLAY=$DISPLAY"
# devices:
# - "/dev/dri"
# user: "user"
ports:
- "6082:80"
coordinator:
privileged: true
......
FROM dorowu/ubuntu-desktop-lxde-vnc:focal
# Get public key for google
RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
# Fix dirmngr
RUN apt-get purge dirmngr -y && apt-get update && apt-get install dirmngr -y
# Adding keys for ROS
RUN sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
RUN sed -i 's/^deb/deb [trusted=yes]/' /etc/apt/sources.list.d/ros-latest.list
# Installing ROS
# RUN apt-get update && apt-get install -y ros-melodic-desktop-full wget nano python-rosdep
# RUN apt-get install -y \
# ros-melodic-libfranka python-catkin-tools libeigen3-dev
RUN apt-get update && apt-get install -y \
ros-noetic-ros-core=1.5.0-1* \
python3-osrf-pycommon \
python3-catkin-tools \
build-essential \
protobuf-compiler \
libprotobuf-dev \
python3-rosdep \
ca-certificates
# update rosdep dependencies manually to speed up process
RUN apt-get update && apt-get install -y \
# ros-noetic-gazebo-msgs \
libsdformat9-dev \
# ros-noetic-gazebo-ros \
ros-noetic-xacro \
ros-noetic-tf2 \
ros-noetic-moveit-ros-planning-interface \
ros-noetic-franka-gripper \
ros-noetic-controller-manager \
ros-noetic-effort-controllers \
# ros-noetic-gazebo-plugins \
# ros-noetic-gazebo-ros-control \
ros-noetic-joint-state-controller \
ros-noetic-joint-state-publisher \
ros-noetic-joint-trajectory-controller \
ros-noetic-robot-state-publisher \
ros-noetic-tf \
ros-noetic-moveit-simple-controller-manager \
ros-noetic-moveit-core \
ros-noetic-moveit-ros-perception \
ros-noetic-moveit-visual-tools \
ros-noetic-controller-interface \
ros-noetic-hardware-interface \
ros-noetic-moveit-ros-move-group \
ros-noetic-moveit-fake-controller-manager \
ros-noetic-moveit-kinematics \
ros-noetic-moveit-planners-ompl \
ros-noetic-moveit-ros-visualization \
ros-noetic-joint-state-publisher-gui \
libnng1 \
libnng-dev
RUN apt-get dist-upgrade -y
# create initial workspace and desktop dir
RUN mkdir -p /root/workspace /root/Desktop/
# create symlink on desktop
RUN ln -s /usr/share/applications/lxterminal.desktop /root/Desktop/lxterminal.desktop
# set ROS distro
ENV ROS_DISTRO=noetic
# copy workspace from host
WORKDIR /root/workspace
COPY ./src /root/workspace/src
# initialize dependencies
RUN rosdep init && rosdep update && rosdep install --from-paths /root/workspace/ -i -r -y
# build
RUN /bin/bash -c "source /opt/ros/noetic/setup.bash && catkin build"
# setup script to run for each bash (sourcing workspace and cd into it)
RUN /bin/bash -c "echo -e 'umask 000\n \
ulimit -Sn 1024\n \
ulimit -Hn 524288\n \
source /opt/ros/noetic/setup.bash\n \
source /root/workspace/devel/setup.bash\n \
cd /root/Desktop/ros_ws/\n' >> /root/.bashrc "
# create working workspace
RUN mkdir -p /root/Desktop/ros_ws
# prepare script to copy workspace
COPY vnc/copyws.sh /root/copyws.sh
RUN chmod a+x /root/copyws.sh
# limit file descriptors, see https://answers.ros.org/question/336963/rosout-high-memory-usage/?answer=340381#post-id-340381
COPY vnc/30-nofilelimit.conf /etc/security/limits.d/30-nofilelimit.conf
# prepare run scripts
COPY vnc/run1.sh /root/Desktop/run1.sh
COPY vnc/run2.sh /root/Desktop/run2.sh
RUN chmod a+x /root/Desktop/run1.sh
RUN chmod a+x /root/Desktop/run2.sh
RUN catkin config --extend /opt/ros/noetic
ENV OPENBOX_ARGS --startup "/root/copyws.sh"
# open ports. 11311: ROS, 6576: nng
EXPOSE 11311/tcp
EXPOSE 6576/tcp
VOLUME /root/Desktop/ros_ws
Subproject commit 872b968eafb37070e020ca047f14a474a75a99e8
Subproject commit b5423eff2a7f59b55e6a7e1cd3b60a32d46817b6
Subproject commit 5afd0e429aa0902bc4a9556cf050bada890f848e
Subproject commit ff4b30174dff8d1d0718d435f6788ed2e0b5df58
#<domain> <type> <item> <value>
* soft nofile 1024
* hard nofile 524288
#!/bin/sh
if [ -z "$(ls -A /root/Desktop/ros_ws)" ]; then
echo "Copying workspace..."
cp /root/workspace/* /root/Desktop/ros_ws -r
chmod a+rwx /root/Desktop/ros_ws/ -R
fi
#!/bin/bash
source /opt/ros/noetic/setup.bash
source /root/workspace/devel/setup.bash
roslaunch ccf_immersive_sorting noop-sim-cell_ceti-table-1-placeworld.launch mqtt_server:=tcp://mosquitto:1883
#!/bin/bash
source /opt/ros/noetic/setup.bash
source /root/workspace/devel/setup.bash
roslaunch ccf_immersive_sorting noop-sim-cell_ceti-table-2-placeworld.launch mqtt_server:=tcp://mosquitto:1883
Subproject commit 31974114f8867e38907a5100ad0b9a33f78aa076
Subproject commit e0bc953e001d51a3c97442684a4abeabb06ffc2c
Subproject commit 525211869b81bbaaab0e56f267dd5c831f709720
Subproject commit d51a74f17e25baf54b50b280b99037fe4934241c
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment