Re: [ros-users] Latency of subscriber callback for large amo…

Forside
Vedhæftede filer:
Indlæg som e-mail
+ (text/plain)
+ (text/html)
Slet denne besked
Besvar denne besked
Skribent: User discussions
Dato:  
Til: User discussions
Emne: Re: [ros-users] Latency of subscriber callback for large amount ofdata
Troy,

I have ran into this same problem many times when working with sockets. Is there a reason not to turn off the nagel algorithm by default. Turning off the Nagel algorithm would seem to be the default behavior for small messages. This would result in more network traffic, but this is probably what is desired (i.e. messages arriving as they are sent, instead of buffered).

-Shaun


________________________________
From: [] on behalf of Kim, Yoonsoo []
Sent: Wednesday, October 12, 2011 9:46 PM
To: User discussions
Subject: Re: [ros-users] Latency of subscriber callback for large amount of data

Thanks a lot!
It works!

- Yoonsoo

2011/10/13 Troy Straszheim <<mailto:straszheim@willowgarage.com>>
Thanks for the reproducable bug report... I get the same behavior, so
long as the packets are small enough.. above 10k or so I don't see
this behavior. This looks like like Nagel's algorithm at work, try
setting TCP_NODELAY on the subscriber, like this:

#include <ros/transport_hints.h>
ros::Subscriber sub = n.subscribe("chatter", 1000, chatterCallback,

ros::TransportHints().tcpNoDelay());
_______________________________________________
ros-users mailing list
<mailto:ros-users@code.ros.org>
https://code.ros.org/mailman/listinfo/ros-users