Note: This page describes experimental code that has not been used in a while. Please try it at your own risk.
The flow chart visualizer allows to load SVG files and to define actions that are to be taken when the user clicks on the elements in the graphics. It is designed as a convenient way of showing processing pipelines and calling processing steps. All rectangular shapes can be turned into click-sensitive areas by defining (in a .yaml file accompanying the .svg) which action is to be taken when the user clicks on the respective element.
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
The SVG files need to be created in a special way for the system to work:
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 following example of a YAML file defines three actions for the IDs prac, importer and tracking. As mentioned earlier, the corresponding blocks are called block_<id>.
actiondefs: prac : 'java://org.prac.main.PracInfer#doStuff()' importer : 'prolog://query(a, B, C), a2(C)' tracking : 'service://hand_tracking/start#hand_tracking.srv.StartTracker&startTracking'