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.