<div class="gmail_quote">On Wed, Sep 1, 2010 at 9:46 AM, Joel Cartwright <span dir="ltr"><<a href="mailto:J.J.Cartwright@hw.ac.uk">J.J.Cartwright@hw.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

... would you have a problem with out of<br>
order messages with this script (from different publishers), and still<br>
need to sort them somehow?<br></blockquote><div><br></div><div>I'm not sure what "sorting" means here.  Messages are stored in bags with a timestamp.  That timestamp can be anything.  <font class="Apple-style-span" face="'courier new', monospace">rosbag record</font> subscribes to topics and stores the message receipt time.  No matter how the timestamps are written to the bag, the rosbag API (or <font class="Apple-style-span" face="'courier new', monospace">rosbag play</font>) will use the bag index to return the messages in chronological order based on the stored timestamp.</div>

<div><br></div><div>This script is changing the stored timestamp to be the Header timestamp.  The order will differ if the publish order is not the same as the Header timestamp order.  That's fine in Armin's use case of visualizing joint states and laser scans.</div>

<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">There the transport hints sets UDP as a preference, and falls back to<br>
TCP with the 'no delay' option set.<br>
<br>
If you need reliable transfer, you could just try the tcpNoDelay option<br>
without the UDP hint.<br></blockquote><div><br></div><div>In general, those are good suggestions.  I doubt TCP_NODELAY is the issue here - Armin's publishing laser scans at 10 Hz and seeing delays on the order of seconds.</div>

<div><br></div><div>Tim</div></div>