-
Notifications
You must be signed in to change notification settings - Fork 41
/
Dockerfile.GUI
76 lines (63 loc) · 2.29 KB
/
Dockerfile.GUI
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
FROM ros:humble-ros-core-jammy
ARG DEBIAN_FRONTEND=noninteractive
ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
ENV ROS_DISTRO=humble
ENV USERNAME=spaceros-user
ENV HOME=/home/spaceros-user
ENV IGNITION_VERSION=fortress
ENV GZ_VERSION=fortress
# Install dependencies
RUN apt update && apt install -y ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \
wget \
curl \
&& apt clean \
&& rm -rf /var/lib/apt/lists/*
RUN wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg\
&& echo "deb [arch=amd64 signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" | tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null
# Install Gazebo
RUN apt-get update -qq \
&& apt-get install -y \
gz-${GZ_VERSION} \
libgz-sim7 \
libgz-transport12 \
libgz-gui7 \
build-essential\
ros-${ROS_DISTRO}-rcl-interfaces\
ros-${ROS_DISTRO}-rclcpp\
ros-${ROS_DISTRO}-builtin-interfaces\
ros-${ROS_DISTRO}-ros-gz\
ros-${ROS_DISTRO}-sdformat-urdf\
ros-${ROS_DISTRO}-vision-msgs\
ros-${ROS_DISTRO}-actuator-msgs\
ros-${ROS_DISTRO}-image-transport\
ros-${ROS_DISTRO}-xacro\
&& rm -rf /var/lib/apt/lists/*
# Install Rviz2
RUN apt-get update -qq \
&& apt-get install -y \
ros-${ROS_DISTRO}-rviz2 \
ros-${ROS_DISTRO}-moveit-ros-visualization \
ros-${ROS_DISTRO}-nav2-rviz-plugins \
&& rm -rf /var/lib/apt/lists/*
# Demo package
RUN mkdir -p ${HOME}/canadarm2_ws/src
WORKDIR ${HOME}/canadarm2_ws/src
COPY ./canadarm_description ./canadarm_description
COPY ./canadarm_gazebo ./canadarm_gazebo
COPY .defaults.yaml ${HOME}/canadarm2_ws/.defaults.yaml
RUN apt update \
&& apt install -y python3-rosdep python3-colcon-common-extensions \
&& apt clean \
&& rm -rf /var/lib/apt/lists/* \
&& rosdep init \
&& rosdep update
RUN . /opt/ros/humble/setup.sh \
&& cd ${HOME}/canadarm2_ws \
&& apt update \
&& rosdep install --from-paths src --ignore-src -r -y \
&& colcon build
WORKDIR ${HOME}/canadarm2_ws
RUN apt update && apt install -y ros-humble-ros-ign-gazebo
RUN echo "source /opt/ros/humble/setup.bash" >> ${HOME}/.bashrc
RUN echo "source ${HOME}/canadarm2_ws/install/setup.bash" >> ${HOME}/.bashrc
CMD ign gazebo