ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Not sure if an easy solution exists. Here are 3 possible options:

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) If there are only a couple of figures you want to produce, an easier options is printing the dot file in view_frames (print it to file at line 129 in your view_frames script). Then you can manipulate it by hand to fit appropriately and visualize it using the dot command.

3) Modify the graph in an SVG editor. I personally have never used one of these, so I cannot comment on it.

click to hide/show revision 2
updated solution after more information from comment

Not sure if EDIT: If there are only a couple of figures, an easy solution exists. Here are 3 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 options: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) If there are only a couple of figures you want to produce, an easier options is printing the dot file in view_frames (print it to file at line 129 in your view_frames script). Then you can manipulate it by hand to fit appropriately and visualize it using the dot command.

3) Modify the graph in an SVG editor. I personally have never used one of these, so I cannot comment on it.