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

How to specify buffer size in roscpp? [closed]

asked 2020-12-07 03:20:56 -0500

Rufus gravatar image

I am having a similar problem described here and here. The proposed solution is to increase the buf_size argument in the creation of the subscriber. However, I am using roscpp and there is no buf_size argument for NodeHandle::subscribe.

How do I increase buf_size in roscpp so that my subscriber with queue size 1 can always get the most up-to-date data?

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by Rufus
close date 2020-12-08 00:26:05.826731

Comments

1

The answer to your question is in the last comment to the answer of the first question you link to. :-) if this is enough, please consider closing this as a duplicate

mgruhler gravatar image mgruhler  ( 2020-12-07 05:12:27 -0500 )edit
2

@mgruhler wrote:

The answer to your question is in the last comment to the answer of the first question you link to. :-)

Just to avoid any confusion, this is the comment he refers to:

@ahendrix wrote:

The roscpp TCP transport does not have a buff_size argument. It reads the incoming message length, allocates a buffer of the required size, and then reads the entire incoming message in a single read.

gvdhoorn gravatar image gvdhoorn  ( 2020-12-07 08:11:07 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-12-07 05:18:48 -0500

navdlee gravatar image

updated 2020-12-07 05:21:03 -0500

On the assumption this is actually an X Y problem: If you are using roscpp, it is probably more appropriate to use the image_transport package when transporting images over your ROS network.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2020-12-07 03:20:56 -0500

Seen: 519 times

Last updated: Dec 07 '20