roslibrust icon indicating copy to clipboard operation
roslibrust copied to clipboard

rosnode info does not work

Open Carter12s opened this issue 1 year ago • 3 comments

root@Moonboi:/# rosnode info /talker_rs 
--------------------------------------------------------------------------------
Node [/talker_rs]
Publications: 
 * /my_point [geometry_msgs/PointStamped]

Subscriptions: None

Services: None


contacting node http://Moonboi:32975 ...
Traceback (most recent call last):
  File "/opt/ros/noetic/bin/rosnode", line 35, in <module>
    rosnode.rosnodemain()
  File "/opt/ros/noetic/lib/python3/dist-packages/rosnode/__init__.py", line 812, in rosnodemain
    sys.exit(_rosnode_cmd_info(argv) or 0)
  File "/opt/ros/noetic/lib/python3/dist-packages/rosnode/__init__.py", line 640, in _rosnode_cmd_info
    rosnode_info(node, options.quiet)
  File "/opt/ros/noetic/lib/python3/dist-packages/rosnode/__init__.py", line 598, in rosnode_info
    print(get_node_connection_info_description(node_api, master))
  File "/opt/ros/noetic/lib/python3/dist-packages/rosnode/__init__.py", line 537, in get_node_connection_info_description
    businfo = _succeed(node.getBusInfo(ID))
  File "/usr/lib/python3.8/xmlrpc/client.py", line 1109, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python3.8/xmlrpc/client.py", line 1450, in __request
    response = self.__transport.request(
  File "/usr/lib/python3.8/xmlrpc/client.py", line 1153, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python3.8/xmlrpc/client.py", line 1183, in single_request
    raise ProtocolError(
xmlrpc.client.ProtocolError: <ProtocolError for Moonboi:32975/RPC2: 501 Not Implemented>

Carter12s avatar Oct 20 '24 12:10 Carter12s

DEBUG [roslibrust::ros1::node::xmlrpc] New node xmlrpc connection AddrStream { inner: PollEvented { io: Some(TcpStream { addr: 127.0.1.1:32975, peer: 127.0.0.1:34936, fd: 12 }) }, remote_addr: 127.0.0.1:34936, local_addr: 127.0.1.1:32975 }
DEBUG [roslibrust::ros1::node::xmlrpc] getPid called by [String("/rosnode")]
WARN  [roslibrust::ros1::node::xmlrpc] Client attempted call function getBusInfo which is not implemented by the Node's xmlrpc server.

Decide if we want to support getBusInfo

Carter12s avatar Oct 20 '24 12:10 Carter12s

image

If we decide to not support (maybe only Python nodes support?) we should figure out what the C++ nodes respond with and respond with the same things so rosnode info doesn't crash.

Carter12s avatar Oct 20 '24 12:10 Carter12s

@DiracFermi1411

This may be a good issue for you to try tackling while we get a little more organized on the ROS2 implementation front.

This issue will get you inside the internals of our ROS1 backend so you can see how things are plumbed out, and what we might have to build for ROS2.

If you look inside https://github.com/RosLibRust/roslibrust/blob/master/roslibrust_ros1/src/node/xmlrpc.rs you'll see that we have no implementation of "getBusInfo" or "getBusStats" which is probably what is causing rosnode info to crash on our node. I think if we even sent back dummy payloads it would improve the situation, but ideally we could actually reply correctly with the state of our connections. Providing a "correct" response may involve some significant changes so I would start with setting up a dummy response and setting up an integration test that invokes rosnode info via the command line.

Carter12s avatar Sep 15 '25 15:09 Carter12s