D2 is a tidy new diagramming language. ros-d2 can be used to generate .d2 files from a ROS2 environment (tested in galactic and humble). Why? I wanted to be able to make pretty architectural diagrams and the first step was to be able to export our current ROS architecture. If this is useful to other people I’ll add some more features!
Yep. It is similar to http://wiki.ros.org/rqt_graph which provides far more features than this for runtime introspection. I didn’t actually look at what sort of data structure rqt uses and if it can be exported… Maybe I should (although I’d like to avoid it as a dependency).
I was really after a simple, serialisable, themeable data format which is why I liked the look of .d2. Critically, I wanted to be able to write it by hand as part of the architecture/design step and potentially add integration tests which make sure the implementation matches the system design.