Skip to content
Snippets Groups Projects
Commit e70b4d25 authored by Sebastian Ebert's avatar Sebastian Ebert
Browse files

added dockerfile and documentation

parent 1c08b91b
No related branches found
No related tags found
No related merge requests found
Dockerfile
FROM ros:noetic-ros-core
RUN sed -i 's/^deb/deb [trusted=yes]/' /etc/apt/sources.list.d/ros1-latest.list
# update and install dependencies
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
python3-osrf-pycommon \
python3-catkin-tools \
build-essential \
protobuf-compiler \
libprotobuf-dev \
python3-rosdep \
tree
# update rosdep dependencies manually to speed up process
RUN 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 \
ros-noetic-libfranka \
ros-noetic-franka-ros
RUN apt-get install -y \
libnng1 libnng-dev
RUN apt-get update && apt-get install git-all -y
ENV HOME /home/user
RUN useradd --create-home --home-dir $HOME user && chmod -R u+rwx $HOME && chown -R user:user $HOME
RUN rosdep init
USER user
RUN mkdir -p ${HOME}/work_dir
COPY --chown=user:user . ${HOME}/work_dir/
RUN rosdep update
# temporary switch to root to be able to install the ROS package dependencies of the workspace
USER root
RUN rosdep install --from-paths ${HOME}/work_dir/ -i -y -r
USER user
RUN ls -al /home/user
WORKDIR ${HOME}/work_dir
RUN git clone --recurse-submodules -b ccnc-demo https://git-st.inf.tu-dresden.de/ceti/ros/ccf/ccf_workspace.git
RUN pwd && ls
RUN echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
RUN /bin/bash -c "source /opt/ros/noetic/setup.bash && \
cd ~/work_dir/ccf_workspace/ && \
catkin build"
RUN echo "source ~/work_dir/ccf_workspace/devel/setup.bash" >> ~/.bashrc
EXPOSE 6576/tcp
RUN ls -l
ENTRYPOINT ["./launch.sh"]
#!/bin/bash
echo Running Main Controller with parameters: "$@"
source ~/work_dir/ccf_workspace/devel/setup.bash
if [ $1 -eq 1 ]
then
roslaunch ccf_immersive_sorting main_controller_virtual_preview_ceti-table-$1_real_robot.launch mqtt_server:=tcp://$2 connection_address:=tcp://$3 robot_ip:=$4
else
roslaunch robot-cell_ceti-table-$1.launch mqtt_server:=tcp://$2 robot_ip:=$4
fi
# Docker Manual
## Building an running the demo locally
* Building the container: ```docker build .```
* Running the conainer: ```docker run -it --ulimit rtprio=99 --cap-add=sys_nice --network host <containerName> <robotId> <mqttAddress> <nngAddress> <robotIP>```
* Example: ```docker run -it --ulimit rtprio=99 --cap-add=sys_nice --network host 70fef7e9a389 1 127.0.0.1:2000 *:6576 172.31.1.13```
## Running the demo from the registry
* ```docker run -it --ulimit rtprio=99 --cap-add=sys_nice --network host git-st.inf.tu-dresden.de:4567/ceti/ros/ccf/ccf_workspace:ccnc <robotId> <mqttAddress> <nngAddress> <robotIP>```
## Material
* Docker realtime options: https://docs.docker.com/config/containers/resource_constraints/#configure-the-docker-daemon
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment