ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

ROS_LOCALHOST_ONLY doesn't allow other terminal session to see all the topics.

asked 2020-09-09 21:21:52 -0500

antoniopark gravatar image

System Summary - ROS2: eloquent - OS: Ubuntu18.04 - CPU: x86_64

Hi, I'm testing ros2 messaging with ROS_LOCALHOST_ONLY=1 option which disallows messages to be broadcasted. But strangely, if that option is enabled, only some of the topic are visible on the other terminal session: I checked with ros2 topic list. Both of the terminals have same env variables: ROS_LOCALHOST_ONLY=1, ROS_DOMAIN_ID=0. If all the topics are not shown then I would understand this feature as it is but as it shows only partial topics I'm quite confused. edited: I found that is ROS_DOMAIN_ID is not 0, then all the topics are not shown in other terminal.

Any hints about this will be appreciated.

Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2022-11-16 16:18:34 -0500

You need to make sure that the following variables are correct in both devices: ROS_LOCALHOST_ONLY, ROS_DOMAIN_ID and RMW_IMPLEMENTATION.

For example, I was able to make the communication between two machines very different (an ubuntu machine and an android machine both in galactic) making sure those three are aligned for both processes of both machines:

ROS_DOMAIN_ID=45 ROS_LOCALHOST_ONLY=0 RMW_IMPLEMENTATION=rmw_fastrtps_cpp ros2 topic echo /test
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-09-09 21:15:34 -0500

Seen: 462 times

Last updated: Nov 16 '22