ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

How to get smach_viewer to work?

asked 2019-07-31 20:56:34 -0500

Frimann gravatar image

I'm trying to get smach_viewer to work on Ubuntu 18.04 using ROS Melodic, and I'm spinning endlessly down the python module import spiral! :)

I'm wondering if there are some directions online how to get smach_viewer to work?

So far I've done the following:

Used pip to install:

pyyaml
rospkg

Used apt to install

ros-melodic-smach-viewer
python-wxgtk3.0
python-gobject
python-gtk2

I'm now stuck at this error saying:

$rosrun smach_viewer smach_viewer.py
wxversion 2.8 is not installed, installed versions are ['3.0-gtk3']
wxversion 2.8 is not installed, installed versions are ['3.0-gtk3']

(smach_viewer.py:11503): GLib-GObject-WARNING **: 01:50:46.763: cannot register existing type 'GdkDisplayManager'

(smach_viewer.py:11503): GLib-CRITICAL **: 01:50:46.763: g_once_init_leave: assertion 'result != 0' failed

(smach_viewer.py:11503): GLib-GObject-CRITICAL **: 01:50:46.763: g_object_new_with_properties: assertion 'G_TYPE_IS_OBJECT (object_type)' failed

Now I'm not sure if I've installed the right packages, but I managed to get past all the import statements :) Anyone ot a clue how to get the smach_viewer working?

regards Frimann

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2020-09-05 09:34:02 -0500

Combinacijus gravatar image

It's not direct answer to your question but maybe someone could find it useful. First make sure if you are using sim_time (use_simtime = true or in other words you are playing data from bag files) that you are actually playing bag file with --clock because smach_viewer won't show anything if clock is not published.

Also make sure to start IntrospectionServer.

I'm using Melodic Ubuntu 18.04 and it somehow started to work. My normal terminal output:

rosrun smach_viewer smach_viewer.py 
wxversion 2.8 is not installed, installed versions are ['3.0-gtk3']
wxversion 2.8 is not installed, installed versions are ['3.0-gtk3']

(smach_viewer.py:9336): Gtk-WARNING **: 17:23:15.839: gtk_disable_setlocale() must be called before gtk_init()

(smach_viewer.py:9336): Gtk-WARNING **: 17:23:16.118: Negative content height -11 (allocation 1, extents 6x6) while allocating gadget (node entry, owner GtkEntry)

(smach_viewer.py:9336): Gtk-WARNING **: 17:23:16.118: Negative content height -11 (allocation 1, extents 6x6) while allocating gadget (node button, owner GtkToggleButton)

(smach_viewer.py:9336): Gtk-WARNING **: 17:23:16.118: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node spinbutton, owner GtkSpinButton)

(smach_viewer.py:9336): Gtk-WARNING **: 17:23:16.118: Negative content height -12 (allocation 0, extents 6x6) while allocating gadget (node entry, owner GtkSpinButton)
edit flag offensive delete link more
0

answered 2019-08-01 03:38:15 -0500

manox gravatar image

Some time ago we also wanted to use smach and the viewer, but it resulted in implementing our own viewer as the smach viewer had to many problems. Now, we completely switched to flexbe (http://wiki.ros.org/flexbe) wich is the way to got in my opinion. It is also based on smach, has a nice viewer and is under active development.

edit flag offensive delete link more

Comments

Thanks for the hint. I've switched to FlexBE, and so far so good!

Frimann gravatar image Frimann  ( 2019-08-07 07:06:59 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2019-07-31 20:56:34 -0500

Seen: 1,417 times

Last updated: Sep 05 '20