RoboCup-Humanoid-TC / webots

Webots Robot Simulator
https://cyberbotics.com
Apache License 2.0
14 stars 14 forks source link

[patch] add missing python3 requirement #293

Closed SGSSGene closed 2 years ago

SGSSGene commented 2 years ago
SGSSGene commented 2 years ago

For documentation purposes: Running model_verifier.py without pyglet installed gives the error:

Traceback (most recent call last):
  File "/code/webots/projects/samples/contests/robocup/controllers/model_verifier/model_verifier.py", line 988, in <module>
    single_mesh_upright.show()
  File "/usr/lib/python3.10/site-packages/trimesh/base.py", line 2643, in show
    return scene.show(**kwargs)
  File "/usr/lib/python3.10/site-packages/trimesh/scene/scene.py", line 1105, in show
    return SceneViewer(self, **kwargs)
  File "/usr/lib/python3.10/site-packages/trimesh/exceptions.py", line 48, in failed
    raise exc
  File "/usr/lib/python3.10/site-packages/trimesh/viewer/__init__.py", line 18, in <module>
    from .windowed import (SceneViewer,
  File "/usr/lib/python3.10/site-packages/trimesh/viewer/windowed.py", line 13, in <module>
    import pyglet
ModuleNotFoundError: No module named 'pyglet'

Trimesh has a optional dependency, which is required when using the viewr:

Trimesh includes an optional pyglet based viewer for debugging and inspecting. In the mesh view window, opened with mesh.show(), the following commands can be used:
[2:46 PM]

see: https://trimsh.org/#viewer