Writing cutom attributes works for .ply files but fails for .pcd files
- Dominant language
- C++
- Stars
- 14k
- Forks
- 2.6k
- Avg merge
- 5d 18h
- Merged PRs (30d)
- 6
Description
### Checklist
- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [X] For Python issues, I have tested with the [latest development wheel](https://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](https://www.open3d.org/docs/release/) and the [latest documentation](https://www.open3d.org/docs/latest/) (for `main` branch).
### Describe the issue
I have been trying to save intensity values in a .pcd file. Although creating the file and writing the points are successful, it is still missing the added intesity values. I have seen other issues discussing the matter, but it is still unclear whether writing custom attributes would be supported for PCD file formats. Below is a simple code to replicate the issue:
### Steps to reproduce the bug
```python
import open3d as o3d
import numpy as np
points = np.random.rand(1000, 3)
intensities = np.random.rand(1000, 1)
dtype = o3d.core.Dtype.Float32
pcd = o3d.t.geometry.PointCloud(o3d.core.Tensor(points, dtype=dtype))
pcd.point["intensities"] = o3d.core.Tensor(intensities, dtype=dtype)
o3d.t.io.write_point_cloud('./test_ply.ply', pcd)
o3d.t.io.write_point_cloud('./test_pcd.pcd', pcd)
point_cloud_ply = o3d.t.io.read_point_cloud('./test_ply.ply')
print(f"PLY point cloud: {point_cloud_ply}")
point_cloud_pcd = o3d.t.io.read_point_cloud('./test_pcd.pcd')
print(f"PCD point cloud: {point_cloud_pcd}")
```
### Error message
PLY point cloud: PointCloud on CPU:0 [1000 points (Float32)] Attributes: intensities (Float32, 1).
PCD point cloud: PointCloud on CPU:0 [1000 points (Float64)] Attributes: None.
### Expected behavior
Written custom attributes should exist for PCD file formats (i.e: not None)
### Open3D, Python and System information
```markdown
- Operating system: Ubuntu 20.04
- Python version: Python 3.9.2
- Open3D version: 0.13.0
- System architecture: x86
- Is this a remote workstation?: no
- How did you install Open3D?: pip
```
### Additional information
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.