rosdep not limiting dependencies correctly on ros2 src install
I am trying to build ROS2 foxy from source on Alpine linux. I have added a lot of rosdep keys into the rosdep distribution files and changed rosdep to use my repository (I am testing it before I make a PR). I am following the Linux install from source instructions except I only want to install ros_base dependencies. The source instructions try to install deps and compile every package. I checked out the ros2/variants package that defines what ros_base actually is and am trying to use that as the 'package'/'stack' to calculate recursively the dependencies. However it keeps suggesting installing irrelevant packages, and gives me errors about packages I don't care about (desktop).
bash-5.0# export
declare -x HOME="/root"
declare -x HOSTNAME="cfdae4a75db0"
declare -x LANG="C.UTF-8"
declare -x LC_ALL="C.UTF-8"
declare -x OLDPWD
declare -x PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
declare -x PWD="/ros2_ws"
declare -x ROS_DISTRO="foxy"
declare -x ROS_PACKAGE_PATH="/opt/ros/foxy/share"
declare -x ROS_VARIANT="ros_base"
declare -x SHLVL="1"
declare -x SKIP_KEYS="console_bridge fastcdr fastrtps rti-connext-dds-5.3.1 urdfdom_headers"
declare -x TERM="xterm"
declare -x http_proxy="http://172.17.0.2:3142"
bash-5.0# pipenv run rosdep install --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} --skip-keys "${SKIP_KEYS} desktop" src/ros2/variants/${ROS_VARIANT}
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
desktop: No definition of [rqt_common_plugins] for OS [alpine]
ros2doctor: No definition of [python3-rosdistro-modules] for OS [alpine]
To reiterate, the 'src' directory is the all the repos for the foxy distribution.
bash-5.0# pipenv run rosdep check --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} --skip-keys "${SKIP_KEYS} desktop" src/ros2/variants/${ROS_VARIANT}
System dependencies have not been satisfied:
apk spdlog-dev
apk py3-catkin-pkg
apk eigen-dev
apk py3-pytest
apk py3-babeltrace
apk py3-numpy
apk console_bridge-dev
apk tinyxml-dev
apk cmake
apk curl-dev
apk py3-empy
apk qt5-qtbase-dev
apk pkgconf
apk py3-pytest-cov
apk clang
apk py3-lttng
apk py3-lark-parser
apk freetype-dev
apk libx11-dev
apk libxaw-dev
apk libxrandr-dev
apk mesa-dev
apk freetype
apk qt5-qtbase
apk opencv-dev
apk tinyxml2-dev
apk py3-mock
apk uncrustify
apk assimp
apk py3-matplotlib
apk yaml-dev
apk py3-netifaces
apk clang-extra-tools
apk py3-lxml
apk py3-cryptography
apk py3-psutil
apk py3-pydocstyle
apk py3-qt5
apk py3-pycodestyle
apk sqlite-dev
apk openssl
apk cunit-dev
apk py3-mypy
apk py3-pytest-mock
apk py3-flake8
apk tango-icon-theme
apk py3-pydot
apk py3-graphviz
apk py3-pyflakes
apk bullet-dev
apk cppcheck
apk zstd-dev
apk cppunit
apk libxml2-utils
apk log4cxx-dev
ERROR[desktop]: No definition of [rqt_common_plugins] for OS [alpine]
rosdep key : rqt_common_plugins
OS name : alpine
OS version : 3.12_alpha20200428
Data:
_is_ros: true
osx:
homebrew:
packages:
- ros/foxy/rqt_common_plugins
ubuntu:
focal:
apt:
packages:
- ros-foxy-rqt-common-plugins
ERROR[ros2doctor]: No definition of [python3-rosdistro-modules] for OS [alpine]
rosdep key : python3-rosdistro-modules
OS name : alpine
OS version : 3.12_alpha20200428
Data:
debian:
- python3-rosdistro-modules
fedora:
- python3-rosdistro
gentoo:
- dev-python/rosdistro
openembedded:
- python3-rosdistro@meta-ros
rhel:
- python%{python3_pkgversion}-rosdistro
ubuntu:
- python3-rosdistro-modules
What am I doing wrong that it wont correctly filter down the system dependencies to a recursive search on ros_base?
So which dependencies do you feel are "irrelevant"?
wouldn't that be the cause of
rosdep
considering many more packages and their dependencies?rosdep
doesn't know about any variants (used to be called metapackages). It only looks at what you have in yoursrc
directory, because you add this to yourrosdep
command line:--from-paths src
. So if that directory contains more than there would be inros_base
, you'll get more dependencies.Wouldn't that be counter-intuitive behavior given the last argument provided to the rosdep command?
I don't believe ros_base should bring in mesa-dev, or anything graphical related.
--from-paths Affects the 'check', 'keys', and 'install' verbs. If specified the arguments to those verbs will be considered paths to be searched, acting on all catkin packages found there in.
Ah I see, key part being "Acting on all packages found in there". How can I have it so it doesn't act on all the packages? Is the only way trimming back the src folder to only include ros_base packages? How is that done using ros tooling?
If you're installing from src this is actually quite difficult not being able to tell it to just install dependencies for a particular package. It's because we need to use --ignore-src to ignore the packages we are going to compile.
it doesn't, but you have a full clone of everything in your
src
space.--from-paths
overrides whatever selection you give torosdep check|install|etc
.Well, why clone all repositories if you're only interested in a few?
You should be able to generate a
.rosinstall
file with just the packages inros_base
usingrosinstall_generator
:(if you'd like actual clones of the repositories, don't add
--tar
)Then use
wstool
orvcstool
to seed a workspace:Then you can use the command line you show to figure out the dependencies of
ros_base
.Documentation makes no mention of rosinstall, only cloning all using ros2.repos.