ros/rospack

add circular dependency detection/help (04/08/12)

mirzashah opened this issue · 2 comments

Migrated from code.ros.org, issue #3919
Reported by: tfoote
https://code.ros.org/trac/ros/ticket/3919

Description

Right now rospack just errors when the recursion depth is too deep. This error could easily be extended to detect and print the full cycle of the self recursion.

It would help people in this situation: http://answers.ros.org/question/12626/circular-dependency

Change History

follow-up: ↓ 2 Changed 9 months ago by gerkey

priority changed from major to minor
status changed from new to assigned
type changed from defect to enhancement
Indeed, that would be useful. In the meantime, you can do something like

rospack deps-indent > foo
Ctrl-C it after a bit, then look at the file to try to figure out where things go off the rails.

http://ros.org/doc/api/rospkg/html/rospack.html#rospack-depends-indent-package

in reply to: ↑ 1 Changed 9 months ago by gerkey

Replying to gerkey:

{{{ rospack deps-indent > foo }}}

That should have a package name in it, e.g.:

rospack deps-indent my_package > foo

I am running into circular dependencies as well, but have tried the rospack deps-indent command (in fuerte) to find the source, but it merely prints the max-depth error and nothing else.

I also tried pulling up the package in ROS Package Graph (in rqt_gui). The graph looked fine with all options checked, but a similar recursion depth error occurred.

Are there other methods to check the circular dependency?

EDIT: I was able to find the cycle by hacking rosmake's engine.py and adding some print statements. Dirty hack, but worked.

Closing in favor of more descriptive #18.