What is the best way to animate an object (e.g. Triangle Mesh) and change it's coordinates for example
- 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
Dear Developer-Team,
I hope I have not missed something, but I cannot find an example, where an object is moved or rotated in an animation. There are quite a lot examples, where one gets control over `open3d.visualization.ViewControl`, but it is not quite the same.
My final goal is to be able to animate some gyro data, so that the objects rotates accordingly.
My try so far is the following:
```
def move_X(object1, object2):
move_X.index = 0
move_X.vis = o3d.visualization.Visualizer()
glb = move_X
def move_forward(vis):
if glb.index <= 10:
o3d.geometry.TriangleMesh.translate(object2, np.asarray([glb.index, 0, 0]), False)
move_X.vis.update_geometry(object2)
print(glb.index)
time.sleep(0.1)
glb.index += 1
else:
move_X.vis.register_animation_callback(None)
return False
vis = move_X.vis
vis.create_window()
vis.add_geometry(object1)
vis.add_geometry(object2)
vis.register_animation_callback(move_forward)
vis.run()
vis.destroy_window()
```
It is derived from your example with the camera trajectory and it works, so I can see at least my object moving. But still, I am no happy with it yet. Du to the `time.sleep(0.1)` it doesn't feel good to move with the camera during the animation.
Is it maybe a better solution to work with `open3d.visualization.O3DVisualizer`? Since I need some gui later as well.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.