-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
97 lines (85 loc) · 2.78 KB
/
Copy pathDockerfile
File metadata and controls
97 lines (85 loc) · 2.78 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
FROM ros:melodic
# Avoid interactive prompts
ENV DEBIAN_FRONTEND=noninteractive
# Install system dependencies
RUN apt-get update && apt-get install -y \
python3-pip \
python3-venv \
python3-catkin-tools \
protobuf-compiler \
libprotobuf-dev \
libgazebo9-dev \
wget \
git \
# ROS navigation stack
ros-melodic-navigation \
ros-melodic-move-base-msgs \
# Gazebo
ros-melodic-gazebo-msgs \
ros-melodic-gazebo-ros \
ros-melodic-gazebo-ros-control \
ros-melodic-gazebo-plugins \
# Jackal dependencies
ros-melodic-xacro \
ros-melodic-sick-tim \
ros-melodic-lms1xx \
ros-melodic-velodyne-description \
ros-melodic-pointgrey-camera-description \
ros-melodic-ros-control \
ros-melodic-ros-controllers \
ros-melodic-robot-localization \
ros-melodic-twist-mux \
ros-melodic-interactive-marker-twist-server \
ros-melodic-teleop-twist-joy \
ros-melodic-diff-drive-controller \
ros-melodic-joint-state-controller \
ros-melodic-map-server \
ros-melodic-amcl \
ros-melodic-rviz \
ros-melodic-hector-gazebo-plugins \
ros-melodic-gmapping \
ros-melodic-rosdoc-lite \
&& rm -rf /var/lib/apt/lists/*
# Set up workspace
WORKDIR /jackal_ws/src
# Clone Jackal packages
RUN git clone https://github.com/jackal/jackal.git --branch melodic-devel --depth 1 && \
git clone https://github.com/jackal/jackal_simulator.git --branch melodic-devel --depth 1
# Copy the barn challenge source code
COPY . /jackal_ws/src/the-barn-challenge
# Install rosdep dependencies
WORKDIR /jackal_ws
RUN bash -c "source /opt/ros/melodic/setup.bash && \
rosdep update && \
rosdep install -y --from-paths src --ignore-src --rosdistro melodic \
--skip-keys='flir_camera_driver spinnaker_camera_driver rviz rosdoc_lite hector_gazebo_plugins gmapping'"
# Build the workspace
RUN bash -c "source /opt/ros/melodic/setup.bash && catkin_make -DCMAKE_BUILD_TYPE=Release"
# Install Python dependencies
RUN pip3 install --upgrade pip && \
pip3 install \
defusedxml \
rospkg \
netifaces \
numpy \
transforms3d>=0.4.2 \
scikit-fuzzy>=0.5.0 \
scipy>=1.5.4 \
packaging>=21.3 \
networkx>=2.5.1
# Gazebo models directory
RUN mkdir -p /root/.gazebo/models
# Environment setup
ENV JACKAL_LASER=1
ENV GAZEBO_MODEL_PATH=/jackal_ws/src/the-barn-challenge/models:$GAZEBO_MODEL_PATH
# Write entrypoint
RUN echo '#!/bin/bash\n\
set -e\n\
source /opt/ros/melodic/setup.bash\n\
source /jackal_ws/devel/setup.bash\n\
export JACKAL_LASER=1\n\
export GAZEBO_MODEL_PATH=/jackal_ws/src/the-barn-challenge/models:$GAZEBO_MODEL_PATH\n\
cd /jackal_ws/src/the-barn-challenge\n\
exec "$@"' > /entrypoint.sh && chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["bash"]