Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
flow_chart_visualization [2013/04/10 12:02] – [Definition of interaction] adminflow_chart_visualization [2013/04/10 14:37] – [Installation] admin
Line 4: Line 4:
  
 {{ :flowchart-vis.png?800 |}} {{ :flowchart-vis.png?800 |}}
 +
 +===== Installation =====
 +
 +The code is part of the knowrob_addons stack and can be found in the following repository:
 +  git clone https://github.com/knowrob/knowrob_addons.git
 +  rosmake flowchart_vis
 +  rosrun flowchart_vis flowchart_vis /path/to/img.svg
 +
  
 ===== Requirements on the SVG files ===== ===== Requirements on the SVG files =====
Line 15: Line 23:
 The actions to be performed when an element has been clicked are defined in a yaml file that must be in the same folder as the svg and have the same filename (apart from the extension...). Three kinds of interaction are supported: The actions to be performed when an element has been clicked are defined in a yaml file that must be in the same folder as the svg and have the same filename (apart from the extension...). Three kinds of interaction are supported:
   * Executing Java methods: Static Java methods can be specified using IRIs of the form java:%%//%%<namespace+class>#<method>()   * Executing Java methods: Static Java methods can be specified using IRIs of the form java:%%//%%<namespace+class>#<method>()
-  * Querying the KnowRob knowledge base: +  * Querying the KnowRob knowledge base: Prolog queries are described by 'prolog:%%//%%<query>' 
-  * Calling ROS services:+  * Calling ROS services: ROS services can be called (with either no arguments or those of type string) by service:%%//%%<node>/<service-name>#<argument>' 
 + 
 +The following example of a [[http://en.wikipedia.org/wiki/YAML|YAML file]] defines three actions for the IDs //prac//, //importer// and //tracking//. As mentioned earlier, the corresponding blocks are called //block_<id>//.
  
   actiondefs:   actiondefs:
-    importer : 'prolog://query(a, B, C), a2(C)' 
     prac     : 'java://org.prac.main.PracInfer#doStuff()'     prac     : 'java://org.prac.main.PracInfer#doStuff()'
 +    importer : 'prolog://query(a, B, C), a2(C)'
     tracking : 'service://hand_tracking/start#startTracking'     tracking : 'service://hand_tracking/start#startTracking'