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

ROS Topics Data Communication over separate networks

asked 2021-09-10 11:01:04 -0500

Raza Rizvi gravatar image

I want to send ROS Topic data from one ROS Master to another ROS Master. Both ROS Masters are on different networks. There is a limitation in my project for which I am receiving some data through a different connection, and some data through another connection. Now, I want to send all the data to just one ROS master where everything is happening.

edit retag flag offensive close merge delete

Comments

Are you talking about something like #q344294?

gvdhoorn gravatar image gvdhoorn  ( 2021-09-11 05:05:51 -0500 )edit

No. In that case, the network connection is the same. In my case, the separate machines have different network connections that belong to different pools.

Raza Rizvi gravatar image Raza Rizvi  ( 2021-09-11 05:21:38 -0500 )edit

I believe you're going to have to provide more information for people to be able to help you. Right now it's unclear what you're trying to do exactly.

Perhaps include a concrete example of the flow of data you're envisioning.

As a quick note however:

Now, I want to send all the data to just one ROS master where everything is happening.

There is nothing 'happening' in the ROS master. It's not involved in data exchange between nodes. It only helps setting up connections.

gvdhoorn gravatar image gvdhoorn  ( 2021-09-11 05:35:14 -0500 )edit

In question #q223371recommends: http://wiki.ros.org/multimaster_fkie

Have you considered this solution?

osilva gravatar image osilva  ( 2021-09-14 08:30:47 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-09-29 15:09:47 -0500

Raza Rizvi gravatar image

I was able to solve this problem by bridging two network adapters into one Virtual Machine. One adapter was the Wireless Adapter of my laptop, and the second one was the ethernet adapter of my laptop.

After bridging the two separate adapters into one Virtual Machine and connecting the adapters to separate networks, I was able to get two IP Addresses in one machine and was able to communicate to two separate networks using these two IP Addresses.

edit flag offensive delete link more

Comments

Ingenious solution

osilva gravatar image osilva  ( 2021-09-29 15:28:30 -0500 )edit

Haha thanks, don't forget to vote for this solution.

Raza Rizvi gravatar image Raza Rizvi  ( 2021-09-29 15:29:25 -0500 )edit

So in the end you just needed a multi-homed host? That doesn't require multiple NICs on most OS. You can assign multiple IPs to the same NIC.

gvdhoorn gravatar image gvdhoorn  ( 2021-09-30 01:58:41 -0500 )edit

No, I wanted to connect to two separate networks inside one PC. So for that, I used two separate network adapters and connected them to separate networks. In doing so, and lunching one ROS Master, I was able to get all the ROS topics from both the separate networks, into just one ROS Master inside the PC.

Raza Rizvi gravatar image Raza Rizvi  ( 2021-09-30 08:34:04 -0500 )edit

Unless they're physically separated networks, all you need is a router.

But if you're happy, we're happy.

gvdhoorn gravatar image gvdhoorn  ( 2021-09-30 13:12:01 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-09-10 11:01:04 -0500

Seen: 332 times

Last updated: Sep 29 '21