The new build tool `colcon` which has been introduced with ROS 2 Bouncy does provide a way to output:
* a list of dependencies for a package (`colcon info <pkgname>`)
* the topological ordered list of packages using "ASCII art" (`colcon list -g`)
* a dot graph to visualize the dependency hierarchy (`colcon list --topological-graph-dot | dot -Tpng -o deps.png`)
For the last two you can narrow the set of shown packages by using `--packages-select[-regex]` or similar options.