Ask Your Question
0

Use rosdep to install dependencies from workspace, but only selected

asked 2019-03-07 10:06:09 -0500

kutschkem gravatar image

updated 2019-03-07 10:07:44 -0500

gvdhoorn gravatar image

I want to build a selected subset of the ROS2 distribution, so what I am trying is to combine --from-paths with selecting the packages I need. But either I am doing something wrong or this is not supported:

Neither of these work, all output given path 'xxxxx' does not exist

$ rosdep install --from-paths src --ignore-src --rosdistro ardent -y --os=ubuntu:bionic src/ament/ament_cmake src/ros2/rosidl_defaults src/ros2/rclcpp src/ros2/common_interfaces src/ros2/rcl_interfaces

$ rosdep install --from-paths src --ignore-src --rosdistro ardent -y --os=ubuntu:bionic ament/ament_cmake ros2/rosidl_defaults ros2/rclcpp ros2/common_interfaces ros2/rcl_interfaces

$ rosdep install --from-paths src --ignore-src --rosdistro ardent -y --os=ubuntu:bionic ament_cmake rosidl_defaults rclcpp common_interfaces rcl_interfaces
edit retag flag offensive close merge delete

Comments

I don't believe this is a supported use-case for rosdep.

Either you use --from-paths and point it to (a) directy(ies) that contain the packages for which you want to install the (transitive) dependencies, or you give it (a) package name(s) for which you want to install the (transitive) dependencies.

I want requirements of the built packages to be resolved inside the workspace first. But I don't want to install the dependencies for ALL ardent packages, just the set that is necessary to build my application.

wouldn't this be done by pointing rosdep to your package(s)? I don't understand why you still point rosdep to the complete workspace first.

Note: --from-paths does not mean: look for the pkgs that I provide as further arguments in this directory. It means: gather all pkgs in this directory and install their dependencies.

gvdhoorn gravatar imagegvdhoorn ( 2019-03-11 02:38:25 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-03-07 10:10:26 -0500

gvdhoorn gravatar image

updated 2019-03-11 04:39:40 -0500

rosdep accepts a list of pkgs as positional arguments, but you're given it directories. Is that perhaps why it's not working?

Also -- but I'm not sure: it could be that --from-paths is taking precedence here. Can you explain why you have both --from-paths (which is a "package selection" mechanism) and specify package names manually?

Could you also include the exact error message? It might be important to know what "path 'xxxxx'" really is.


Edit: I don't believe this is a supported use-case for rosdep.

Either you use --from-paths and point it to (a) director(y)(ies) that contain the packages for which you want to install the (transitive) dependencies, or you give it (a) package name(s) for which you want to install the (transitive) dependencies.

I want requirements of the built packages to be resolved inside the workspace first. But I don't want to install the dependencies for ALL ardent packages, just the set that is necessary to build my application.

wouldn't this be done by pointing rosdep to your package(s)? I don't understand why you still point rosdep to the complete workspace first.

Note: --from-paths does not mean: look for the pkgs that I provide as further arguments in this directory. It means: gather all pkgs in this directory and install their dependencies:

 --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.

Edit 2:

This answer could be improved by an example of how to use rosdep to install dependecies of one of the packages in the workspace (That is a supported use case, right?!). http://wiki.ros.org/ROS/Tutorials/rosdep is not really clear in that regard.

Doesn't section 1.1 cover that? From the link you post:

1.1 rosdep

rosdep is a tool you can use to install system dependencies required by ROS packages.

Usage:

rosdep install [package]

Download and install the system dependencies for turtlesim:

$ rosdep install turtlesim

And please note that the page you link does not appear to be part of the "official" documentation of rosdep. I believe the wiki/rosdep page is more up-to-date. In your case particularly the section wiki/rosdep - Using rosdep would seem to cover your question.

edit flag offensive delete link more

Comments

@gvdhoorn Yes, I use --from-paths to point to a complete ros2 ardent release workspace, and I want requirements of the built packages to be resolved inside the workspace first. But I don't want to install the dependencies for ALL ardent packages, just the set that is necessary to build my application. The end goal is a minimal docker container with my application and the necessary subset of the ardent packages needed.

kutschkem gravatar imagekutschkem ( 2019-03-11 02:34:48 -0500 )edit

This answer could be improved by an example of how to use rosdep to install dependecies of one of the packages in the workspace (That is a supported use case, right?!). http://wiki.ros.org/ROS/Tutorials/rosdep is not really clear in that regard.

kutschkem gravatar imagekutschkem ( 2019-03-11 04:32:03 -0500 )edit

I do agree that rosdep docs could stand some improvement btw.

gvdhoorn gravatar imagegvdhoorn ( 2019-03-11 04:37:05 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-03-07 10:06:09 -0500

Seen: 129 times

Last updated: Mar 11