Robotics StackExchange | Archived questions

ROS topic and services routing

Hello to everyone, is it possible to route all the topics and services to a specific network interface in case of more than one network interface? In my case i have an Ethernet card that i need to use for a "real time " communication and all the topics that i'm using are currently disturbing this communication and increasing latency. My idea was to create a fake interface and use this for topic and services exchange. Is there way or a better idea to do this? Thanks

Asked by muttidrhummer on 2019-03-25 08:24:53 UTC

Comments

Is this a multi-host setup, or is everything local to a single machine?

Asked by gvdhoorn on 2019-03-25 08:30:06 UTC

everything is on a single local machine

Asked by muttidrhummer on 2019-03-25 08:34:21 UTC

I have not really tried anything like this and not entirely sure what the problem is, but you could definitely make a fake interface and run your ROS things through that. Easiest thing I can think of to accomplish the ROS part of this would be to set up ROS_MASTER_URI and ROS_IP on the terminals you run roscore and your nodes in to use the ip from that interface. Usually you would use those variables to set up multiple computers on a network to communicate with each other, but I can't see why you couldn't use them to isolate ROS from the rest of the setup. ROS environment variables.

Lets say you have a fake interface running and your ip on that interface is 10.0.0.2. Then running export ROS_MASTER_URI=http://10.0.0.2:11311 && export ROS_IP=10.0.0.2 in the terminals you intend to run your ROS stuff in should isolate ROS to that interface.

Asked by Reamees on 2019-03-25 09:03:51 UTC

everything is on a single local machine

except the "real-time communication" then I guess?

ROS traffic entirely within a local node graph will not leave the network stack (so there's no traffic going to the network card). Only lo is used, and that is all in-memory.

Unless your PC is running out of resources, segregating ROS traffic to a fake interface is probably not going to have much effect.

Perhaps you can clarify what you mean by "disturbing this communication".

Asked by gvdhoorn on 2019-03-25 09:39:50 UTC

Answers