google-deepmind / google-deepmind/dm_control

Respect MJCF path processing and XML include specifications

未关闭
#111 1 条评论 6 个 reaction 已指派 0 人 在 GitHub 查看
enhancement
主要语言
Python
星标
4.7k
派生
764
PR 合并指标
30 天内没有已合并 PR

描述

From the MuJoCo docs:

> The full path to a file is determined as follows. If the strippath attribute described above is "true", all path information from the file name is removed. The following checks are then applied in order: (1) if the file name contains an absolute path, it is used without further changes; (2) if this attribute is set and contains an absolute path, the full path is the string given here appended with the file name; (3) the full path is the path to the main MJCF model file, appended with the value of this attribute if specified, appended with the file name.

This is applies to included files, which must be treated as if they were part of the document including them. `dm_control.mjcf`, however, ignores this and treats all paths _relative to the file(s) being included_.

Take the following example:

/root/foo.xml
```xml

...

```
/root/common/skybox.xml
```xml



...
/>

```

This example (were it filled out entirely) compiles successfully using MuJoCo, but fails when using `dm_control.mjcf` which looks for `right.png` in `/root/common/skyboxes/`. It appears the root problem is in `parser.py` which doesn't propagate the the fact that `skybox.xml` was included.

This means the MJCF models in dm_control are incompatible with other MuJoCo-dependent libraries and vice-versa.

贡献指南

打开贡献指南

调研方向

从 parser.py 开始,跟踪被包含的 MJCF 文件的 origin 在解析过程中是如何传递的。复现 /root/foo.xml 和 common/skybox.xml 示例,然后验证被包含的 asset 路径是否按照 MuJoCo 的规定,使用主 MJCF 模型路径和 compiler texturedir 进行解析。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
backend
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。