简体   繁体   中英

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.

<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. I could open a completed xml file from robosuite for example. And when I don't use stl files in xml, there were no problem at opening it. Is there any problem of my code in importing stl files?

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. A file with two root elements ( asset and world_body ) is not strictly speaking an XML document; it could be called an "XML fragment" , but that may not be what mujoco is expecting.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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