-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
62 lines (50 loc) · 2.16 KB
/
Dockerfile
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
FROM osrf/ros:humble-desktop-full
SHELL ["/bin/bash", "-c"]
RUN apt update \
&& apt install -y --no-install-recommends locales software-properties-common tzdata \
&& locale-gen en_US en_US.UTF-8 \
&& update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 \
&& add-apt-repository universe
ENV LANG en_US.UTF-8
ENV TZ=Asia/Tokyo
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && \
apt install -y git tmux wget curl gnupg lsb-release
RUN mkdir -p ~/ros2_ws/src
WORKDIR ~/ros2_ws/src
RUN mkdir -p ${HOME}/.gazebo/models && \
wget -O /tmp/sun http://models.gazebosim.org/sun/model.tar.gz && \
wget -O /tmp/ground_plane http://models.gazebosim.org/ground_plane/model.tar.gz && \
tar xvzf /tmp/sun -C ${HOME}/.gazebo/models && \
tar xvzf /tmp/ground_plane -C ${HOME}/.gazebo/models
RUN git clone https://github.com/RyuYamamoto/navyu.git
RUN git clone https://github.com/CIT-Autonomous-Robot-Lab/emcl2_ros2.git
WORKDIR ../
RUN apt update && apt install -y python3-rosdep2 python3-colcon-common-extensions
RUN rosdep update
RUN apt install -y \
ros-humble-nav2-map-server ros-humble-nav2-lifecycle-manager \
ros-humble-controller-manager \
ros-humble-diff-drive-controller \
ros-humble-joint-state-broadcaster \
ros-humble-gazebo-ros \
ros-humble-gazebo-ros-pkgs \
ros-humble-gazebo-ros2-control \
ros-humble-nav2-bringup
RUN source /opt/ros/humble/setup.bash && \
rosdep install -iry --from-paths src --rosdistro humble && \
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to navyu emcl2
ENV NVIDIA_DRIVER_CAPABILITIES graphics,compute,utility
ENV GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:/ros2_ws/src/navyu/navyu_simulator/world
RUN mkdir -p "$HOME/.gazebo/models" && mkdir /tmp/models && \
cd /tmp/models && \
for m in "cube_20k" "dumpster" "jersey_barrier" "ground_plane" "sun" "willowgarage"; do \
curl -Os "http://models.gazebosim.org/$m/model.tar.gz" && \
tar -zvxf model.tar.gz && \
cp -vfR $m "$HOME/.gazebo/models/"; \
rm model.tar.gz; \
done && \
cd .. && rm -r /tmp/models
COPY entrypoint.sh /usr/bin/
RUN chmod +x /usr/bin/entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]