# performance collapses upon subscribing to depth/image topic(s) on turtlebot [closed]

I have two PCs on a Turtlebot2. One is running the turtlebot nav stack and openni (on hydro). The other is running cmvision_3d to do 3d blob detection (on jade) (it's a python package that combines cmvision with the depth info). It is subscribing to the camera and depth topics from the hydro pc. (My launch file is below so one can see which topics.) These devices communicate to each other and to my client pc over a dedicated 5Ghz network.

The problem is that the performance is slow. When I start the ros nav stack, rostopic hz shows the relevant topics for the camera running at about 30hz, but when I subscribe, the performance drops to < 1hz over the course of a minute or two. The dropoff is steep and immediate and makes the system unusable for the blob tracking I'm trying to do.

htop on both machines show that there is no high utilization. nload shows no high utilization of network i/o (about 50% when subscribed).

Upon looking for answers I came across the discussion about setting the queue_size (required) and the buff_size in the python subscriber method. The cmvision_3d does not have these values set, so I tried this, putting in high values for the requests (queue_size of 30, and buff_size of 30*2400000) for the size of the frames of depth registered image data that would be coming over the wire. (There are three subscriber calls in the cmvision_3d code.) This had absolutely no effect. I note that the cmvision code does not have the buff_size set but it's in C++ and not sure if that is a problem. After I post this I may try that. But I figured that even if I had borked the buff_size values I would have had some kind of impact.

I'm running out of things to try. Any ideas on what might be the issue?

cmvision_3d launch file

<launch>
<arg name="image" default="/camera/rgb/image_color"/>
<arg name="depth_image" default="/camera/depth_registered/image_raw"/>
<arg name="camera_topic" default="/camera/rgb/camera_info"/>
<!-- Do we want to publish our blobs to tf? -->
<arg name="publish_tf" default="true"/>

<node name="cmvision" pkg="cmvision" type="cmvision" args="image:=$(arg image)" output="screen"> <!-- Location of the cmvision color file --> <param name="color_file" type="string" value="$(find cmvision_3d)/colors/colors.txt" />

<!-- Turn debug output on or off -->
<param name="debug_on" type="bool" value="false"/>

<!-- Turn color calibration on or off -->
<param name="color_cal_on" type="bool" value="false"/>

<!-- Enable Mean shift filtering -->
<param name="mean_shift_on" type="bool" value="true"/>

<!-- Spatial bandwidth: Bigger = smoother image -->
<remap  from="depth_image" to ...