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

ROS Indigo :Cannot show Graph View on smach_viewer

asked 2014-06-03 10:27:07 -0500

hashi gravatar image

updated 2014-07-01 07:54:52 -0500

BennyRe gravatar image


My development environment is Ubuntu14.04 and ROS Indigo.

I tried to execute ROS service as a smach state and it works correctly.

But, when I run smach_viewer, the following errors occured and print nothing. (I think smach_viewer can print this graph in Ubuntu12.04 + ROS Hydro :'()

error message

Exception in thread Thread-6:
Traceback (most recent call last):
  File "/usr/lib/python2.7/", line 810, in __bootstrap_inner
  File "/usr/lib/python2.7/", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/opt/ros/indigo/lib/smach_viewer/", line 848, in _update_graph
  File "/opt/ros/indigo/lib/smach_viewer/", line 866, in set_dotcode
    if self.widget.set_dotcode(dotcode, None):
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/", line 455, in set_dotcode
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/", line 483, in set_xdotcode
    self.graph = parser.parse()
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/", line 1146, in parse
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/", line 951, in parse
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/", line 960, in parse_graph
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/", line 993, in parse_stmt
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/", line 974, in parse_subgraph
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/", line 993, in parse_stmt
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/", line 974, in parse_subgraph
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/", line 1009, in parse_stmt
    self.handle_node(id, attrs)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/", line 1120, in handle_node
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/", line 608, in parse
    points = self.read_polygon()
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/", line 503, in read_polygon
    x, y = self.read_point()
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/", line 486, in read_point
    x = self.read_number()
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/", line 480, in read_number
    return int(self.read_code())
ValueError: invalid literal for int() with base 10: '274.67'

  • When I run the command below, $ rostopic echo /server_name/smach/container_status I receive msg like this.

header: seq: 5 stamp: secs: 1401776891 nsecs: 761457920 frame_id: '' path: /SM_ROOT initial_states: ['SPAWN'] active_states: ['None'] local_data: � }q. info: HEARTBEAT

Many thanks,

edit retag flag offensive close merge delete


Hey have you solve this problem? I have the same on Ubuntu 14.04. with Indigo.

Andreas T. gravatar image Andreas T.  ( 2014-06-30 03:15:36 -0500 )edit

2 Answers

Sort by » oldest newest most voted

answered 2014-06-30 18:41:31 -0500

hashi gravatar image


Even though I still get an "TypeError: String or Unicode type required",a graph appeared on Smart a Viewer

when I rewrote the 480th row of the /opt/ros/indigo/lib/python2.7/dist-packages/xdot/

return int(self.read_code()) -> return int(float(self.read_code()))

edit flag offensive delete link more


Thanks it works.

Andreas T. gravatar image Andreas T.  ( 2014-07-07 03:09:52 -0500 )edit

thanks, is this a valid bug in smach?

hsu gravatar image hsu  ( 2014-07-31 14:03:57 -0500 )edit

Sorry, I'm not sure yet.

hashi gravatar image hashi  ( 2014-08-03 21:40:23 -0500 )edit

I confirm this solves the problem for me using Indigo under Ubuntu 14.04

Mehdi. gravatar image Mehdi.  ( 2014-08-05 00:07:08 -0500 )edit

This fixed the problem, but unmasked another. I now consistently get "segmentation faults" when attempting to run the smach_viewer. Anybody run into this problem? Or suggest where I should post this question?

ROS: Indigo OS: Ubuntu 14.04 python-wx: 2.8

noe.eon gravatar image noe.eon  ( 2014-09-18 11:55:47 -0500 )edit

I got sporadic segfault errors too but I had it also before when the states weren't visualized. @hashi I signaled your solution here: link text

Wedontplay gravatar image Wedontplay  ( 2014-11-06 17:03:50 -0500 )edit

answered 2015-02-11 10:03:47 -0500

Alicja gravatar image

Thanks, worked for me on Hydro

edit flag offensive delete link more

Question Tools



Asked: 2014-06-03 10:27:07 -0500

Seen: 3,934 times

Last updated: Jul 01 '14