ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Resolving package dependencies in a catkin ws

asked 2014-10-11 00:08:27 -0600

alainh gravatar image

updated 2014-10-11 00:09:07 -0600

I am trying to install the imu_tools package on my barebones ROS installation (Debian OS) with a catkin workspace. . Following the steps listed on their github page I run rosdep install imu_tools. To no surprise it tells me that there are some dependencies to be resolved:

ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
rviz_imu_plugin: Missing resource rviz
ROS path [0]=/root/ros_catkin_ws/install_isolated/share/ros
ROS path [1]=/root/ros_catkin_ws/install_isolated/share
ROS path [2]=/root/ros_catkin_ws/install_isolated/stacks
ROS path [3]=/root/ros_catkin_ws/src
imu_filter_madgwick: Missing resource actionlib
ROS path [0]=/root/ros_catkin_ws/install_isolated/share/ros
ROS path [1]=/root/ros_catkin_ws/install_isolated/share
ROS path [2]=/root/ros_catkin_ws/install_isolated/stacks
ROS path [3]=/root/ros_catkin_ws/src

I use rosinstall_generator --from-path ~ros_catkin_ws/src/imu_tools > imu_tools.rosinstall && rosinstall -c ~ros_catkin_ws/src imu_tools.rosinstall to find and install all the dependencies of the package.

However when I eventually build/install with catkin_make_isolated --install I get that certain packages cannot be resolved. I've hunted around the wiki pages, but I can never get this step done right.

Is there somewhere I went wrong? Is there a better way to resolve specific package dependencies?

edit retag flag offensive close merge delete

Comments

I am also interested in how to solve this. Anyone have answer?

l0g1x gravatar image l0g1x  ( 2014-11-16 16:43:49 -0600 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2014-11-17 13:39:31 -0600

William gravatar image

updated 2014-11-17 14:04:36 -0600

imu_tools is not released ( http://wiki.ros.org/imu_tools and https://github.com/ros/rosdistro/blob... ) and rosinstall_generator can only operate on packages which are released because it uses the package index cache to get the package.xml's for pacakges in order to determine their dependencies, which is created for released packages only.

The --from-path option is a bit naive and basically just looks at what packages are in the folder and expands to their names, for example:

# Given
% tree src -L 2
src
└── imu_tools
    ├── README.md
    ├── imu_filter_madgwick
    ├── imu_tools
    └── rviz_imu_plugin
% vcs st
=== ./src/imu_tools (git) ===
On branch hydro
Your branch is up-to-date with 'origin/hydro'.

nothing to commit, working directory clean
# This command:
% rosinstall_generator --from-path src
# Is equivalent to this command:
% rosinstall_generator imu_filter_madgwick imu_tools rviz_imu_plugin

So, for me rosinstall_generator gives up:

% rosinstall_generator --from-path src --rosdistro hydro --deps --deps-only --tar
The following not released packages/stacks will be ignored: imu_filter_madgwick, imu_tools, rviz_imu_plugin
No packages/stacks left after ignoring not released

Which is naive on the part of rosinstall_generator because it basically only needs to the package.xml for each package in the dependency tree. It gives up on these packages because they are not released and therefore it cannot download their package.xml's from the cache, but it isn't smart enough to know that it can instead get them locally.

You can work around this by using the catkin_pkg Python library to get the dependencies out of the packages using something like this:

% python -c "from catkin_pkg.packages import find_packages; print(' '.join(list(set([d.name for pkg in find_packages('src').values() for d in (pkg.build_depends + pkg.buildtool_depends + pkg.run_depends)]))))"

All together something like this worked for me:

% rosinstall_generator --rosdistro hydro --deps --tar `python -c "from catkin_pkg.packages import find_packages; print(' '.join(list(set([d.name for pkg in find_packages('src').values() for d in (pkg.build_depends + pkg.buildtool_depends + pkg.run_depends)]))))"` > imu_tools_deps.rosinstall
The following not released packages/stacks will be ignored: imu_filter_madgwick, rviz_imu_plugin
% rosinstall -c src imu_tools_deps.rosinstall
....

While this work around does work, I admit that rosinstall_generator should probably handle this for you.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-10-11 00:08:27 -0600

Seen: 1,493 times

Last updated: Nov 17 '14