RCTaskViz

From Olympus
Jump to: navigation, search

RCTaskViz is a visualization tool for the Ravenclaw task tree specification file. It produces images like Media:Taskviz-linked.pdf.

RCTaskViz parses the task structure and produces a png of the graph as well as the canonical text version (dot file) compatible with AT&T's GraphViz.

Requirements

In order to run it you'll need GraphViz and Perl with the IPC::Run3 module.

Note that if Matlab is installed, it's version of dot.exe may conflict with the Graphviz one.

I have no reason to believe that it wouldn't work with linux, but I've only tried this running under Cygwin and native Windows so far... TK 02:58, 17 December 2008 (UTC)

Running

Run with the task tree specification file as an argument.

 perl RCTaskViz.pl [-o <output file>] 
                   [-g | -n <nets dot file> | -p <phoenix grammar and forms root>] 
                   [-s <node label font size>] [-l <title>] [-t <graph title font size>]
                   [-u <max children per level>] [-v] [-w <x> -h <y>] <dialog task filename>

Description of switches and Arguments:

-o <output file> 
path to the generated png file
-g 
include grammars from request agents and expect agents
-n <nets dot file> 
tie in the grammar nets dot file to the request agents and expect agents
-p <phoenix grammar and forms root> 
this is the directory and head file name with the phoenix grammar and forms file, if set to ../dir/x it will look for ../dir/x.gra and ../dir/x.forms
-s <node label font size> 
sets the size of the graph labels
-l <title> 
display the specified label on the graph as the title
-t <graph title font size> 
sets the font size of the graph title in -l
-u <max children per level> 
attempt to unflatten the graph, this improves the aspect ratio of task trees that are too bushy. Indicates how many children of any node can be at the same visual level
-v 
indicates the graph should be laid out vertically (root at the top, leafs at the bottom) instead of horizontally (root on the left, leafs on the right)
-w <x> 
give me an image with the following width in inches
-h <y> 
give me an image with the following height in inches

The png will be produced in that directory as taskviz.png and the canonical text format will be produced as taskviz.txt. If a width or height is specified, it will produce a postscript file (taskviz.ps) instead of a png.

Examples of usage

  • For a horizontal tree:
 perl RCTaskViz.pl -l "The LetsGoPublic Task Tree (12/19/2007)" 
                   -o \Projects\LetsGoPublic\Documents\LetsGoPublic_task_tree_horiz.png 
                   \Projects\LetsGoPublic\Agents\LetsGoPublicDM\LetsGoPublicDialogTask.cpp
  • For a vertical tree:
 perl RCTaskViz.pl -l "The LetsGoPublic Task Tree (12/19/2007)" 
                   -o \Projects\LetsGoPublic\Documents\LetsGoPublic_task_tree.png 
                   -v -u 2
                   \Projects\LetsGoPublic\Agents\LetsGoPublicDM\LetsGoPublicDialogTask.cpp
Personal tools