Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to read timestamps from pcd/ply files #176

Open
nachovizzo opened this issue Jun 22, 2023 · 2 comments
Open

Add support to read timestamps from pcd/ply files #176

nachovizzo opened this issue Jun 22, 2023 · 2 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@nachovizzo
Copy link
Collaborator

If deskewing is required, the current generic dataloader is not loading (and thus, discarding) the timestamp information. Should be easy to do it. I tried with PlyData but it's really slow!

snippet that works (but too slow)

cloud = PlyData.read(file_path)
data = cloud["vertex"].data
points = np.vstack([data[name] for name in ["x", "y", "z"]]).T
timestamps = np.asarray(data["t"])
timestamps = timestamps / timestamps.max()
return points.astype(np.float64), timestamps

The old API from open3d also does not support this, maybe migrating to the tensor API helps (?)

@nachovizzo nachovizzo added the good first issue Good for newcomers label Jun 22, 2023
@jpaulos
Copy link

jpaulos commented Jun 22, 2023

I regularly use the new open3d Tensor API to read/write extra point data like timestamps from .pcd files.

An example of what that API looks like, tested out of context:

import open3d as o3d
import open3d.core as o3c

pc = o3d.t.io.read_point_cloud(file_path)
points = pc.point.positions.numpy() # Here 'positions' is the special reserved attribute name for xyz data.
timestamps = pc.point.t.numpy() # Here 't' is a user-defined extra attribute name in the .pcd file.
timestamps = timestamps / timestamps.max()
return points, timestamps

The gotcha which is why I'm commenting: From what I can see, the Open3d Tensor API .pcd file writer (and I believe file reader) can not work with point clouds larger than 2**31 bytes (about 2.1 GB). I think this limitation isn't a major pain point in the open3d community and the resolution would require a rethink of their file writer's approach, so I don't expect much traction on the open issue.

isl-org/Open3D#6043

@nachovizzo nachovizzo added the help wanted Extra attention is needed label Jul 13, 2023
@iegorval
Copy link

Is this still not implemented / not having anyone working on it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants