Open3d visualizer not receiving keyboard instructions
my code:
import open3d.open3d as o3d
if __name__ == "__main__":
pcd = o3d.io.read_point_cloud("out.xyz", format='xyz')
vis = o3d.visualization.Visualizer()
vis.create_window()
vis.add_geometry(pcd)
opt = vis.get_render_option()
opt.background_color = np.asarray([0.15, 0.15, 0.15])
vis.run()
vis.destroy_window()
if I press "H" the help message shows up listing all available controls but only a few of them actually do something (color options and fov options (with the wrong keys: + and è instead of [ and ])), every other command just does nothing.
on the docs I found a note that says to use pythonw in this situation but it isn't available on linux.
- OS: Arch linux
- Python version: 3.8.2
- Open3D version: 0.9.0.0
- Is this remote workstation?: no
- How did you install Open3D?: built from source from the following AUR package: https://aur.archlinux.org/packages/python-open3d/
Can you be more specific which keys show no effect?
The Keyboard view control, the General control commands, and the Color control should definitely work. It seems that you are reading a point cloud without color information, normals, or meshes. Therefore, a lot of the commands are not applicable. E.g., normals (key N) can only be displayed if you calculated them beforehand: pcd.estimate_normals(o3d.geometry.KDTreeSearchParamHybrid(radius=0.1, max_nn=100))
*: Note on the General control commands:
The captures are saved in your project folder without a printing statement (which I would consider as useful) or something similar. Check if you can save something by pressing P, D, or O.
Are your problems also happening if you use o3d.visualization.draw_geometries([...]) instead of your custom Visualizer?
fov options (with the wrong keys: + and è instead of [ and ])
Please note that the "wrong key issue" also applies to the point sizes (see #1893).