[ros-users] Fwd: publishing large images at high fps using image_transport

Dejan Pangercic dejan.pangercic at gmail.com
Mon Apr 19 16:18:08 UTC 2010


Hi Brian,

thx for this, way more intuitive than kcachegrind, gprof and friends.
Attached is one log file for the example I described below. All 3
"rostopic" calls are denoted as the "python" process in the log file I
guess.
It seems that the most of the system time is indeed spent for the
memcpy and memset directives - time to try out nodelets apparently:-).
I do not really understand what does the "in kernel" stand for?

cheers, D.

On Mon, Apr 19, 2010 at 4:47 PM, Brian Gerkey <gerkey at willowgarage.com> wrote:
> hi Dejan,
>
> It would be interesting to see some data from a profiler to understand
> where the publishing node is spending its time.  We usually use
> sysprof: http://pr.willowgarage.com/wiki/sysprof .
>
>        brian.
>
> On Sun, Apr 18, 2010 at 1:37 PM, Dejan Pangercic
> <dejan.pangercic at gmail.com> wrote:
>> Hi there,
>>
>> I ran the program with the valgrind and found nothing fishy. Moreover
>> it turned out that the decay in publishing rate only happens when
>> there is a subscriber such as e.g. image_view subscribed to the topic.
>> What I then tried next was to subscribe to the output topic with 3
>> "rostopic hz /image_topic_2" commands only - see also an attached
>> rxgraph plot.
>> This resulted in every subscription having less and less publishing
>> rate (~ 30, 25 and 26 Hz respectively). Once again I ran this on one
>> machine and over the loopback. The program publishing images is now
>> also in tum-ros-pkg repo:
>> http://tum-ros-pkg.svn.sourceforge.net/viewvc/tum-ros-pkg/perception/image_algos/utils/openCV_to_ros.cpp?revision=432&view=markup
>> if someone wants to give it a try.
>>
>> Could the decay in publishing rate be attributed to the way ROS's
>> subscribe mechanism handles the copying of data?
>>
>> cheers, D.
>>
>>
>> On Fri, Apr 16, 2010 at 9:47 PM, Josh Faust <jfaust at willowgarage.com> wrote:
>>> Whoops, should've looked at the attached source.  In general a profiler is
>>> going to tell you what's taking time far better than we will.
>>>
>>> Josh
>>>
>>> On Fri, Apr 16, 2010 at 12:33 PM, Dejan Pangercic
>>> <dejan.pangercic at gmail.com> wrote:
>>>>
>>>> Hi Josh,
>>>>
>>>> I did not do profiling yet. However, since I read the image only once
>>>> when I start the program and then publish it from the memory, it can
>>>> not be harddrive.
>>>> D.
>>>>
>>>> On Fri, Apr 16, 2010 at 9:00 PM, Josh Faust <jfaust at willowgarage.com>
>>>> wrote:
>>>> > Have you tried profiling it to see where the time is being spent, and
>>>> > where
>>>> > the bottleneck is?  1.8MB * 30 = 54MB/sec, which could actually be
>>>> > harddrive-limited depending on the drive you're reading from.
>>>> >
>>>> > Josh
>>>> >
>>>> > On Fri, Apr 16, 2010 at 11:26 AM, Dejan Pangercic
>>>> > <dejan.pangercic at gmail.com> wrote:
>>>> >>
>>>> >> Hi there,
>>>> >>
>>>> >> I using an attached program to read an image from a disk and to then
>>>> >> continously publish it on an image topic at 30 fps. On _one_ machine
>>>> >> over loopback. When I tried it with a 1608x1236+0+0 color image
>>>> >> (1.8MB) and then used rostopic hz to display the publishing rate of
>>>> >> topic,
>>>> >> the most that I got was around 12, 13 Hz.
>>>> >> Any idea what would cause such a low performance? At what rates and
>>>> >> sizes do you folks usually send images around?
>>>> >>
>>>> >> thx and cheers, D.
>>>> >>
>>>> >> --
>>>> >> MSc. Dejan Pangercic
>>>> >> PhD Student/Researcher
>>>> >> Computer Science IX
>>>> >> Technische Universität München
>>>> >> Telephone: +49 (89) 289-17780
>>>> >> E-Mail: dejan.pangercic at in.tum.de
>>>> >> WWW: http://ias.cs.tum.edu/people/pangercic
>>>> >>
>>>> >> _______________________________________________
>>>> >> ros-users mailing list
>>>> >> ros-users at code.ros.org
>>>> >> https://code.ros.org/mailman/listinfo/ros-users
>>>> >>
>>>> >
>>>> >
>>>> > _______________________________________________
>>>> > ros-users mailing list
>>>> > ros-users at code.ros.org
>>>> > https://code.ros.org/mailman/listinfo/ros-users
>>>> >
>>>> >
>>>>
>>>>
>>>>
>>>> --
>>>> MSc. Dejan Pangercic
>>>> PhD Student/Researcher
>>>> Computer Science IX
>>>> Technische Universität München
>>>> Telephone: +49 (89) 289-17780
>>>> E-Mail: dejan.pangercic at in.tum.de
>>>> WWW: http://ias.cs.tum.edu/people/pangercic
>>>> _______________________________________________
>>>> ros-users mailing list
>>>> ros-users at code.ros.org
>>>> https://code.ros.org/mailman/listinfo/ros-users
>>>
>>>
>>> _______________________________________________
>>> ros-users mailing list
>>> ros-users at code.ros.org
>>> https://code.ros.org/mailman/listinfo/ros-users
>>>
>>>
>>
>>
>>
>> --
>> MSc. Dejan Pangercic
>> PhD Student/Researcher
>> Computer Science IX
>> Technische Universität München
>> Telephone: +49 (89) 289-17780
>> E-Mail: dejan.pangercic at in.tum.de
>> WWW: http://ias.cs.tum.edu/people/pangercic
>>
>>
>>
>> --
>> MSc. Dejan Pangercic
>> PhD Student/Researcher
>> Computer Science IX
>> Technische Universität München
>> Telephone: +49 (89) 289-17780
>> E-Mail: dejan.pangercic at in.tum.de
>> WWW: http://ias.cs.tum.edu/people/pangercic
>>
>> _______________________________________________
>> ros-users mailing list
>> ros-users at code.ros.org
>> https://code.ros.org/mailman/listinfo/ros-users
>>
>>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>



-- 
MSc. Dejan Pangercic
PhD Student/Researcher
Computer Science IX
Technische Universität München
Telephone: +49 (89) 289-17780
E-Mail: dejan.pangercic at in.tum.de
WWW: http://ias.cs.tum.edu/people/pangercic
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openCV_to_ros_sysprof1
Type: application/octet-stream
Size: 39116 bytes
Desc: not available
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20100419/7d86e3e4/attachment-0005.obj>


More information about the ros-users mailing list