[Documentation] [TitleIndex] [WordIndex

Only released in EOL distros:  

Package Summary

track colors in 3d!


cmvision_3d.png Cmvision_3d uses the /blobs topic produced by cmvision, in addition to 3D data from a registered depth image, to publish both 1. the position of each color blob relative to its camera frame, and 2. frames in the tf stack for each color.

Frames are broadcasted with the camera's frame_id as their parent_frame, and from there they can be transformed as necessary. Note: this package depends on cmvision's commit fac7a32. This should be released into Hydro, but if it is not yet, make sure to grab the latest changes.


Selecting Blob Colors

Please see the cmvision package for instructions to select blob colors, after which you can place your colors.txt file within the /colors folder, and link to it via modifying color_tracker.launch.

Detecting and Projecting Blobs to 3D

You will need to modify launch/color_tracker.launch to do the following:

  1. Set the "image" arg to your image topic.
  2. Set the "depth_image" to your depth image topic (which must be registered depth to produce meaningful results).
  3. Set the "camera_topic" arg to your camera_topic.
  4. Set the "color_file" file parameter to your .txt colors file, as described in cmvision.

        <arg name="image" default="/your/image/topic"/>
        <arg name="depth_image" default="/your/depth_image/topic"/>
        <arg name="camera_topic" default="/your/camera_info/topic"/>
        <!-- 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/yourColors.txt" />

After you've done this, you can proceed to run both cmvision and color_controller using

roslaunch cmvision_3d color_tracker.launch

Note: This stuff will pretty much work out of the box if you're running openni_launch openni.launch depth_registration:= true on a Microsoft Kinect, as the defaults for the above arguments are set to the relevant topics for the Kinect environment.



Subscribes to /blobs and publishes /blobs_3d, which includes the 3d points of each found color.

Subscribed Topics

blobs (cmvision/Blobs) depth_image (sensor_msgs/Image) camera_topic (sensor_msgs/CameraInfo)

Published Topics

blobs_3d (cmvision_3d/Blobs3d)


publish_tf (bool, default: true)

2019-06-15 12:33