Smach - NameError: gloabl name 'roslib' is not defined

asked 2020-05-19 10:14:36 -0500

JK gravatar image

I'm having trouble with smach viewer. I get the following error:

[ERROR] [1589894430.434649]: bad callback: <bound method SmachViewerFrame._status_msg_update of <__main__.SmachViewerFrame; proxy of <Swig Object of type 'wxFrame *' at 0x27a8000> >>
Traceback (most recent call last):
    File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/", line 750, in _invoke_callback 
    File "/opt/ros/kinetic/lib/smach_viewer/", line 842, in _status_msg_update
    if container.update_status(msg):
    File "/opt/ros/kinetic/lib/smach_viewer/", line 191, in update_status
NameError: global name 'roslib' is not defined

I have a smach state machine that seems to be working fine, and even though I am able to run the smach viewer node and see my state machine tree the smach viewer node keeps spamming me with this error. It doesn't seem to come from my code as it is in /opt/ros/kinetic/lib/smach_viewer/, but what do I know. I have tried to reinstall smach and smach viewer, but that didn't help. I tried to add import roslib to see what would happen, and got a ResourceNotFound error.

I have installed ros-kinetic-executive-smach version 2.0.1, and ros-kinetic-executive-smach-visualization version 2.0.2 which are the versions I get using sudo apt install. I'm running Ubuntu 16.04 and ROS Kinetic.

edit retag flag offensive close merge delete