Hi Cedric,<br><br>I've run the test (1500x1000 images only) on my computer, and do see about a 2x speedup with shared memory over TCP (~4ms avg latency vs. ~9ms).  Nodelets have a couple orders of magnitude advantage (this test shows a ~50 microsecond latency for nodelets).  Profiling shows that in all cases most of the time is spent in memcpy, but I don't have time to investigate further.<br>


<br>Looking at the code for the pub/sub though, there seems to be a major problem with how it's structured.  Due to only a single shmem buffer being allocated per publisher and no locking going on, there is a high likelihood of:<br>


  1) Subscriber deserializing while the publisher is serializing resulting in corrupt data<br>  2) Subscriber receiving the same message multiple times (and losing intermediate messages)<br>  3) Unadvertising (publisher node gracefully exiting, for example), causing invalid data/crashes<br>

<br>Fixing these involves locking/queueing of some sort, as well as dealing with multiple subscribers and crashed nodes -- which turns the whole thing into a much larger problem.  I can't see this as being generally useful without solving these -- and to do this nicely (and automatically use sharedmemory when available) it should be done at the ROS transport level (which would also allow, for example, recording over shared memory with rosbag).<br>

<br>Josh<br>
<br><div class="gmail_quote">On Fri, May 7, 2010 at 7:13 PM, Cedric Pradalier <span dir="ltr"><<a href="mailto:cedric.pradalier@mavt.ethz.ch" target="_blank">cedric.pradalier@mavt.ethz.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


<div>Josh Faust wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Excellent!  This is good data to have -- I'll take a look at running those tests when I get back to work on Monday.<br>
<br>
Josh<br>
<br>
</blockquote></div>
Thanks. I've just noticed a mistake on the interframe plot (+1 offset on my columns index). Here is the corrected plot. It does not change the overall impression.<br>
Sorry for the spam.<div><div></div><div><br>
<br>
-- <br>
Dr. Cedric Pradalier<br>
<a href="http://www.asl.ethz.ch/people/cedricp" target="_blank">http://www.asl.ethz.ch/people/cedricp</a><br>
<br>
</div></div><br>_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org" target="_blank">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
<br></blockquote></div><br>