[ros-users] Nodelet image transfer performance

Cartwright, Joel J J.J.Cartwright at hw.ac.uk
Fri Sep 17 08:01:48 UTC 2010


Hi all,

I've been running some rough performance tests on transferring images
using nodelets, and have found the overhead to be higher than I
expected. For reference, I'm running ROS cturtle on Ubuntu 10.04 64 bit
(stock kernel 2.6.32-24-generic) on a 2 GHz Intel Core 2 Duo laptop. CPU
use monitored approximately using htop.

Exchanging one 1920x1280 bgr8 image at 10 fps incurs ~30% CPU use for
the nodelet manager. As expected, this is better than when the nodelets
are run standalone (then ~25% CPU each), but I wanted to check if I'm
doing something wrong that might affect nodelet performance. I've been
using raw Image publishing rather than image_transport, to keep the test
as simple as possible.

The image 'source' is just an uninitialised unsigned char array of the
correct size. As a comparison, I created a node that merely copies the
source array a number of times, and found that 5 memcpy operations
produce about the same CPU load as the best nodelet case, around 30%.
Of course CPU caching may improve the speed of those 5 consecutive
memcpy operations, so I'm not saying "ROS is copying the data 5 times".

I've attached the relevant source files. The question is: Is this the
best we can do at present for image transfer, and if not, are there
modifications on the horizon that will improve performance?

Joel
-- 
Research Assistant
Ocean Systems Laboratory
Heriot-Watt University, UK


-- 
Heriot-Watt University is a Scottish charity
registered under charity number SC000278.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/ros-users/attachments/20100917/863d6dce/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: raw_image_pub_test.cpp
Type: text/x-c++src
Size: 1146 bytes
Desc: raw_image_pub_test.cpp
URL: <http://lists.osuosl.org/pipermail/ros-users/attachments/20100917/863d6dce/attachment-0012.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: raw_image_sub_test.cpp
Type: text/x-c++src
Size: 787 bytes
Desc: raw_image_sub_test.cpp
URL: <http://lists.osuosl.org/pipermail/ros-users/attachments/20100917/863d6dce/attachment-0013.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: copy_image_test.cpp
Type: text/x-c++src
Size: 993 bytes
Desc: copy_image_test.cpp
URL: <http://lists.osuosl.org/pipermail/ros-users/attachments/20100917/863d6dce/attachment-0014.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image_const.h
Type: text/x-chdr
Size: 200 bytes
Desc: image_const.h
URL: <http://lists.osuosl.org/pipermail/ros-users/attachments/20100917/863d6dce/attachment-0004.h>


More information about the ros-users mailing list