ros-visualization / rqt_common_plugins

45 stars 132 forks source link

rqt_top) Most of psutil missing in deb (groovy) #105

Closed dlaz closed 11 years ago

dlaz commented 11 years ago

psutil in the repo looks fine, but all that's showing up in the deb version is init.py(c). This makes rqt_top unable to display any info.

ablasdel commented 11 years ago

It sounds like the install rules are setup incorrectly. I will look into this.

ablasdel commented 11 years ago

Could you tell me what ubuntu distribution you are running? Also 32bit or 64bit? Apparently there are known platforms this doesn't work on currently: http://ros.org/wiki/rqt_top

ablasdel commented 11 years ago

@dlaz @130s I have noticed mentions all over of installing psutil as a work around. Where can I get more info on what/why we are doing this?

dlaz commented 11 years ago

12.04 64 bit. psutil is being packaged with rqt_top because the version available on Precise is missing some required features.

ablasdel commented 11 years ago

Not sure why it didn't click in my brain that you opened this ticket yourself dlaz! I was treating it like a community created ticket. Carry on and I will get out of your way!

dlaz commented 11 years ago

No worries. I'm not very familiar with how the packaging happens which is why I created a ticket rather than just fixing it.

ablasdel commented 11 years ago

Ahh ok to test what your package will put in the debian use "catkin_make install" Everything that shows up in the install dir will end up in your debian I believe. Try this and see if all the files show up where you want them.

Most likely what is going on is that you need to add a cmake install rule for the psutil workaround.

dirk-thomas commented 11 years ago

The embedded psutil is incomplete. It only contains the Python code but not the platform dependent libraries. Therefore it only works when the installed Debian package is new enough.

dirk-thomas commented 11 years ago

Please try the branch of pull request #109 on a precise machine and verify that it works with the Debian version of psutil (0.4.1)/

ablasdel commented 11 years ago

... and i should not have merged that before reading this comment...

dirk-thomas commented 11 years ago

Since you merged it already go ahead and check it on a Precise machine now :smile:

ablasdel commented 11 years ago

Doing so! But my my computer just crashed for an unrelated reason. I will test this ASAP

ablasdel commented 11 years ago

Sorry for my haste. I tested this on a 64 bit precise machine and nothing shows up in the rqt_top window when running a simple talker and listener node pair.

ablasdel@jnu:/wg/stor5/ablasdel/groovy_sandbox/beginner_tutorials  $rosnode list
/listener_17445_1375480960972
/rosout
/rqt_gui_py_node_16569
/talker_17279_1375480937887
dirk-thomas commented 11 years ago

With no error messages on the console?

ablasdel commented 11 years ago

Nope nothing I can see.

ablasdel commented 11 years ago

I am of the mind the close button is really not in the right place on github...

dirk-thomas commented 11 years ago

Your description does not really match any expectation: it should either work without error messages or produce a stacktrace and not load the widget at all.

Can you please make sure to uninstall the ros-groovy-rqt-top package, install python-psutil, checkout the branch of rqt_common_plugins and try it then?

ablasdel commented 11 years ago

That did the trick!

PluginManager._load_plugin() could not load plugin "rqt_top/TOP":
Traceback (most recent call last):
  File "/opt/ros/groovy/lib/python2.7/dist-packages/qt_gui/plugin_handler.py", line 93, in load
    self._load()
  File "/opt/ros/groovy/lib/python2.7/dist-packages/qt_gui/plugin_handler_direct.py", line 54, in _load
    self._plugin = self._plugin_provider.load(self._instance_id.plugin_id, self._context)
  File "/opt/ros/groovy/lib/python2.7/dist-packages/qt_gui/composite_plugin_provider.py", line 71, in load
    instance = plugin_provider.load(plugin_id, plugin_context)
  File "/opt/ros/groovy/lib/python2.7/dist-packages/qt_gui/composite_plugin_provider.py", line 71, in load
    instance = plugin_provider.load(plugin_id, plugin_context)
  File "/opt/ros/groovy/lib/python2.7/dist-packages/rqt_gui_py/ros_py_plugin_provider.py", line 66, in load
    return super(RosPyPluginProvider, self).load(plugin_id, plugin_context)
  File "/opt/ros/groovy/lib/python2.7/dist-packages/qt_gui/composite_plugin_provider.py", line 71, in load
    instance = plugin_provider.load(plugin_id, plugin_context)
  File "/opt/ros/groovy/lib/python2.7/dist-packages/rqt_gui/ros_plugin_provider.py", line 96, in load
    return class_ref(plugin_context)
  File "/wg/stor5/ablasdel/ros_catkin_ws/rqt_common/src/rqt_common_plugins/rqt_top/src/rqt_top/top_plugin.py", line 113, in __init__
    self.update_table()
  File "/wg/stor5/ablasdel/ros_catkin_ws/rqt_common/src/rqt_common_plugins/rqt_top/src/rqt_top/top_plugin.py", line 157, in update_table
    infos = self._node_info.get_all_node_fields(self.node_fields)
  File "/wg/stor5/ablasdel/ros_catkin_ws/rqt_common/src/rqt_common_plugins/rqt_top/src/rqt_top/node_info.py", line 60, in get_all_node_fields
    processes = self.get_all_node_info()
  File "/wg/stor5/ablasdel/ros_catkin_ws/rqt_common/src/rqt_common_plugins/rqt_top/src/rqt_top/node_info.py", line 54, in get_all_node_info
    info = self.get_node_info(node_name)
  File "/wg/stor5/ablasdel/ros_catkin_ws/rqt_common/src/rqt_common_plugins/rqt_top/src/rqt_top/node_info.py", line 39, in get_node_info
    code, msg, pid = xmlrpclib.ServerProxy(node_api[2]).getPid(ID)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1224, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1578, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.7/xmlrpclib.py", line 1264, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1292, in single_request
    self.send_content(h, request_body)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1439, in send_content
    connection.endheaders(request_body)
  File "/usr/lib/python2.7/httplib.py", line 954, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 814, in _send_output
    self.send(msg)
  File "/usr/lib/python2.7/httplib.py", line 776, in send
    self.connect()
  File "/usr/lib/python2.7/httplib.py", line 757, in connect
    self.timeout, self.source_address)
  File "/usr/lib/python2.7/socket.py", line 571, in create_connection
    raise err
