Run ROS on multiple networks?

asked 2018-09-25 02:15:02 -0500

wmmc88 gravatar image

So the robot I'm working on has roscore running on a computer with two networks, one 900 mhz network and one 2.4 ghz network. The idea is to have high bandwidth messages (ex. videostreams from various cameras) go through the 2.4 ghz network and have crucial communciations (ex. joy msgs, other control msgs) to go through the 900mhz network.

What is the proper way to set this up? Is there even a way to constrain the nodes to only publish on a certain network(either 900mhz, 2.4ghz, or both) depending on which node it is?

edit retag flag offensive close merge delete


Natively I don't think such fine grained control over the IPs/networks that nodes use/bind to is supported.

Would it be an option to use two VPNs with custom routes on the involved machines?

A multimaster setup may also help.

gvdhoorn gravatar image gvdhoorn  ( 2018-09-25 02:59:54 -0500 )edit

A multimaster setup might work for what i want. but does that mean ill have 4 roscore's running? 2.4ghz + 900mhz on laptop + 2.4 + 900 on robot jetson tx2. are there any downsides to this setup?

wmmc88 gravatar image wmmc88  ( 2018-09-25 03:25:11 -0500 )edit

By setting ROS_IP properly you should be able to bind a roscore to a certain IP. This might even remove the need for the VPNs. I'm not sure how nodes treat this btw (ie: if they also only bind on ROS_IP). You'd have to test. Custom routing would still be needed.

gvdhoorn gravatar image gvdhoorn  ( 2018-09-25 04:19:05 -0500 )edit

re: 4 roscores: no, that's not needed I think. I'd run a roscore on the robot in any case (so that even when it loses wireless it can still continue to function. This all hinges on whether nodes will bind to a certain IP I believe. Then you could do routing based on destination.

gvdhoorn gravatar image gvdhoorn  ( 2018-09-25 04:20:57 -0500 )edit