Currently, when attempting to import a URDF model for visualization using meshcat-viz-python, there is an unexpected requirement for the IGN_GAZEBO_RESOURCE_PATH environment variable. This requirement persists even when such a dependency is not necessary for the task.
Traceback (most recent call last):
File "/home/flferretti/git/element_rl-for-codesign/src/evogym/envs/ergocub.py", line 688, in <module>
env.render()
File "/home/flferretti/git/element_rl-for-codesign/src/evogym/envs/ergocub.py", line 474, in render
_ = self.world.insert_model(
File "/home/flferretti/mambaforge/envs/test101/lib/python3.10/site-packages/meshcat_viz/world.py", line 178, in insert_model
meshcat_model = MeshcatModelBuilder.from_rod_model(
File "/home/flferretti/mambaforge/envs/test101/lib/python3.10/site-packages/meshcat_viz/model_builder.py", line 25, in from_rod_model
rod_model = MeshcatModelBuilder.resolve_sdf_tree_uris(rod_model=rod_model)
File "/home/flferretti/mambaforge/envs/test101/lib/python3.10/site-packages/meshcat_viz/model_builder.py", line 70, in resolve_sdf_tree_uris
MeshcatModelBuilder.resolve_local_uri(
File "/home/flferretti/mambaforge/envs/test101/lib/python3.10/site-packages/meshcat_viz/model_builder.py", line 82, in resolve_local_uri
for path in os.environ["IGN_GAZEBO_RESOURCE_PATH"].split(":"):
File "/home/flferretti/mambaforge/envs/test101/lib/python3.10/os.py", line 680, in __getitem__
raise KeyError(key) from None
KeyError: 'IGN_GAZEBO_RESOURCE_PATH'
Currently, when attempting to import a URDF model for visualization using
meshcat-viz-python
, there is an unexpected requirement for theIGN_GAZEBO_RESOURCE_PATH
environment variable. This requirement persists even when such a dependency is not necessary for the task.The error arises in the code block below:
https://github.com/ami-iit/meshcat-viz-python/blob/cd3fdcf2cb09792fce5f83cb2759c933c21067bb/src/meshcat_viz/model_builder.py#L82-L87
This leads to the following traceback:
C.C. @diegoferigo @traversaro