Skip to content

Commit 468f308

Browse files
author
Matt Hansen
authored
Merge pull request #205 from mkhansen-intel/build_ros2_master
Build CI using ros2 master nightly build
2 parents 847928a + e5cf761 commit 468f308

File tree

2 files changed

+26
-8
lines changed

2 files changed

+26
-8
lines changed

Dockerfile

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,8 @@ RUN echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" > /etc/
2424
ENV ROS1_DISTRO melodic
2525
ENV ROS2_DISTRO bouncy
2626

27-
# install basic build script dependencies
27+
# update latest package versions
2828
RUN 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
3631
RUN 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
4354
RUN apt-get install -y \
4455
libsdl-image1.2 \
@@ -54,10 +65,17 @@ ARG SCRIPTPATH=./tools
5465
COPY $SCRIPTPATH/initial_ros_setup.sh init/
5566
COPY $SCRIPTPATH/*.repos ./
5667

57-
# run setup script to download source
68+
# run setup script to download ROS1 and source dependencies
5869
RUN chmod +x init/initial_ros_setup.sh
5970
RUN 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+
6179
WORKDIR /ros2_ws/navigation2_ws/src/navigation2
6280

6381
# change to correct branch if $BRANCH is not = master

tools/initial_ros_setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ download_ros2() {
6868
echo "Downloading ROS 2 Release Latest"
6969
mkdir -p ros2_ws/src
7070
cd ros2_ws
71-
wget https://raw.githubusercontent.com/ros2/ros2/release-latest/ros2.repos
71+
wget https://raw.githubusercontent.com/ros2/ros2/master/ros2.repos
7272
vcs import src < ros2.repos
7373
return_to_root_dir
7474
}

0 commit comments

Comments
 (0)