ROS topic and services routing

asked 2019-03-25 08:24:53 -0600

muttidrhummer gravatar image

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

edit retag flag offensive close merge delete

Comments

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

gvdhoorn gravatar imagegvdhoorn ( 2019-03-25 08:30:06 -0600 )edit

everything is on a single local machine

muttidrhummer gravatar imagemuttidrhummer ( 2019-03-25 08:34:21 -0600 )edit

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 ...(more)

Reamees gravatar imageReamees ( 2019-03-25 09:03:51 -0600 )edit

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".

gvdhoorn gravatar imagegvdhoorn ( 2019-03-25 09:39:50 -0600 )edit