error: [Errno 111] Connection refused
dirk-thomas commented 11 years ago

But this error has nothing to do with psutil. Can you please try it with running only a roscore but no additional nodes?

ablasdel commented 11 years ago

When I bring it up without any other nodes it comes up fine but is empty.

Are you coming today? I could show you my setup.

dirk-thomas commented 11 years ago

I verified it on another Precise machine here and it works fine.

I will come later to Willow and will take a look what's wrong with your setup.

130s commented 11 years ago

First of all, thanks all for fixing my commit!

1) I'm trying with 96624aef2cc90c2d5c470fd9b98155b56b096a16 merged into hydro, and saw the same error @ablasdel saw earlier on rqt_gui with:

terminal-1$ roscore  (that had been running for awhile)
terminal-2$ roslaunch pr2_moveit_tutorials planning_pipeline_tutorial.launch

This stopped occurring after I rebooted both, particularly roscore. ros-hydro-rqt-top deb was removed.

2) Now I see rqt_top's widget with no processes shown on it, with the same launch file.

$ ps awx|grep ros/hydro/
 4114 pts/4    Sl+    0:00 /usr/bin/python /opt/ros/hydro/bin/roscore
 4128 ?        Ssl    0:01 /usr/bin/python /opt/ros/hydro/bin/rosmaster --core -p 11311 __log:=/home/rosquid/.ros/log/7936eca8-fee1-11e2-b4ae-88532e0fe6e6/master.log
 4141 ?        Ssl    0:00 /opt/ros/hydro/lib/rosout/rosout __name:=rosout __log:=/home/rosquid/.ros/log/7936eca8-fee1-11e2-b4ae-88532e0fe6e6/rosout-1.log
 4153 pts/1    Sl+    0:01 /usr/bin/python /opt/ros/hydro/bin/roslaunch pr2_moveit_tutorials planning_pipeline_tutorial.launch
 4174 ?        Ssl    0:00 /opt/ros/hydro/lib/tf/static_transform_publisher 0 0 0 0 0 0 odom_combined base_footprint 100 __name:=virtual_joint_broadcaster_0 __log:=/home/rosquid/.ros/log/7936eca8-fee1-11e2-b4ae-88532e0fe6e6/virtual_joint_broadcaster_0-1.log
 4185 ?        Ssl    0:01 /usr/bin/python /opt/ros/hydro/lib/joint_state_publisher/joint_state_publisher __name:=joint_state_publisher __log:=/home/rosquid/.ros/log/7936eca8-fee1-11e2-b4ae-88532e0fe6e6/joint_state_publisher-2.log
 4189 ?        Ssl    0:02 /opt/ros/hydro/lib/robot_state_publisher/robot_state_publisher __name:=robot_state_publisher __log:=/home/rosquid/.ros/log/7936eca8-fee1-11e2-b4ae-88532e0fe6e6/robot_state_publisher-3.log
 4207 ?        Ssl    0:46 /opt/ros/hydro/lib/rviz/rviz -d /opt/ros/hydro/share/pr2_moveit_config/launch/moveit.rviz __name:=rviz_130s_serval_4153_6349975472031451123 __log:=/home/rosquid/.ros/log/7936eca8-fee1-11e2-b4ae-88532e0fe6e6/rviz_130s_serval_4153_6349975472031451123-4.log
 5608 pts/5    Sl     0:03 /usr/bin/python /opt/ros/hydro/bin/rqt

python-psutil 0.4.1-1ubuntu1 is installed via rosdep install rqt_top. Precise 64b

ablasdel commented 11 years ago

Dirk fixed that on my machine. I believe he reinstalled the package but I am not certain. I'm sure he will post when he has a moment. It isn't an issue with commit but with the machine configuration.

dirk-thomas commented 11 years ago

You have to uninstall the current Debian package if you want to try the latest version from source since it provides an incomplete version of psutil.

130s commented 11 years ago

Current deb of rqt_top was removed as I updated my post...

130s commented 11 years ago

Now I verified the d730faf works on Precise w/o psutil. Looks like when I couldn't run it as expected, I was still having psutil installed under ROS directory (/opt/ros/groovy/lib/python2.7/dist-packages/psutil/) even after I apt-get purge rqt_toped for some reason. Now the folder is completely deleted, either by purge or by a combination of apt-get install -reinstall rqt_top and purge. Strange.