How to interpret the PCL read_points data

asked 2018-03-19 05:31:07 -0500

dpakshimpo gravatar image

Hello,

I followed the tutorials here and was able to achieve planar segmentation and get the objects isolated into point clouds. When I print the data using the following code snippet.

for p in pc2.read_points(pcl_cloud, field_names = ("x", "y", "z"), skip_nans=True):
            print " x : %f  y: %f  z: %f" %(p[0],p[1],p[2])
            print "-----"

I see some values like below,

 x : -0.280853  y: 0.021437  z: 0.823000
-----
 x : 0.368039  y: 0.040734  z: 0.823000
-----
 x : 0.372135  y: 0.040635  z: 0.821000
-----

How do I interpret the above values. My assumption was that after segmentation, I would get a array of segmented objects each with its own cloud under "/extract_plane_indices/output" (the topic used in tutorial). With the above output I want to do the following, 1) Find the distance of each of the segmented object from the camera along with its pose and orientation and dimensions 2) Pass the information to MoveIt! and do motion planning with my own URDF model

After the above is done, i want to object recognition, identification and then pick up the dimensions of the object from a saved DB etc. Could someone throw some light on how to achieve 1 and 2. I am unable to connect the dots of how to get this pose,orientation and depth info and then passing it on to MoveIt!

Thanks for your time in advance!

edit retag flag offensive close merge delete