Skip to content
Snippets Groups Projects
Commit 36470cf6 authored by franzqueissner's avatar franzqueissner
Browse files

working container yay

parent 327a6c5b
No related branches found
No related tags found
No related merge requests found
{
"ros.distro": "noetic"
}
\ No newline at end of file
FROM tensorflow/tensorflow:latest-gpu
ENV ROS_DISTRO=${ROS_DISTRO}
ENV ROS_DISTRO=noetic
SHELL ["/bin/bash", "-c"]
# install essentials
RUN apt update && apt install -q -y \
build-essential git swig sudo libcppunit-dev curl wget
# python-future
# install ros
## setup sources.list
# INSTALLATION ROS
RUN echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" > \
/etc/apt/sources.list.d/ros-latest.list
## setup key
RUN curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
# install bootstrap tools
## downdload and install ------------------ takes long!!
RUN apt update && apt install -y \
python3-rosdep \
python3-rosinstall \
python3-wstool \
python3-rosinstall-generator \
python3-vcstools \
python3-catkin-tools \
ros-${ROS_DISTRO}-desktop-full \
&& rm -rf /var/lib/apt/lists/*
## source in bashrc
RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> ~/.bashrc
RUN source ~/.bashrc
# INSTALLATION PYTHON PACKAGES
RUN apt update && apt install -y \
python3-rosdep python3-rosinstall \
python3-rosinstall-generator python3-wstool
RUN rosdep init \
&& rosdep update
RUN pip install --upgrade pip
RUN pip install --upgrade numpy numpy-quaternion==2020.5.11.13.33.35 wstool
RUN pip install future panda-robot pynput numba scipy gym tensorflow-probability
RUN apt-get update && apt-get upgrade -y
# INSTALLATION ROS PACKAGES
RUN apt update && apt install -y \
ros-noetic-desktop-full \
&& rm -rf /var/lib/apt/lists/*
ros-${ROS_DISTRO}-libfranka ros-${ROS_DISTRO}-franka-ros \
ros-${ROS_DISTRO}-gazebo-ros-control \
ros-${ROS_DISTRO}-rospy-message-converter \
ros-${ROS_DISTRO}-effort-controllers \
ros-${ROS_DISTRO}-joint-state-controller \
python3-catkin-tools \
ros-${ROS_DISTRO}-ros-control \
ros-${ROS_DISTRO}-ros-controllers \
gazebo11\
libgazebo11-dev \
ros-${ROS_DISTRO}-combined-robot-hw
# MAKE + SOURCE CATKIN WORKSPACE + ROS DEP INIT
RUN mkdir -p home/panda_ws/src
WORKDIR "/home/panda_ws"
RUN /bin/bash -c "source /opt/ros/${ROS_DISTRO}/setup.bash && catkin build && source devel/setup.bash"
RUN /bin/bash -c "source /opt/ros/${ROS_DISTRO}/setup.bash && rosdep init && rosdep update && rosdep fix-permissions && rosdep update"
## SET UP SSH KEY FOR GIT
ARG ssh_prv_key
ARG ssh_pub_key
# authorize SSH Host
RUN mkdir -p /root/.ssh && \
chmod 700 /root/.ssh && \
ssh-keyscan gitlab.bht-berlin.de > /root/.ssh/known_hosts
# add the keys and set permissions
RUN echo "$ssh_prv_key" > /root/.ssh/id_rsa && \
echo "$ssh_pub_key" > /root/.ssh/id_rsa.pub && \
chmod 600 /root/.ssh/id_rsa && \
chmod 600 /root/.ssh/id_rsa.pub
arg adfsasdd
## CLONE ROS PACKAGES
RUN cd src && git clone git@gitlab.bht-berlin.de:bachelor_ws/panda_control.git
RUN cd src && git clone git@gitlab.bht-berlin.de:bachelor_ws/panda_openai.git
RUN cd src && git clone git@gitlab.bht-berlin.de:bachelor_ws/panda_simulator.git
RUN cd src && git clone https://bitbucket.org/theconstructcore/theconstruct_msgs.git
# next clones are in build_ws.sh
# RUN cd src && git clone git@gitlab.bht-berlin.de:bachelor_ws/franka_panda_description.git
# RUN cd src && git clone https://github.com/JustaGist/franka_ros_interface --branch v0.7.1-dev
# RUN cd src && git clone https://github.com/orocos/orocos_kinematics_dynamics
# script which ros depend and builds
RUN cd src/panda_simulator && ./build_ws.sh
# RUN sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
# RUN curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
# RUN apt-get install ros-noetic-desktop-full
# RUN echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
# RUN source ~/.bashrc
#
## install ros packages
#RUN apt-get update && apt-get install -y \
# ros-$ROS_DISTRO-libfranka ros-$ROS_DISTRO-franka-ros \
# python-catkin-tools ros-$ROS_DISTRO-gazebo-ros-control \
# ros-${ROS_DISTRO}-rospy-message-converter ros-${ROS_DISTRO}-effort-controllers \
# ros-${ROS_DISTRO}-joint-state-controller python-pip
#
## install python packages
#RUN pip install --upgrade pip
#RUN pip install --upgrade numpy numpy-quaternion==2020.5.11.13.33.35
#RUN apt-get update && apt-get upgrade -y
## run simulation through script
COPY start_docker.sh start_docker.sh
CMD ./start_docker.sh
#!/bin/bash
# Start the primary process and put it in the background
source devel/setup.bash
roslaunch panda_control panda_world.launch &
sleep 5
# Start the helper process
rosrun panda_control panda_control.py &
sleep 5
rosrun panda_openai agent_pg.py
# the my_helper_process might need to know how to wait on the
# primary process to start before it does its work and returns
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment