1蹬蚁、以下的文字內(nèi)容 都是注解共啃,正式代碼中沒(méi)有
<mujoco model="VSBR2dir"> 模型名稱
<compiler angle="degree" coordinate="local" inertiafromgeom="true"/> 角度撇眯、本地坐標(biāo)系烁设、地球慣性
<option integrator="RK4" timestep="0.01"/>
<custom>
<numeric data="0.0 0.0 0.55 1.0 0.0 0.0 0.0 0.0 1.0 0.0 -1.0 0.0 -1.0 0.0 1.0" name="init_qpos"/>初始化數(shù)字?jǐn)?shù)據(jù)
</custom>
<default>默認(rèn)值
<joint armature="1" damping="1" limited="true"/>關(guān)節(jié)電樞、阻尼
<geom conaffinity="0" condim="3" density="500.0" friction="1 0.5 0.5" margin="0.01" rgba="0.8 0.6 0.4 1"/>
</default>
<asset>一些變量定義
<texture builtin="gradient" height="100" rgb1="1 1 1" rgb2="0 0 0" type="skybox" width="100"/>
<texture builtin="flat" height="1278" mark="cross" markrgb="1 1 1" name="texgeom" random="0.01" rgb1="0.8 0.6 0.4"
rgb2="0.8 0.6 0.4" type="cube" width="127"/>
<texture builtin="checker" height="100" name="texplane" rgb1="0 0 0" rgb2="0.8 0.8 0.8" type="2d" width="100"/>
<material name="MatPlane" reflectance="0.5" shininess="1" specular="1" texrepeat="60 60" texture="texplane"/>
<material name="geom" texture="texgeom" texuniform="true"/>
<mesh file="wheelL.STL"/>
<mesh file="wheelR.STL"/>
</asset>
<worldbody>
<light cutoff="100" diffuse="1 1 1" dir="-0 0 -1.3" directional="true" exponent="1" pos="0 0 1.3"
specular=".1 .1 .1"/>
<geom conaffinity="1" condim="3" material="MatPlane" name="floor" pos="0 0 0" rgba="0.8 0.9 0.8 1" size="40 40 40"
type="plane"/>
<body name="VSBR" pos="0 0 0.1">
<geom name="frame1" fromto="-1 0 1 1 0 1" size="0.1" type="capsule" rgba="1 1 0 1"/>
<joint armature="0" damping="0" limited="false" margin="0.01" name="root" pos="0 0 0" type="free"/>
<body name="leftwheel" pos="0 0 0">
<geom name="frameL" pos="-1 0 1" size="0.05 0.05 0.5" type="box" rgba="1 1 0 1"/>
<body name="lwheel">
<geom mass="1" name="leftwheel" type="mesh" mesh="wheelL"/>
<joint axis="0 1 0" name="hingeLY" pos="-1 0 0.5" limited="false" type="hinge"/>
</body>
<joint axis="0 0 1" name="hingeLZ" pos="-1 0 0" limited="true" range="-45 45" type="hinge"/>
</body>
<body name="rightwheel" pos="0 0 0">
<geom name="frameR" pos="1 0 1" size="0.05 0.05 0.5" type="box" rgba="1 1 0 1"/>
<body name="rwheel">
<geom mass="1" name="rightwheel" type="mesh" mesh="wheelR" />
<joint axis="0 1 0" name="hingeRY" pos="1 0 0.5" limited="false" type="hinge"/>
</body>
<joint axis="0 0 1" name="hingeRZ" pos="1 0 0" limited="true" range="-45 45" type="hinge"/>
</body>
</body>
</worldbody>
<actuator>
<motor ctrllimited="true" ctrlrange="-1 1" gear="100" joint="hingeRY" name="hingeRYa"/>
<motor ctrllimited="true" ctrlrange="-1 1" gear="100" joint="hingeRZ" name="hingeRZa"/>
<motor ctrllimited="true" ctrlrange="-1 1" gear="100" joint="hingeLY" name="hingeLYa"/>
<motor ctrllimited="true" ctrlrange="-1 1" gear="100" joint="hingeLZ" name="hingeLZa"/>
</actuator>
</mujoco>