runtime/Dockerfile

43 lines
1.3 KiB
Text
Raw Normal View History

2023-12-11 18:29:05 +03:00
FROM osrf/ros:humble-desktop
ARG WSDIR=rbs_ws
2023-12-12 00:54:55 +03:00
ENV RBS_ASSEMBLY_DIR=/assembly
# COPY /home/bill-finger/assembly /assembly
2023-12-12 00:54:55 +03:00
ENV IGN_GAZEBO_RESOURCE_PATH=/${WSDIR}/install/rbs_simulation/share/rbs_simulation/
2023-12-11 18:29:05 +03:00
RUN apt update && apt install -y \
git \
python3-pip \
lsb-release \
2023-12-12 00:54:55 +03:00
wget \
gnupg
2023-12-11 18:29:05 +03:00
2023-12-12 00:54:55 +03:00
RUN pip install vcstool
2023-12-11 18:29:05 +03:00
2023-12-12 00:54:55 +03:00
WORKDIR /libs
RUN wget https://github.com/nlohmann/json/archive/refs/tags/v3.11.3.tar.gz &&\
tar -xf v3.11.3.tar.gz &&\
cd json-3.11.3 &&\
mkdir build &&\
cd build &&\
cmake .. &&\
make &&\
make install
2023-12-11 18:29:05 +03:00
2023-12-12 00:54:55 +03:00
WORKDIR /${WSDIR}
2023-12-11 18:29:05 +03:00
#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 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