ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
imu_tools
is not released (http://wiki.ros.org/imu_tools and https://github.com/ros/rosdistro/blob/master/hydro/distribution.yaml#L2671-2675) 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 --deps-only --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.
2 | No.2 Revision |
imu_tools
is not released (http://wiki.ros.org/imu_tools and https://github.com/ros/rosdistro/blob/master/hydro/distribution.yaml#L2671-2675) 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 --deps-only --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.