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

Rviz slows down publisher when subscribed to /map topic?

asked 2022-04-06 11:44:53 -0600

nigeno gravatar image

updated 2022-04-07 12:16:53 -0600

Ubuntu 20.04 ROS2 Foxy C++

Why would Rviz slow down the program running /map publisher when subscribed to the topic?

The following error pops up. The map is displayed but getting updated agonizingly slow.

~$ rviz2 rviz2
[INFO] [1649261852.934675573] [rviz2]: Stereo is NOT SUPPORTED
[INFO] [1649261852.934911179] [rviz2]: OpenGl version: 3.1 (GLSL 1.4)
[INFO] [1649261853.023261324] [rviz2]: Stereo is NOT SUPPORTED
[INFO] [1649262370.083874343] [rviz2]: Trying to create a map of size 400 x 200 using 1 swatches
[ERROR] [1649262370.087614431] [rviz2]: Vertex Program:rviz/glsl120/indexed_8bit_image.vert Fragment Program:rviz/glsl120/indexed_8bit_image.frag GLSL link result : 
active samplers with a different type refer to the same texture image unit

Update:

Bandwidth of the /map publisher drops from 600KB/s to 50KB/s

Frequency drops from 7Hz to 0.4Hz.

BTW it's not only Rviz, with plotjuggler program I see the same slowdown.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-04-14 11:49:58 -0600

nigeno gravatar image

updated 2022-04-14 11:50:54 -0600

Ok, the reason was pretty obvious. The publisher is located on one machine, and the subscriber (Rviz or Plotjugger or any other) is located on another remote machine connected through local Wif-Fi network. I expect that the publisher was waiting for a callback from the subscriber, and since the network was slow to pass a message, the publisher was getting slowed down. It actually was confirmed by sending a smaller message in size, which accelerated the publisher.

It was confusing because I didn't close the Rviz on the remote machine when I was testing if local Rviz slowed down the process. And I thought the error message somehow was affecting the speed, but it didn't.

Here's the related question: ros2-image-publisher-slows-down-on-subscription

The question which remains open yet, wtf is this error message about?:) But it's another topic.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-04-06 11:44:53 -0600

Seen: 1,346 times

Last updated: Apr 14 '22