0
$\begingroup$

Rosanswers logo

Hello, We are trying to publish only one topic from raspberry pi to an offboard computer recently.The topic contains image data acquire by the onboard camera, and we want to use the data to calculate the control command. Setting our offboard computer as ROS Master seems not to be a good solution, because it would send all of the topics, and this may cause serious network delay.

Does anyone know how to send a single topic to another computer? Both raspberry pi and offboard computer are Ubuntu16.04, Kinetic


Originally posted by michael1874888 on ROS Answers with karma: 1 on 2018-03-13

Post score: 0

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

Setting our offboard computer as ROS Master seems not to be a good solution, because it would send all of the topics, and this may cause serious network delay.

I think the ROS Master is only responsible for setting up the initial peer-to-peer connection between a publisher/subscriber when calls are made to advertise/subscribe, then the communicating nodes send and receive messages directly over TCP. Therefore, you should only have to think about topics published by nodes on the Raspberry Pi and subscribed to by nodes on the offboard computer or vice-versa, not all of the topics in your whole system.


Originally posted by JamesGiller with karma: 229 on 2018-03-14

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by michael1874888 on 2018-03-14:
Yes, you're right. I'm new to ROS. I may have misunderstood some basic concepts. However, when I perform formation control, some topics seem to have lost information. Is this related to the setting of queue and buffer?

Comment by JamesGiller on 2018-03-14:
In order to help, I need to know what exactly do you mean by "lost information"? If you think you chose the wrong queue size, have a look at this: http://wiki.ros.org/rospy/Overview/Publishers%20and%20Subscribers#Choosing_a_good_queue_size

It's a rospy page, but still applicable to C++.

$\endgroup$
0
$\begingroup$

Rosanswers logo

Hi,

I think you should have a look at multimaster.

With multimaster you can have two different roscores running on your machines and decide which topics you want to exchange between them. You can have either a one way communication or a two way comminucation.

For instance, if you have your machines M1 and M2, and three topics: T1, T2, T3, you can easily set up the following scenario:

M1 --- T1 ---> M2

M1 <--- T2 --- M2

M1 <--- T3 ---> M2

I have some launch file examples in my repo on Bitbucket.

Regards,

Marco.


Originally posted by Femer with karma: 253 on 2018-03-14

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by gvdhoorn on 2018-03-14:
Multimaster is definitely interesting, but I believe the OP has a basic misunderstanding of how ROS works which has led him to post this question. Let's see if we can clear that up first.

+1 for suggesting multimaster though, it can be helpful in situations with remote robots.

Comment by michael1874888 on 2018-03-14:
Thanks! We will give it a try.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.