github地址:https://github.com/bponsler/roslaunch_to_dot
从github上面clone下来即可使用
git clone https://github.com/screamlsj/roslaunch_to_dot.git
进入下好的文件夹
运行.py文件,如下
./roslaunch-to-dot.py --png ~/Documents/ros/src/freenect_stack/freenect_launch/launch/kinect-xyz.launch kxyz.dot
效果如下:
更多使用方法见:
usage: roslaunch-to-dot.py [-h] [--landscape] [--aspect-ratio ASPECTRATIO]
[--png] [--svg] [--pdf]
[--disable-groups]
[--show-node-type]
[--show-rosparam-nodes]
launchFile outputFile [arg [arg ...]]
Create a dot graph file from a ROS launch file.
positional arguments:
launchFile path to the desired launch file
outputFile the output dot file to save
arg override an arg specified anywhere in the launch file
tree
optional arguments:
-h, --help show this help message and exit
--landscape display the nodes from left to right instead of top to
bottom
--aspect-ratio ASPECTRATIO
the approximate aspect ratio desired (default =
8.5/11)
--png automatically convert the dot file to a PNG
--svg automatically convert the dot file to a SVG
--pdf automatically convert the dot file to a PDF
--disable-groups don't group nodes/launch files based on their package
--show-node-type label ROS nodes with their type in addition to their
name
--show-rosparam-nodes
display nodes and connections for all rosparam files
used