1
- # https://github.com/osrf/docker_images/blob/df19ab7d5993d3b78a908362cdcd1479a8e78b35 /ros/noetic /ubuntu/focal /ros-core/Dockerfile
2
- FROM ros:noetic -ros-core-focal as repo-deps
1
+ # https://github.com/osrf/docker_images/blob/27cc0b68263bbbb10bb58dd814efc0a6b0a01ec7 /ros/humble /ubuntu/jammy /ros-core/Dockerfile
2
+ FROM ros:humble -ros-core-jammy as repo-deps
3
3
# This layer installs basic tools and the direct dependencies of terrain-navigation.
4
4
5
5
SHELL ["/bin/bash" , "-c" ]
6
6
7
- WORKDIR /root/catkin_ws /src/terrain-navigation
7
+ WORKDIR /root/ros2_ws /src/ethz-asl /terrain-navigation
8
8
9
9
COPY mav_planning_rviz/package.xml mav_planning_rviz/package.xml
10
10
COPY planner_msgs/package.xml planner_msgs/package.xml
@@ -13,32 +13,42 @@ COPY terrain_navigation_ros/package.xml terrain_navigation_ros/package.xml
13
13
COPY terrain_planner/package.xml terrain_planner/package.xml
14
14
COPY terrain_planner_benchmark/package.xml terrain_planner_benchmark/package.xml
15
15
16
- WORKDIR /root/catkin_ws /
16
+ WORKDIR /root/ros2_ws /
17
17
18
18
RUN apt-get update \
19
19
# https://ros.org/reps/rep-2001.html#dev-tools
20
20
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
21
21
ros-dev-tools \
22
- ros-noetic-catkin \
23
- python3-catkin-tools \
24
22
python3-pip \
23
+ python3-colcon-mixin \
24
+ && colcon mixin add default https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml \
25
+ && colcon mixin update default \
25
26
&& rosdep init \
26
27
&& rosdep update \
27
28
&& DEBIAN_FRONTEND=noninteractive rosdep install --from-paths src --ignore-src -r -y \
28
- && python3 -m pip install \
29
- wstool \
30
29
&& rm -rf /var/lib/apt/lists/*
31
30
32
31
33
32
FROM repo-deps as all-deps
34
33
# This layer installs dependencies of the other source packages.
35
34
36
- COPY dependencies.rosinstall src/terrain-navigation/dependencies.rosinstall
37
- RUN wstool init src src/terrain-navigation/dependencies.rosinstall
38
- RUN wstool update -t src -j4
35
+ COPY terrain-navigation.repos src/ethz-asl/terrain-navigation/terrain-navigation.repos
39
36
37
+ WORKDIR /root/ros2_ws/src
38
+ RUN vcs import --recursive --debug --skip-existing < ethz-asl/terrain-navigation/terrain-navigation.repos
39
+
40
+ WORKDIR /root/ros2_ws/
40
41
RUN apt-get update \
41
42
&& rosdep update \
42
- && source /opt/ros/noetic /setup.bash \
43
- && rosdep install --from-paths src --ignore-src -y \
43
+ && source /opt/ros/humble /setup.bash \
44
+ && rosdep install --from-paths src --ignore-src -r - y \
44
45
&& rm -rf /var/lib/apt/lists/*
46
+
47
+ FROM all-deps as build
48
+
49
+ WORKDIR /root/ros2_ws/src/ethz-asl/terrain-navigation
50
+ COPY . .
51
+ WORKDIR /root/ros2_ws/
52
+
53
+ RUN source /opt/ros/humble/setup.bash \
54
+ && colcon build --mixin release
0 commit comments