Ask Your Question
1

NormalEstimation for 2D point cloud

asked 2018-03-01 07:58:34 -0500

BhanuKiran.Chaluvadi gravatar image

updated 2018-03-01 07:59:35 -0500

Hi,

Is there a way to estimate normals for a 2D point cloud (XY plane & Unorganized point cloud) . To give a small background the point cloud is formed from Laser scan messages using laser_geometry package.

As per the PCL documentation, it try to fit a plane and estimate the normal but in my case all the points are present in a plane. So is there a way to find the normal lying the same 2D plane. Some thing like fitting a line and finding the norm.

Thank you.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2018-03-01 09:41:46 -0500

jdlangs gravatar image

You will probably have to do the local model estimation manually because PCL doesn't have a PointXY type. It should be quite straightforward to do a least-squares line fit once you've identified the neighborhood of each point.

Someone else may be able to comment on how difficult it would be to make your own PointXY type and plug into the PCL machinery for doing normal estimation.

edit flag offensive delete link more

Comments

I would like to suggest a hack by assigning a Z value to your point cloud. Z may be arbitrary or it may be the actual distance from where you place your laser scan to the ground. I know this is not the best solution but at least you could bypass writing your own PointXY type.

tuandl gravatar imagetuandl ( 2018-03-01 09:58:20 -0500 )edit
1

But I think the issue is that he/she wants the 2D normals, pointing out from say a blob obstacle (correct me if I'm mistaken). If the points become 3D I'm not aware of any (built-in) method of doing a local model estimation in a single plane.

jdlangs gravatar imagejdlangs ( 2018-03-01 11:01:57 -0500 )edit

PCL has a datatype pcl::pointXY. Currently, I am getting all the norms pointing in z - direction (0, 0, 1). Obviously the fitted plane is XY and the norm is in Z-direction. I am looking for norm that look some thing like (x, y, 0) in the plane XY.

BhanuKiran.Chaluvadi gravatar imageBhanuKiran.Chaluvadi ( 2018-03-02 01:45:22 -0500 )edit

@tuandi I still don't understand your solution. By assigning the random z value will make the points 3 Dimensional. But when it comes to plane fitting for the points I am not sure how its going to work out and give a correct norm.

BhanuKiran.Chaluvadi gravatar imageBhanuKiran.Chaluvadi ( 2018-03-04 01:09:11 -0500 )edit

Hi, I might misuderstand your question. My idea is that if you have a normal 3D poincloud then you can you SACSegmentation to estimate your plane. Having the plane coefficients then it is simple to get the norm vector. Isn’t it what you need?

tuandl gravatar imagetuandl ( 2018-03-04 15:19:30 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2018-03-01 07:58:34 -0500

Seen: 336 times

Last updated: Mar 01 '18