EDIT: If there are only a couple of figures, an easy solution is to modify the frames.gv
file that gets generated when you run rosrun tf view_frames
. You can modify this file to best represent the graph. The corresponding graph can then be generated using the dot
command:
dot -Tpdf frames.gv -o frames.pdf
Other possible solutions:
1) If you want this to be done automatically, then it is a fairly difficult problem. It is easy to generate the dot file from the tf tree, but extra work needs to be done reason about the layout. You will have to figure out a way to get the tree from TransformListener
and generate a dot
file appropriately with some layout information. See how the current dot
file is generated here.
2) Modify the graph in an SVG editor. I personally have never used one of these, so I cannot comment on it.