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.