简体   繁体   English

为什么我不能在 meshlab 上运行这个 xml 文件?

[英]Why can't I run this xml file on meshlab?

I'm studying xml for mujoco, and I made my own xml file using stl.我正在研究 mujoco 的 xml,并使用 stl 制作了自己的 xml 文件。

<asset>
    <mesh name="bottom_swingup" file="~/WorkSpace/MujocoProject/meshes/bottom_swingup.stl"/>

</asset>
<world_body>
    <light diffuse=".5 .5 .5" pos="0 0 3" dir="0 0 -1" castshadow="false"/>
    <geom type="plane" size="1 1 0.1" rgba=".9 0 0 1"/>
    <body name="base" pos="0 0 0">
        <camera mode="fixed" name="robotview" pos="1.0 0 0.4"/>
        <inertial diaginertia="0 0 0" mass="0" pos="0 0 0"/>

        <geom type="mesh" mesh="base_link" />
        <geom type="mesh" mesh="bottom_swingup" name="base_collision" />
    </body>
</world_body>
I tried to look at it using meshlab on linux, but I couldn't. 我试图在 linux 上使用 meshlab 来查看它,但我做不到。 I could open a completed xml file from robosuite for example. 例如,我可以从 robosuite 打开一个完整的 xml 文件。 And when I don't use stl files in xml, there were no problem at opening it. 而且当我不在xml中使用stl文件时,打开它没有问题。 Is there any problem of my code in importing stl files? 我的代码导入stl文件有问题吗?

I don't know mujuco at all, but I do know XML and I can tell you that the code you posted isn't "well-formed" XML because it doesn't have a single root element.我根本不知道 mujuco,但我知道 XML,我可以告诉您,您发布的代码不是“格式良好”的 XML,因为它没有单个根元素。 A file with two root elements ( asset and world_body ) is not strictly speaking an XML document;具有两个根元素( assetworld_body )的文件严格来说不是 XML 文档。 it could be called an "XML fragment" , but that may not be what mujoco is expecting.它可以称为“XML 片段” ,但这可能不是 mujoco 所期望的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM