Ask Your Question
7

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

Hello.

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/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/opt/ros/indigo/lib/smach_viewer/smach_viewer.py", line 848, in _update_graph
    self.set_dotcode(dotstr,zoom=False)
  File "/opt/ros/indigo/lib/smach_viewer/smach_viewer.py", line 866, in set_dotcode
    if self.widget.set_dotcode(dotcode, None):
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/wxxdot.py", line 455, in set_dotcode
    self.set_xdotcode(xdotcode)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/wxxdot.py", line 483, in set_xdotcode
    self.graph = parser.parse()
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line 1146, in parse
    DotParser.parse(self)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line 951, in parse
    self.parse_graph()
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line 960, in parse_graph
    self.parse_stmt()
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line 993, in parse_stmt
    self.parse_subgraph()
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line 974, in parse_subgraph
    self.parse_stmt()
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line 993, in parse_stmt
    self.parse_subgraph()
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line 974, in parse_subgraph
    self.parse_stmt()
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line 1009, in parse_stmt
    self.handle_node(id, attrs)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line 1120, in handle_node
    shapes.extend(parser.parse())
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line 608, in parse
    points = self.read_polygon()
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line 503, in read_polygon
    x, y = self.read_point()
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", line 486, in read_point
    x = self.read_number()
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xdot/xdot.py", 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

Comments

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
14

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

hashi gravatar image

Hi,

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/xdot.py

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

edit flag offensive delete link more

Comments

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
0

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

Alicja gravatar image

Thanks, worked for me on Hydro

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

4 followers

Stats

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

Seen: 1,822 times

Last updated: Jul 01 '14