Skip to main content

Hello,

I have a question regarding the PCD Writer. I am trying to write a .xyz point cloud (consisting of ~ 2 million points) to the PCD format. The point cloud represents a segment of a tunnel-like geometry. The output cloud has regular strokes of missing points. From certain angles the point cloud appears to be complete, but when orbitting around one can see these strokes of missing data. Imagine slicing bread and removing every other slice.

Any ideas on what could cause this issue?

 

Thanks!

Hi @linulind,

It sounds like it might be a coordinate rounding issue. Are you writing to Ascii or binary, and if Ascii, what is floating point precision you are using?


Hi @linulind,

It sounds like it might be a coordinate rounding issue. Are you writing to Ascii or binary, and if Ascii, what is floating point precision you are using?

Thanks for your reply @daveatsafe

I've tried writing to both. When it comes to Ascii, i have tried several floating point precisions; 8, 10 , 15.

The point cloud components x, y, z and intensity are structured as following:

x = xxxxxx.xxxx

y = yyyyyyy.yyyy

z = z.zzzzzzzzzzzzzzz

intensity = iiii

There are some differences in the precisions.

Thanks


Thanks for your reply @daveatsafe

I've tried writing to both. When it comes to Ascii, i have tried several floating point precisions; 8, 10 , 15.

The point cloud components x, y, z and intensity are structured as following:

x = xxxxxx.xxxx

y = yyyyyyy.yyyy

z = z.zzzzzzzzzzzzzzz

intensity = iiii

There are some differences in the precisions.

Thanks

Hi @linulind,

Four decimal places should be OK for ascii. I think the binary file is 32 bit reals, so you may end up with some precision loss if you have large coordinate values (ie. above 100,000). Please try using the CommonLocalReprojector before writing out, and see if the gaps are still there.


Hi @linulind,

Four decimal places should be OK for ascii. I think the binary file is 32 bit reals, so you may end up with some precision loss if you have large coordinate values (ie. above 100,000). Please try using the CommonLocalReprojector before writing out, and see if the gaps are still there.

Thanks @daveatsafe, the gaps are not appearing when using the CommonLocalReprojector!

Is there an efficient way to restore the original coordinates?


Thanks @daveatsafe, the gaps are not appearing when using the CommonLocalReprojector!

Is there an efficient way to restore the original coordinates?

Hi @linulind,

There are a couple of ways you could do that. The first is to use an Offsetter instead of the CommonLocalReprojector to make the coordinate values smaller. You can then apply the reverse offset once you get the PCD data into the desired application.

Another method is to extract the origin lat/long from the local coordinate system, then store the lat/long of the origin in a sidecar file to send along with the PCD. I am attaching a workspace illustrating a simple way to do this.

 


Reply