Ask Your Question
0

Installing all ros dependencies of a single package rather than the entire workspace

asked 2019-07-05 01:14:50 -0500

vuwij1 gravatar image

Hello, I want to run something like rosdep install package and have it traverse the list of packages that it depends and install all system and distribution dependencies

Example of my situation

  • package_b depends on package_a
  • package_c depends on package_a
  • package_a depends on system_dependency_e
  • package_b depends on system_dependency_f

I want to execute something like

rosdep install package_a --some-commands

and install a, b, e, and f

However when I execute that rosdep install always returns something like ERROR: the following packages/stacks could not have their rosdep keys resolved to system dependencies: package_b: Cannot locate rosdep definition for [package_a]

But when I run

rosdep install -i package_b

It only installs b and f

My workaround is to do rosdep install -i $(rospack depends package_a)

But rospack requires all files to be in $ROS_PACKAGE_PATH

and $ROS_PACKAGE_PATH only gets generated when the workspace is sourced

and the workspace is only sourced after you build the workspace

Can anyone help?

edit retag flag offensive close merge delete

Comments

2

Do I understand you correctly when I believe that #q326140 is asking for the same thing ("How to rosdep install dependencies of one package?")? Does the work-around I posted there not work for you?

gvdhoorn gravatar imagegvdhoorn ( 2019-07-05 08:18:27 -0500 )edit

Well that seems a bit too hardcoded. I was hoping for a automatic way to add all rospackages into the $ROS_PACKAGE_PATH without having to manually type, and my question was asking if foo depends on bar, to install all packages for both foo and bar, rather than just foo. But not including the rest of the packages in the workspace

vuwij1 gravatar imagevuwij1 ( 2019-07-11 02:20:37 -0500 )edit

I was hoping for a automatic way to add all rospackages into the $ROS_PACKAGE_PATH without having to manually type

I'm not sure I understand: whatever is added to ROS_PACKAGE_PATH will be crawled recursively. You only need to add the src space of the workspace, not each and every pkg individually.

my question was asking if foo depends on bar, to install all packages for both foo and bar, rather than just foo. But not including the rest of the packages in the workspace

So you want rosdep to install all dependencies of foo, recursively, including those of bar, but only if foo depends on bar somehow?

gvdhoorn gravatar imagegvdhoorn ( 2019-07-11 02:26:00 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-07-11 02:30:44 -0500

gvdhoorn gravatar image

updated 2019-07-11 02:30:55 -0500

So what about a combination of what you show here and #q326140?

Something like:

ROS_PACKAGE_PATH=/path/to/your/catkin_ws/src:$ROS_PACKAGE_PATH \
  rosdep install -i $(rospack depends package_a)
edit flag offensive delete link more

Comments

I see this answers my question. the thing i didn't know is that ROS_PACKAGE_PATH is crawled recursively. Thank you!

vuwij1 gravatar imagevuwij1 ( 2019-07-11 02:37:37 -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

Stats

Asked: 2019-07-05 01:14:50 -0500

Seen: 63 times

Last updated: Jul 05