Ask Your Question
0

disable ros topics

asked 2020-05-31 05:12:02 -0500

dinesh gravatar image

I am running some ros nodes like camera, audio and joy publisher in one ros network. And it is creating lots of lag and latency because it looks like since all other unneccessary topics are also passed from same network it is eating the bandwidth. image description So how can i make only certial ros topics to be passed from the network so that the passed topics will have more real time feature?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2020-06-01 05:04:52 -0500

gvdhoorn gravatar image

updated 2020-06-01 05:09:22 -0500

Unless you're forcing these topics to be "passed" (are you using a multimaster setup?) no traffic should be generated unless there are actual subscribers. No subscribers -> no data transfer.

You'll have to provide more information about what it is exactly you are doing, as right now, this is unanswerable (and should actually not even be a problem).

As to your screenshot: the Topic Monitor actually subscribes to topics to calculate bandwidth and rate. So that would immediately mean you create a subscriber. Same as rostopic hz and rostopic bw.


Edit: this topic comes up every now and then. For (future) readers: if there are no subscribers to a topic, no data is being transferred. It doesn't matter whether that is on the same machine, on the same network, on another network or to the other side of the world.

edit flag offensive delete link more

Comments

I'm not using multimaster setup. i'm running one master in controller and slave in robot. and every topic is image_raw/compreesed, audio, mobile_base_conttroller/cmd velocity has been subscribed in one or another machine. Is it better to use ros 2 considering the multiple topics has to be passed from network?

dinesh gravatar image dinesh  ( 2020-06-01 05:44:23 -0500 )edit

every topic is image_raw/compreesed, audio, mobile_base_conttroller/cmd velocity has been subscribed in one or another machine.

Do you know why they are subscribed to? Again: only if there are subscribers will data be transferred.

If you have subscribers for them (I guess other than RQT Topic Monitor), then it would seem those are needed.

it looks like since all other unneccessary topics are also passed from same network it is eating the bandwidth

which topics are unnecessary exactly? Unnecessary topics wouldn't have subscribers, would they?

gvdhoorn gravatar image gvdhoorn  ( 2020-06-01 06:48:53 -0500 )edit

like /cam1/image_raw i'm not subscribing this topic in any node, but still it is taking lot of bandwidth more than /cam1/image_raw/compressed. and other small topics like cap1/image/theroa etc. so does it means that if only compressed image is being subscribed the raw image will not pass from network?

dinesh gravatar image dinesh  ( 2020-06-01 06:55:05 -0500 )edit

If you quit RQT Topic Monitor, and run rostopic info /cam1/image_raw, how many subscribers does that return? And make sure to try this on a freshly started system.

gvdhoorn gravatar image gvdhoorn  ( 2020-06-01 06:58:33 -0500 )edit

ok. got it. those which topics are not subscribed by any node, they don't pass through network.

dinesh gravatar image dinesh  ( 2020-06-01 07:18:48 -0500 )edit

Exactly.

So do you now understand your question is a bit strange?

Why "disable topics" if they do not contribute to the total volume of traffic?

Also: none of the topics are useless (from a network traffic perspective), as, if they were useless, they'd probably not have any subscribers. And if they don't have any subscribers, they don't contribute to the network traffic, so there would be no problem in having them there.

gvdhoorn gravatar image gvdhoorn  ( 2020-06-01 07:22:06 -0500 )edit

Could you please mark the question as answered by ticking the checkmark (✓) to the left of the answer if you feel it has been answered? Thanks.

gvdhoorn gravatar image gvdhoorn  ( 2020-06-01 07:51:10 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-05-31 05:12:02 -0500

Seen: 27 times

Last updated: May 31