From 773d84a9eb25074e1733ebb3369f4e01987b90f7 Mon Sep 17 00:00:00 2001 From: Bill Finger Date: Mon, 11 Dec 2023 18:29:05 +0300 Subject: [PATCH] add Dockerfile --- Dockerfile | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5ea5c14 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,39 @@ +FROM osrf/ros:humble-desktop + +ARG WSDIR=rbs_ws + +ENV RBS_ASSEMBLY_DIR=~/assembly +ENV IGN_GAZEBO_RESOURCE_PATH=/${WSDIR}/install/rbs_schunk_40_n_n_b/share/:~/${WSDIR}/install/rbs_simulation/share/rbs_simulation/ + +WORKDIR /${WSDIR} + +RUN apt update && apt install -y \ + git \ + python3-pip \ + lsb-release \ + wget \ + gnupg \ + libgoogle-glog-dev + +RUN pip install vcstool && \ + wget http://www.lua.org/ftp/lua-5.3.1.tar.gz &&\ + tar zxf lua-5.3.1.tar.gz &&\ + sudo make -C lua-5.3.1 linux && sudo make -C lua-5.3.1 install + + + +#Install Gazebo Fortres +RUN wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg &&\ + "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null &&\ + apt-get update &&\ + apt-get install -y ignition-fortress + +# Install RBS +COPY . src/robossembler-ros2/ +RUN ls -la src/ + +RUN vcs import src/. < src/robossembler-ros2/rbs.repos +RUN apt update && \ + rosdep install -y -r -q --from-paths src --ignore-src --rosdistro humble +RUN . /opt/ros/humble/setup.sh && \ + colcon build --symlink-install --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=1 \ No newline at end of file