Hi @RafalGorecki, in my case I can see the topics with ros2 topic list command, but I am not able to get any actual topic content through to the host.
For instance ros2 topic echo on any topic would not work and wait indefinitely, and when opening rviz on the host, you have access to the topic list as well, but it does not display anything (including the image example mentioned in the first tutorial).
When running ros2 topic echo from the within the container instance, it keeps trowing errors regardless which topic is tested (see below):
ros2 topic echo /clock
Traceback (most recent call last):
File “/opt/ros/humble/bin/ros2”, line 33, in
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’”)
On the other hand, running an Rviz container instance alongside the one launch via ROSBOT_SIM provides access to the image topic /camera/color/image_raw, so there is still some content being communicated within docker containers instances. To display some other data type (LIDAR points, …) you need to change the fixed frame to something different than map as this is missing in the model. So data are accessible within the container but not from the host, while I thought the topic content would still be accessible from host as well.
Thank you,
Nicolas