ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Ros PCL segmentation for dominant plane

asked 2015-04-06 23:28:49 -0500

dmngu9 gravatar image

I have a point cloud of floor and wall. When i did segmentation with plane normals, it gave me plane of the wall instead of the floor as intended. However, when i changed the k search number of kd tree, it gives me the plane of the floor.

My question is 'is there anyway to specify which plane I want to segment?' also' I dont quite understand kd tree search. Please help

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-04-07 07:10:56 -0500

Guido gravatar image

The solution proposed by Stefan suppose your cloud is expressed in a frame where Z points upwards. If the point cloud is expressed in the camera frame, there is no easy way to make the difference between the floor and a wall without more assumptions. If your camera is pointing to the floor you could choose the plan intersecting the optical axis (Z camera axis).

edit flag offensive delete link more

Comments

I wrote a node to capture 1 point cloud to pcd file from the kinect. I dont know if the point cloud is expressed in camera frame or not but I did check the z axis is depth. Can you suggest any method please?

dmngu9 gravatar image dmngu9  ( 2015-04-07 07:18:40 -0500 )edit

ok. i understand what you said now. however, i want to convert my point cloud in camera optical depth frame to base_link frame. base link is my static tf publisher

dmngu9 gravatar image dmngu9  ( 2015-04-25 00:24:21 -0500 )edit
0

answered 2015-04-07 04:19:13 -0500

You can for example use sample_consensus_model_perpendicular_plane. This allows specifying a normal for the plane that is fitted to the cloud. If you specify a (0, 0, 1) normal (i.e. one for a ideal floor plane), your segmentation should give you a fit for the floor. Do not forget to set the angle tolerance as noted in the link.

edit flag offensive delete link more

Comments

still doesnt work. i use sac_segmentation.h library, it has set axis and angle tolerance like the one you suggest . but it doesnt give me correct result

dmngu9 gravatar image dmngu9  ( 2015-04-07 06:55:16 -0500 )edit

It's of course important to set the normal correctly. If your cloud is given in camera frame, you'll have to either transform it or the normal to be consistent with each other.

Stefan Kohlbrecher gravatar image Stefan Kohlbrecher  ( 2015-04-07 11:37:00 -0500 )edit

How can i check if the point cloud in camera frame? I subscribed to point topic from Kinect. When i save to pcd file, the cloud is upside down.

dmngu9 gravatar image dmngu9  ( 2015-04-07 19:12:07 -0500 )edit

The cloud should have a header field that contains the used frame_id.

Stefan Kohlbrecher gravatar image Stefan Kohlbrecher  ( 2015-04-08 01:23:22 -0500 )edit

my frame id is camera_depth_optical_frame. My confusion is when you say i have to transform it. Can you explain a bit further. are xyz coordinate of my frame world coordinate?

dmngu9 gravatar image dmngu9  ( 2015-04-08 08:41:07 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-04-06 23:28:49 -0500

Seen: 1,754 times

Last updated: Apr 07 '15