What are "third party ROS packages" exactly?
Are you referring to unreleased packages?
At a high-level:
- released ROS packages and system dependencies:
rosdep
will install them for you, as long as the manifest correctly declares the dependency - unreleased ROS packages: you'll have to build them from source. Tools like dirk-thomas/vcstool (successor to
wstool
) can help you with by easily populating a workspace. Dependencies of those pkgs-to-be-built-from-sources should then again be resolved and installed using rosdep
. If they in turn have dependencies which have not been released, there is no tool which can solve this right now: where would it retrieve the necessary information? There is no authoritative way to map package names to source hosting locations.
rosinstall_generator can generate .rosinstall
files which include source entries for both selected packages and their (transitive) dependencies, but it will need information from ros/rosdistro
. Packages which have a source
entry there, typically also have been released (so using rosinstall_generator
then doesn't really make sense any more, as you could just apt install
).
Edit:
I mean binary packages in the ROS package repository and listed on https://index.ros.org.
Those would be what I refer to above as released ROS packages
The tutorial for rosdep emphasizes it is for "system" dependencies.
It is, but it will also install dependencies which are ROS packages.
The description could be tweaked a little to mention this also.
For example, rosdep install rosbridge-server
does not find the package, though I can apt-install ros-melodic-rosbridge-server
.
From what I understand, this all makes sense:
And one important thing to note: this will only work if you have the sources (or at least the package manifest) of that package on your ROS_PACKAGE_PATH
. This is a hold-over from back when rosbuild
was still used I believe and also makes sense (once you know about it): rosdep
installs dependencies and the primary use-case is installing them when building things from sources. Requiring access to the source of whatever you're trying to install dependencies for seems like an OK requirement to me.
But in any case: use direct invocations of apt install <pkg_name>
only when you install individual packages. For dealing with dependencies of packages you build from source, try to avoid directly calling apt
. Under the right circumstances, it should not be needed.
If so, is there a different tool to automate installing third-party ROS dependencies from information in my package.xml
file based on which ROS release the end-user is using?
If you haven't released your own package and users must build it from source in their/a Catkin workspace, rosdep
would be the tool to install all dependencies. System dependencies and dependencies ... (more)