-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Variable ROS_LOCALHOST_ONLY (to avoid broadcasting) does not work with micro-ros client/agent #49
Comments
Hello @anaelle-sw, I'm not sure to have understood this well:
|
Hi @pablogs9 ! Sorry it wasn't clear. Let me precise a bit more our use case: On our system, we have a computer on which run ROS nodes. Some of theses nodes need to receive/send data to a Teensy board. On this board, we run a single micro-ROS-arduino node, and on the computer we run a micro-ROS-agent. Communication between the board and the agent is done via serial communication. Everything used to work fine this way. The problem is that the ROS nodes running on the computer, as well as the micro-ROS-arduino node running on the Teensy board, are broadcasting on the WiFi network that the computer has access to. The result is that we can access the ROS nodes running on a system from another system. But we don't want our systems to be able to communicate between them. So, more than specifying a domain ID, we really need to make secured our system and avoid any ROS and micro-ROS-arduino node been broadcasted on a network. The solution we found to secure this is to set up this environment variable on our system's computer:
So, to answer your questions:
|
The first solution that cames to my mind is:
I have not tested this, but it should work. Maybe we should discuss what
Thoughs @jamoralp? |
For reference, it used to be an issue on standard ROS2 nodes too: https://answers.ros.org/question/333687/restrict-ros-2-to-localhost/ |
It would be nice of this behavior would be enabled by simply reading the |
Hi @pablogs9! For now, we are using distinct node = rcl_get_zero_initialized_node();
rcl_node_options_t node_ops = rcl_node_get_default_options();
node_ops.domain_id = 56;
RCCHECK(rclc_node_init_with_options(&node, "micro_ros_teensy_node", "", &support, &node_ops)); But using this, if system A includes a Teensy board A, then we are still able to catch the node running on the board A by calling About the reference file solution, as @doisyg said, we would enjoy a more easy way to not allow network broadcasting. For now, we will keep the |
Regarding the domain ID problem, maybe @jamoralp can tell us something about how the Regarding the localhost isolation, we are working right now on version 2.0.0 of XRCE-DDS, when we finish maybe we can design some solution for this. I'll keep this open to remember it. |
Hello @anaelle-sw we have been testing this and we found a XML profile that works for your purposes: <dds>
<profiles>
<transport_descriptors>
<transport_descriptor>
<transport_id>udp_localhost</transport_id>
<type>UDPv4</type>
<interfaceWhiteList>
<address>127.0.0.1</address>
</interfaceWhiteList>
</transport_descriptor>
</transport_descriptors>
</profiles>
<participant>
<rtps>
<name>default_xrce_participant</name>
<useBuiltinTransports>false</useBuiltinTransports>
<userTransports>
<transport_id>udp_localhost</transport_id>
</userTransports>
</rtps>
</participant>
</dds> Using this, the micro-ROS participants created in an Agent will only be able to talk "ROS 2" using You can set this profile using this guide: https://micro-ros.github.io/docs/tutorials/core/create_dds_entities_by_ref/ I'm going to close since it is almost resolved. But if you try it and it does not work please reopen this same issue. Thanks!! |
Hi @pablogs9, The link mentioned in your previous reply seems to be broken. Is there any example of this in the updated docs? |
I think the doc is now here: https://micro.ros.org/docs/tutorials/advanced/create_dds_entities_by_ref/ |
Hi. I have the same problem as @anaelle-sw had and I didn't succeed to solve it using the ref file as @pablogs9 suggested. I'm using Ubuntu 20.4 and ROS2 humble (compiled from source) inside docker container the runs on Jetson Xavier nx. Thanks! |
Hello! We would like to not broadcast the ROS topics on our WiFi network. We can't find out how to do so, while running micro-ROS agent and client.
System:
Steps to follow:
In order to avoid to broadcast the ROS topics we set up this environment variable on our system:
export ROS_LOCALHOST_ONLY=1
.It works great for our ROS nodes running on this system, the topics are not broadcasted.
Issues:
Question:
How can we avoid broadcasting ROS topics on our WiFi network, but still normally use micro-ROS?
Thanks for helping!
The text was updated successfully, but these errors were encountered: