0
$\begingroup$

I recently had to uninstall ROS2 Iron and install ROS2 Humble using sudo apt uninstall ros-* after uninstalling I did sudo apt autoremove. After reinstalling ROS2 everything seemed fine until I tried ros2 topic echo /topic_name. It gave me the following Traceback:

 ros2 topic echo /estimated_state
Traceback (most recent call last):
  File "/opt/ros/humble/bin/ros2", line 33, in <module>
    sys.exit(load_entry_point('ros2cli==0.18.7', 'console_scripts', 'ros2')())
  File "/opt/ros/humble/lib/python3.10/site-packages/ros2cli/cli.py", line 89, in main
    rc = extension.main(parser=parser, args=args)
  File "/opt/ros/humble/lib/python3.10/site-packages/ros2topic/command/topic.py", line 41, in main
    return extension.main(args=args)
  File "/opt/ros/humble/lib/python3.10/site-packages/ros2topic/verb/echo.py", line 220, in main
    qos_profile = self.choose_qos(node, args)
  File "/opt/ros/humble/lib/python3.10/site-packages/ros2topic/verb/echo.py", line 146, in choose_qos
    pubs_info = node.get_publishers_info_by_topic(args.topic_name)
  File "/usr/lib/python3.10/xmlrpc/client.py", line 1122, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python3.10/xmlrpc/client.py", line 1464, in __request
    response = self.__transport.request(
  File "/usr/lib/python3.10/xmlrpc/client.py", line 1166, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python3.10/xmlrpc/client.py", line 1182, in single_request
    return self.parse_response(resp)
  File "/usr/lib/python3.10/xmlrpc/client.py", line 1348, in parse_response
    p.feed(data)
  File "/usr/lib/python3.10/xmlrpc/client.py", line 451, in feed
    self._parser.Parse(data, False)
  File "../Modules/pyexpat.c", line 416, in StartElement
  File "/usr/lib/python3.10/xmlrpc/client.py", line 689, in start
    raise ResponseError("unknown tag %r" % tag)
xmlrpc.client.ResponseError: ResponseError("unknown tag 'rclpy.type_hash.TypeHash'")

I can confirm that this worked before uninstallation. All of the rest of ROS2 appears to work, including ROS2 topic list, ROS2 service calls and ROS2 param get/set. I have tried with multiple topics. It seems a dependency was thrown out with autoremove. I am not sure what to do short of reflashing Ubuntu 22.04 onto this computer. Any help appreciated.

[UPDATE] I ended up wiping the computer completely and reinstalling Ubuntu 22.04. It wasn't too big of a deal since the computer was new. It seems to have fixed the issue! I am sure there is a better solution but I had to get this working relatively quickly.

$\endgroup$
1
  • $\begingroup$ Welcome to Robotics Stack Exchange! It seems a broken installation. $\endgroup$
    – ravi
    Commented Aug 31, 2023 at 2:06

1 Answer 1

0
$\begingroup$

Make sure you have sourced your workspace accordingly before you try a ros2 topic echo. secondly, try running ros2 topic list to see if the topic exists.

If those two dont resolve the error then the line:

xmlrpc.client.ResponseError: ResponseError("unknown tag 'rclpy.type_hash.TypeHash'")

would suggest there's a mismatch between the ROS 2 packages or libraries being used.

$\endgroup$
1
  • $\begingroup$ I did both of those things. The topic list had the topic listed but topic echo simply didn't work, after the fresh install of Ubuntu and ROS2, the system worked fine. As it turned out, sudo apt autoremove removed some dependencies that Humble needed, so it was indeed a mismatch in packages and/or libraries. I tried going through the list and installing them but I gave up part way through. $\endgroup$
    – Ian Reid
    Commented Feb 9 at 21:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.