Exported XML loses meshdir and relative mesh paths
还没有人认领这个 Issue。
评估
调研方向
从 issue 中描述的 scene_model.to_xml_string() 调用开始,并将其行为与 issue #454 中相关的 mjcf.export_with_assets(...) 路径进行比较。检查导出是否能够保留 meshdir 和相对 mesh 路径,并单独调查 dm_control.viewer 是否接受组合后的场景。只有对这两个问题都有文档记录或经过测试的答案,才算完成。
由索引模型根据 Issue 内容生成。
描述
I'm using PyMJCF to load a robot model from an XML file and build a MuJoCo scene. When I export the composed scene back to an XML string using scene_model.to_xml_string(), I've run into an issue with the file paths.
The Problem
The exported XML file is missing the directive. Meanwhile, all the mesh file paths, which were originally relative to that directory, are now missing their path prefixes.
For example, a mesh defined like file="my_robot/meshes/part1.stl" becomes file="part1.stl" in the exported file.
Code Snippet
Here is the line of code I'm using for the export:
final_xml_string = scene_model.to_xml_string()
What I've Found
I found a related issue (#454) that suggests using mjcf.export_with_assets(...) as a potential solution for managing assets.
My Questions
-
Is there a direct method in PyMJCF to preserve the meshdir compiler attribute and the corresponding relative file paths when exporting a model to an XML string?
-
Separately, my main goal is to visualize the composed scene. I know
dm_control.viewercan be used for simulations. Does the viewer also support loading and visualizing a custom MJCF scene like the one I'm building?
Thanks for your help!
- 主要语言
- Python
- 星标
- 4.7k
- 派生
- 765
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
google-deepmind/dm_control 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 76/100
google-deepmind/dm_control#552 ·
-
难度 3/5 1-2 天 新手友好度 45/100
google-deepmind/dm_control#540 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 55/100
google-deepmind/dm_control#537 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 45/100
google-deepmind/dm_control#529 ·
-
难度 5/5 一周以上 新手友好度 25/100
google-deepmind/dm_control#527 · 1 条评论 ·
查看 google-deepmind/dm_control 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
stephrobert/dsoxlab#238 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
sublimehq/package_control#1780 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 70/100
nwg-piotr/nwg-displays#145 ·