Author: Job van Dieten <>

Maintainer: Jordi Pages <>



(!) Please ask about problems and questions regarding this tutorial on Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Region Based Segmentation (C++)

Description: Region based segmentation takes a point in the pointcloud and determines whether neighbouring points are part of the same region

Keywords: PointCloud

Tutorial Level: INTERMEDIATE



This tutorial presents a C++ node that subscribes to the point cloud of the RGBD camera of TIAGo's head and applies the PCL region growing tutorial to segment the scene in different clusters.


First, make sure that the tutorials are properly installed along with the TIAGo simulation, as shown in the Tutorials Installation Section.


Open three consoles and in each one source the workspace

  • cd /tiago_public_ws
    source ./devel/setup.bash

In the first console launch the simulation

  • $ roslaunch tiago_gazebo tiago_gazebo.launch public_sim:=true robot:=steel world:=objects_on_table

TIAGo will be spawn in front of a table with several objects.


In the second console load an specific file with motion definitions

  • $ rosparam load `rospack find tiago_pcl_tutorial`/config/pcl_motions.yaml

Now run a graphical action client interface

  • $ rosrun actionlib /play_motion


In the GUI that shows up write the following text in the Goal text box

  • motion_name: 'look_down'
    skip_planning: True
    priority: 0

And press the SEND GOAL button. The robot will raise its torso and will lower the head in order to look at the table.

In the third console run the following launch command

  • roslaunch tiago_pcl_tutorial pcl_region.launch

Rviz will appear showing a colored point cloud where every segmented region is assigned a different color.



A rqt_reconfigure GUI also appears and selecting the pcl_regions node a set of parameters can be tuned.


The parameters involve point cloud downsampling, in order to speed up the processing, and the region segmentation algorithm, which will have direct effect on the resulting number of regions and its morphology.


Wiki: Robots/TIAGo/Tutorials/RegionSegmentation (last edited 2022-02-14 14:38:49 by thomaspeyrucain)