Exported XML loses meshdir and relative mesh paths
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu với lời gọi scene_model.to_xml_string() được mô tả trong issue và so sánh hành vi của nó với đường dẫn mjcf.export_with_assets(...) liên quan từ issue #454. Kiểm tra xem quá trình export có thể giữ lại meshdir và các đường dẫn mesh tương đối hay không, đồng thời điều tra riêng xem dm_control.viewer có chấp nhận scene đã được ghép hay không. Công việc được xem là hoàn tất khi có câu trả lời được ghi lại hoặc kiểm thử cho cả hai câu hỏi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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!
- Ngôn ngữ chính
- Python
- Star
- 4.7k
- Fork
- 765
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của google-deepmind/dm_control
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 76/100
google-deepmind/dm_control#552 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
google-deepmind/dm_control#540 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
google-deepmind/dm_control#537 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
google-deepmind/dm_control#529 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
google-deepmind/dm_control#527 · 1 bình luận ·
Tất cả issue của google-deepmind/dm_control
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
anthropics/skills#1811 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
speaches-ai/speaches#678 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
datalayer/mcp-compose#42 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
conda-forge/spacy-feedstock#177 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
UKGovernmentBEIS/inspect_evals#2523 ·