How to transform pointcloud and bounding box in the same way?
- 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](http://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `master` branch).
### My Question
I have a model as a sampled point cloud and a scene as a point cloud. I want to transform the model correctly in the scene with a given transformation and also want to transform the bounding box of the model correctly into the scene.
Steps:
1. Create axis aligned box of model pcd
2. Convert axis aligned box to oriented bounding box
3. Transform oriented box into scene
4. Transform model pcd into scene
I use model.transform(_transformation_mat_) which works correctly, but the box.transform() is not implemented so I need to use box.rotate() and box.translate(). But it is not the same like the model.transform().
code example:
```
model = o3d.io.read_point_cloud()
scene = o3d.io.read_point_cloud()
aabox = GT_PCL.get_axis_aligned_bounding_box()
aabox.color = (1, 0, 0)
o3d.visualization.draw_geometries([model, aabox])
obox = o3d.geometry.OrientedBoundingBox.create_from_axis_aligned_bounding_box(aabox)
obox.rotate(rob_T_obj[0:3, 0:3])
obox.translate(rob_T_obj[0:3, 3], relative = False)
obox.color = (1, 0, 0)
model.transform(rob_T_obj)
o3d.visualization.draw_geometries([model, obox])
o3d.visualization.draw_geometries([scene, model, obox])
```
The screenshots, show the model and the axis aligned box, the model and the box after transformation and the model/box in the scene (yellow points are the model which are correctly transformed).



If I use model.rotate() and model.translate() the model is also not correctly transformed into the scene. I also tried to get the oriented box after the model transformation but the oriented box is rotated relative to the model, so I want to use this approach. I also tried with box.translate(..., relative=Ture) but it's also not working.
Can you help me?
Thank you in advance!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.