@@ -24,13 +24,8 @@ RUN echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" > /etc/
2424ENV ROS1_DISTRO melodic
2525ENV ROS2_DISTRO bouncy
2626
27- # install basic build script dependencies
27+ # update latest package versions
2828RUN apt-get update
29- RUN apt-get install -y \
30- python3-colcon-common-extensions \
31- git \
32- wget \
33- python3-vcstool
3429
3530# install ROS1 dependencies
3631RUN apt-get install -y \
@@ -39,6 +34,22 @@ RUN apt-get install -y \
3934 ros-$ROS1_DISTRO-interactive-markers \
4035 ros-$ROS1_DISTRO-gazebo-ros
4136
37+ # install ROS2 dependencies
38+ RUN apt install -y \
39+ build-essential \
40+ cmake \
41+ git \
42+ python3-colcon-common-extensions \
43+ python3-pip \
44+ python-rosdep \
45+ python3-vcstool \
46+ wget
47+
48+ # install Fast-RTPS dependencies
49+ RUN apt install --no-install-recommends -y \
50+ libasio-dev \
51+ libtinyxml2-dev
52+
4253# install map_server dependencies
4354RUN apt-get install -y \
4455 libsdl-image1.2 \
@@ -54,10 +65,17 @@ ARG SCRIPTPATH=./tools
5465COPY $SCRIPTPATH/initial_ros_setup.sh init/
5566COPY $SCRIPTPATH/*.repos ./
5667
57- # run setup script to download source
68+ # run setup script to download ROS1 and source dependencies
5869RUN chmod +x init/initial_ros_setup.sh
5970RUN yes | ./init/initial_ros_setup.sh --no-ros2 --download-only
6071
72+ # get the latest nightly ROS2 build
73+ # RUN mkdir /ros2_ws/ros2_ws
74+ # WORKDIR /ros2_ws/ros2_ws
75+ RUN wget -nv https://ci.ros2.org/view/packaging/job/packaging_linux/lastSuccessfulBuild/artifact/ws/ros2-package-linux-x86_64.tar.bz2
76+ RUN tar -xjf ros2-package-linux-x86_64.tar.bz2
77+ RUN . ros2-linux/setup.bash
78+
6179WORKDIR /ros2_ws/navigation2_ws/src/navigation2
6280
6381# change to correct branch if $BRANCH is not = master
0 commit comments