Cross-compile Foxy for armhf
Hi, I'm trying to cross-compile ROS2 Foxy for use on a Beaglebone Black (armhf) by following the instructions on https://docs.ros.org/en/foxy/Guides/C....
I am following all the steps mentioned in that link. However, I made small changes to the Dockerfile that is used in the tutorial (ros2/cross_compile/sysroot/Dockerfile_ubuntu_arm). I changed the architecture and distro mentioned in the file to fit my need.
All the steps execute correctly until it reaches "rosdep init". "rosdep init" fails with the following error message:
ERROR: cannot download default sources list from:
https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
Website may be down.
Here is the Dockerfile I am using.
# Copyright (c) 2018, ARM Limited.
# SPDX-License-Identifier: Apache-2.0
ARG ARM_ARCH=arm32v7
FROM ${ARM_ARCH}/debian:buster
COPY ./qemu-user-static/* /usr/bin/
COPY ./ros2_ws/src /ros2_ws/src
# Set timezone
#RUN echo 'Etc/UTC' > /etc/timezone && \
# ln -s /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
# apt-get update && apt-get install -q -y tzdata && rm -rf /var/lib/apt/lists/*
RUN apt update && apt install -y \
pkg-config \
lsb-release \
ca-certificates \
curl \
gfortran \
libpcre3 \
libpcre3-dev \
bash-completion \
dirmngr \
gnupg2
# ROS2 dependencies
RUN apt install -y --no-install-recommends \
build-essential \
cmake \
git \
wget
ENV LANG en_US.UTF-8
ENV LC_ALL C.UTF-8
RUN curl http://repo.ros2.org/repos.key | apt-key add -
RUN sh -c 'echo "deb [arch=armhf] http://repo.ros2.org/ubuntu/main \
`lsb_release -cs` main" > /etc/apt/sources.list.d/ros2-latest.list'
RUN apt update
RUN apt install -y \
python3-colcon-common-extensions \
python3-pip \
python3-rosdep
RUN python3 -m pip install -U \
argcomplete \
flake8 \
flake8-blind-except \
flake8-builtins \
flake8-class-newline \
flake8-comprehensions \
flake8-deprecated \
flake8-docstrings \
flake8-import-order \
flake8-quotes \
pytest-repeat \
pytest-rerunfailures
RUN python3 -m pip install -U \
pytest \
pytest-cov \
pytest-runner \
setuptools
RUN apt install --no-install-recommends -y \
libasio-dev \
libtinyxml2-dev
WORKDIR /ros2_ws
RUN rosdep init
RUN rosdep update
RUN rosdep install --from-paths src \
--ignore-src \
--rosdistro foxy -y \
--skip-keys "console_bridge fastcdr fastrtps rti-connext-dds-5.3.1 urdfdom_headers"
WORKDIR /
RUN apt-get install -y symlinks
RUN symlinks -rc .