robosoft-ai/SMACC

smacc viewer not displaying state properly

shovington opened this issue · 1 comments

I followed the step for a first instalation properly and the sm_atomic seams to work fine, but the smacc_viewer is not.
I am using ros noeetic with ubuntu 20.04.

rosrun smacc_viewer smacc_viewer_node.py

(smacc_viewer_node.py:808713): Gtk-WARNING **: 09:42:45.322: gtk_disable_setlocale() must be called before gtk_init()
[INFO] [1672929765.687923]: starting update server list
[INFO] [1672929765.691413]: ['/SmAtomic']
/opt/ros/noetic/lib/smacc_viewer/smacc_viewer_node.py:316: wxPyDeprecationWarning: Call to deprecated item __call__. Use :meth:`EvtHandler.Bind` instead.
  wx.EVT_CLOSE(self, self.on_btn_cancel)
[INFO] [1672929765.724968]: status connections: 1
[INFO] [1672929766.072995]: transition log msg received
[INFO] [1672929766.226825]: STARTING GRAPH PLOTTING. Current state: None
[INFO] [1672929766.229294]: [SmaccViewer] plotting state: sm_atomic::State1
[INFO] [1672929766.231540]: [SmaccViewer] plotting state: sm_atomic::State2
[INFO] [1672929766.233712]: STATE STR PLOTTING COMPLETE. Now plotting transitions.
[INFO] [1672929766.235709]: [STATE STR PLOTTING COMPLETE]

A bunch of numbers...

[INFO] [1672929766.276144]: status connections: 1
Traceback (most recent call last):
  File "/opt/ros/noetic/lib/python3/dist-packages/smacc_viewer/xdot/xdot.py", line 127, in draw
    layout = self.layout
AttributeError: 'TextShape' object has no attribute 'layout'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/ros/noetic/lib/python3/dist-packages/smacc_viewer/xdot/wxxdot.py", line 212, in OnPaint
    self.graph.draw(ctx, highlight_items=self.highlight)
  File "/opt/ros/noetic/lib/python3/dist-packages/smacc_viewer/xdot/xdot.py", line 516, in draw
    shape.draw(cr)
  File "/opt/ros/noetic/lib/python3/dist-packages/smacc_viewer/xdot/xdot.py", line 129, in draw
    layout = PangoCairo.create_layout(cr)
TypeError: Expected cairo.Context
[INFO] [1672929766.728114]: ['/SmAtomic']
[INFO] [1672929766.779388]: status connections: 1
Traceback (most recent call last):
  File "/opt/ros/noetic/lib/python3/dist-packages/smacc_viewer/xdot/xdot.py", line 127, in draw
    layout = self.layout
AttributeError: 'TextShape' object has no attribute 'layout'

I tired to install manualy the xdot library thinking I might have the wrong version intalled, but it throwed other error like:

Traceback (most recent call last):
  File "/opt/ros/noetic/lib/smacc_viewer/smacc_viewer_node.py", line 2051, in <module>
    main()
  File "/opt/ros/noetic/lib/smacc_viewer/smacc_viewer_node.py", line 2037, in main
    frame = SmaccViewerFrame()
  File "/opt/ros/noetic/lib/smacc_viewer/smacc_viewer_node.py", line 476, in __init__
    self.widget = wxxdot.WxDotWindow(graph_view, -1)
  File "/opt/ros/noetic/lib/python3/dist-packages/smacc_viewer/xdot/wxxdot.py", line 151, in __init__
    self.graph = Graph()
NameError: name 'Graph' is not defined

Can you help me with it?

┆Issue is synchronized with this Jira Task by Unito

Hi @shovington
After going back and forth internally on this one, we finally decided that its time to retire the SMACC Viewer.
But we've got a solution for you.

We backported the SMACC Run-Time Analyzer to ROS1, and you can find it here, with installation instructions here.
Its free for academic and personal use.

Please let us know if you have any problems.