-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug. ValueError: Incorrect texture coordinate shape #456
Comments
ok we will take a look |
Here is another ValueError when load a different MJCF model. Here is the model file. Here is the result in mujoco 3.2.5 Full error message[Genesis] [17:30:48] [INFO] ╭───────────────────────────────────────────────╮
[Genesis] [17:30:48] [INFO] │┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈ Genesis ┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈┉┈│
[Genesis] [17:30:48] [INFO] ╰───────────────────────────────────────────────╯
[Genesis] [17:30:48] [INFO] Running on [NVIDIA GeForce GTX 1080 Ti] with backend gs.cuda. Device memory: 10.91 GB.
[Genesis] [17:30:48] [INFO] 🚀 Genesis initialized. 🔖 version: 0.2.1, 🌱 seed: None, 📏 precision: '32', 🐛 debug: False, 🎨 theme: 'dark'.
[Genesis] [17:30:49] [INFO] Scene <4d5a5c8> created.
[Genesis] [17:30:49] [INFO] Adding <gs.RigidEntity>. idx: 0, uid: <7405e0b>, morph: <gs.morphs.MJCF(file='/home/yongxi/Workspace/SJTU-Robotic-Interface/notebooks/outlet_room/model.xml')>, material: <gs.materials.Rigid>.
[Genesis] [17:30:49] [INFO] Building scene <4d5a5c8>...
[Genesis] [17:30:56] [INFO] Compiling simulation kernels...
[Genesis] [17:31:43] [INFO] Building visualizer...
Traceback (most recent call last):
File "/home/yongxi/Workspace/SJTU-Robotic-Interface/notebooks/bug_value_error_2.py", line 6, in <module>
scene.build()
File "/home/yongxi/App/anaconda3/envs/robotic/lib/python3.9/site-packages/genesis/utils/misc.py", line 38, in wrapper
return method(self, *args, **kwargs)
File "/home/yongxi/App/anaconda3/envs/robotic/lib/python3.9/site-packages/genesis/engine/scene.py", line 607, in build
self._visualizer.build()
File "/home/yongxi/App/anaconda3/envs/robotic/lib/python3.9/site-packages/genesis/vis/visualizer.py", line 101, in build
self._context.build(self._scene)
File "/home/yongxi/App/anaconda3/envs/robotic/lib/python3.9/site-packages/genesis/vis/rasterizer_context.py", line 91, in build
self.on_rigid()
File "/home/yongxi/App/anaconda3/envs/robotic/lib/python3.9/site-packages/genesis/vis/rasterizer_context.py", line 263, in on_rigid
pyrender.Mesh.from_trimesh(
File "/home/yongxi/App/anaconda3/envs/robotic/lib/python3.9/site-packages/genesis/ext/pyrender/mesh.py", line 205, in from_trimesh
color_0, texcoord_0, primitive_material = Mesh._get_trimesh_props(m, smooth=smooth, material=material)
File "/home/yongxi/App/anaconda3/envs/robotic/lib/python3.9/site-packages/genesis/ext/pyrender/mesh.py", line 310, in _get_trimesh_props
material = MetallicRoughnessMaterial(
File "/home/yongxi/App/anaconda3/envs/robotic/lib/python3.9/site-packages/genesis/ext/pyrender/material.py", line 398, in __init__
self.baseColorTexture = baseColorTexture
File "/home/yongxi/App/anaconda3/envs/robotic/lib/python3.9/site-packages/genesis/ext/pyrender/material.py", line 421, in baseColorTexture
self._baseColorTexture = self._format_texture(value, "RGBA")
File "/home/yongxi/App/anaconda3/envs/robotic/lib/python3.9/site-packages/genesis/ext/pyrender/material.py", line 268, in _format_texture
source = format_texture_source(texture, target_channels)
File "/home/yongxi/App/anaconda3/envs/robotic/lib/python3.9/site-packages/genesis/ext/pyrender/utils.py", line 98, in format_texture_source
raise ValueError("Cannot reformat 2-channel texture into RGBA")
ValueError: Cannot reformat 2-channel texture into RGBA
[Genesis] [17:31:46] [INFO] 💤 Exiting Genesis and caching compiled kernels... |
same situation. Do you solve it? |
@zhenjia-xu It works. Thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Error occurs when build scene with MJCF loaded.
ValueError: Incorrect texture coordinate shape
Full error message
To Reproduce
code
resource
cup_2.zip
Expected behavior
Load the same mjcf model to mujoco 3.2.5
Environment:
The text was updated successfully, but these errors were encountered: