Skip to content
This repository was archived by the owner on Dec 30, 2023. It is now read-only.

Conversation

@colincsl
Copy link
Contributor

@colincsl colincsl commented May 6, 2013

Normals were already being calculated in make_segmenter_normals(). I created a new function that outputs this set of normals.

Example:
import pcl
cloud = pcl.PointCloud()
cloud.from_file("tests/table_scene_mug_stereo_textured_noplane.pcd")
n = cloud.calc_normals(50)

It's much faster to import/export data using numpy arrays than to use lists. Arrays can not be returned ~400x faster than before.

--Example speed test--
import numpy as np
import pcl
p = pcl.PointCloud()
x = np.random.randint(0,1000,[100000,3])
p.from_array(x.astype(np.float32))
%timeit p.to_array()
%timeit p.to_list()

-- Comparison of old to_array() function versus the new version --
Before: 525ms
Now: 1.25 ms
@colincsl
Copy link
Contributor Author

colincsl commented May 6, 2013

I didn't mean to include the 'array/list io speedup' commit with this. I'm not sure how to remove this.

@nzjrs
Copy link
Contributor

nzjrs commented May 7, 2013

Can you please add a test for this?

@colincsl
Copy link
Contributor Author

colincsl commented May 7, 2013

Done!

@nzjrs, is this project sticking with PCL 1.5 or is it acceptable to commit code particular to 1.6 or dev? I noticed that the API for moving least squares changed slightly between versions.

@nzjrs
Copy link
Contributor

nzjrs commented May 8, 2013

Ok, so now this pull request is quite messy. I also left comments on your last commit.

Can you please re-open with the original patch to support 1.5 (and not including the duplicate array list speedups which I have just merged).

Then I can create a 1.6 branch and put the 1.6 api changes there

@nzjrs nzjrs closed this May 8, 2013
mend

Updated to support PCL 1.6+

Revert "mend"

This reverts commit 8aff29d.

Revert "Updated to support PCL 1.6+"

This reverts commit f4d8443.
@Remi-C
Copy link

Remi-C commented Aug 22, 2014

What is the status of this functionnality please?
Cheers,
Rémi-C

@nzjrs
Copy link
Contributor

nzjrs commented Aug 22, 2014

It was abandoned because the original author left. Please create a new pull-request rebased on master.

@nzjrs nzjrs reopened this Aug 22, 2014
@Remi-C
Copy link

Remi-C commented Aug 22, 2014

It doesn't compile :
"
result[i,2] = normals.at(i).normal_z
Object of type 'Normal &' has no attribute 'normal_z'
"
I'm trying to look for this object but I can see no definition of
cpp.PointNormalCloud_t
It appears to be defined as
pcl_defs.pxd:162:ctypedef PointCloud[Normal] PointNormalCloud_t

Cheers,
Rémi-C

@nzjrs
Copy link
Contributor

nzjrs commented Aug 22, 2014

Yes - you will need to fix it so it compiles....

@Remi-C
Copy link

Remi-C commented Aug 22, 2014

Hm I browsed his version and found the missing part.
It compiles, but I don't know how to test it ("make test" says ...Ran 0 tests in 0.105)

Cheers,
Rémi-C

@nzjrs
Copy link
Contributor

nzjrs commented Aug 22, 2014

Did you add his test too?

Please create a pull request with your changes and I can review your code.

@Remi-C
Copy link

Remi-C commented Aug 22, 2014

Yes I add everything except a change in pointcloud class adding an int (I think he had forgotten to remove it).

It work in python terminal but I still have trouble using it (I use it inside a postgres server).

I 'll do the pull request
Cheers,
Rémi-C

@Remi-C
Copy link

Remi-C commented Aug 22, 2014

The pull request is here : #43
It is in a new branch for merging sake.
Cheers,
Rémi-C

@nzjrs nzjrs closed this Aug 22, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants