What we want: Sidebar
We want the userdata sidebar to be able to toggle between the following data sources (which may or may not exist yet)…
- Event Log (Event Name, Parent?, Timestamp, ElapsedTime)
- State Log (Event Name, Parent?, Timestamp, Elapsed Time
- Transition Log (Transition Name, Parent, Timestamp, Elapsed Time)
- State Machine Stats (Event Count, State Count, Total States, Timestamp, Elapsed Time)
- State Machine Variables
- Current State Variables
What we want: Controls
We want the following buttons added
- + Zoom In
- – Zoom Out
- -> Pan Right
- <- Pan Left
- ^ Pan Up
- v Pan Down
What we want: Buttons
We want 4 buttons (taken from PackML) that will each send a message on a topic…
What we currently have SMACC state_machine_base.h set up as the introspection server
See lines 356, 401, 440 & 591
and we’re using these msgs…
We will need to fork this package as well, and modify the SMACC Viewer to use smacc_msgs, to add the debug messages that will turn the SMACC Viewer into the IDE we need.
This is the main file… (Adapted from Johnathon Bohren’s Smach viewer)
The SMACC viewer is written in python, and itself is a wrapper for the xdot package written by Jonathon Fonseca, and uses the dot language (which is what graphviz/doxygen use).
Outcomes = transition::destination
Userdata = state local data (& perhaps state machine local data)
From the readme…
When I do a search for record, in this repo, the only things that return are in the /test folder. So I think that xdot doesn’t support records & mrecords, and may require a pull request, forking, etc.
The relevant parts of the code are in these two files…
The idea being to create a record class in elements.py and a function to deal with the class in parser.py – I think.
Although there are alternatives to xdot.py (see bottom of xdot.py’s github page above for a good set of links), Jonathon Bohren seems to have spent some time integrating xdot and the smach viewer, so currently I (Brett) am of the opinion is that we should fork xdot to support mrecords. xdot.py is not a huge package or anything.
Here is a link to the up-to-date documentation
From the first paragraph on this page…
"The record-based shape has largely been superseded and greatly generalized by HTML-like lables." That is, intead of using shape=record, one might consider using shape=none, margin=0 and an HTML-like label."
Here is a code sample that appears to be right up our alley..
For a nice little primer on the dot language (used by graphviz & smach viewer)
See below for a nice set of examples…
I think this is an interesting option for development…