Skip to content

RGB D Clustering

jane79 edited this page Aug 16, 2019 · 17 revisions

19/08/14

Download RealSense : https://github.com/IntelRealSense/realsense-ros

How to set environment with catkin : http://wiki.ros.org/ko/catkin/Tutorials/create_a_workspace

point-clustering github repo : https://github.com/mithi/point-cloud-clusters

  • To use RealSense with ROS

    roscore   #start roscore  
    
    cd catkin_ws
    source devel/setup.bash  
    roslaunch realsense2_camera rs_camera.launch   #start realsense  
    
  • To echo topic to terminal

    rostopic echo (type name)
    
  • To check type of topic

    rostopic type (type name)
    
  • To check list of rostopic

    rostopic list
    

Publish pointcloud

You have to launch demo_pointcloud.launch (in repository of 'point-cloud-clusters')

source devel/setup.bash
roslaunch sensor_stick clustering.py

Then, it will publish the topic of pointcloud, named '/camera/depth/color/points'. Its type is Pointcloud2!!

We changed topic in 'clustering.py'(~/catkin_ws/src/point-cloud-clusters/src/sensor_stick/scripts) at line 107.
But error was evoked because of 'xrange' in code, it may occur because of python version. => 08.17 fixed error.

To visualize point cloud, execute rviz.

  • To check list of rostopic
~/catkin_ws/scripts& python clustering.py
$ rosrun tf static_tranform_publisher 0 0 0 0 0 0 / world /map 10
#matching 'world' to 'frame'
~/catkin_ws/src/point-cloud-clusters/src/sensor_stick/config$ rbiz -d perception.rviz

After executing rviz, add PointCloud2(adding from type menu, '/pcl_table', '/pcl_cluster', 'pcl_objects'). Can compare with camera image(also can be added from type menu)

  • clustering parameters (clustering.py) min/max degree : min_axis, max_axis (do_passthrough_filter, line15) resolution : LEAF_SIZE (do_voxel_grid_filter, line11) point range : min)size, max_size (get_clusters, line79)
Clone this wiki locally