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

asked 2018-04-17 08:44:04 -0600

toddwf gravatar image

updated 2018-04-17 08:46:03 -0600

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?

Thank you in advance.

cmvision_3d launch file

<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 -->
  <param name="spatial_radius_pix" type="double" value="2.0"/>

  <!-- Color bandwidth: Bigger = smoother image-->
  <param name="color_radius_pix" type="double" value="40.0"/>

  <!-- color_controller conglomerates all the necessary info to publish /blobs_3d and optionally tf transforms for the colors. -->
  <node name="color_controller" pkg="cmvision_3d" type="" output="screen">
    <!-- If we wish to project into the world we need depth information. -->
    <remap  from="depth_image" to ...
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2018-09-24 12:24:26.480592