Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to see all currently used packages?

Tags:

ros

I implemented a ros package that depends on some other packages.
These packages depend on even more packages and so on...

How can I find out which packages are actually used when building and running nodes in my package?
(Except for looking at ALL the package.xml files manually, because there are multiple cases in which some packages are listed there but already deprecated and not actually used anymore)

So I'm looking for something like a tool/command/script that can list all actual package dependencies.

like image 322
Cold_Class Avatar asked Jan 28 '26 18:01

Cold_Class


1 Answers

I think you can do this natively with rospack. To see everything a package depends on (including dependencies of dependencies) without duplicates, just do

rospack depends my_package

You can get it formatted with indents to see all dependency chains of each package (will include duplicates across chains if more than one package shares the same dependency):

rospack depends-indent my_package

And if you only wanted to know the immediate dependencies of your package, you can do:

rospack depends1 my_package

I'm not sure that addresses the problem you identify that it shouldn't identify deprecated dependencies, but if a package is still specifying a dependency explicitly in a package.xml, how is the system to know that isn't really a dependency? It'd be better to get those package.xml files up to date.

like image 98
adamconkey Avatar answered Jan 30 '26 08:01

adamconkey



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!