-
Notifications
You must be signed in to change notification settings - Fork 17
RGB D Clustering
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
You have to launch demo_pointcloud.launch (https://github.com/mithi/point-cloud-clusters))
~/catkin_ws$ roslaunch realsense2_camera demo_pointcloud.launch
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/src/point-cloud-clusters/src/sensor_stick/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$ rviz -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)
Q. what is max_distance? (do_ransac_plane_segmentation, line 22)
##Plan
- get box points of human(max/min points of x, y, z from human cluster pints)
- get middle point from box points
- get data of path points of middle point by depth camera
- f.write as txt file. (when human stop for a few seconds, save txt file and record new file. + notice timing by buzz sound or etc.)
python-rs400-advanced-mode-example.py can change option of realsense.