Files
walkersim/sim/mujoco/model/walker.xml

115 lines
6.1 KiB
XML

<mujoco model="walker_linkage_v2">
<compiler angle="radian" autolimits="true"/>
<option timestep="0.005" integrator="implicitfast" gravity="0 0 -9.81" iterations="120" ls_iterations="20"/>
<visual>
<global offwidth="1920" offheight="1080"/>
<headlight diffuse="0.85 0.85 0.85" ambient="0.3 0.3 0.3" specular="0.1 0.1 0.1"/>
<rgba haze="0.08 0.12 0.18 1"/>
</visual>
<default>
<joint damping="0.9" armature="0.005" frictionloss="0.02"/>
<geom friction="1.3 0.04 0.002" condim="4" solref="0.01 1" solimp="0.92 0.98 0.001"/>
<motor ctrllimited="true" ctrlrange="-140 140"/>
</default>
<asset>
<texture name="texplane" type="2d" builtin="checker" width="512" height="512" rgb1="0.17 0.19 0.23" rgb2="0.12 0.13 0.16"/>
<material name="matplane" texture="texplane" texrepeat="8 8" reflectance="0.05"/>
</asset>
<worldbody>
<light directional="true" diffuse="0.95 0.95 0.95" specular="0.2 0.2 0.2" pos="0 0 5" dir="0 0 -1"/>
<geom name="floor" type="plane" size="20 20 0.1" material="matplane" friction="1.4 0.05 0.002"/>
<body name="torso" pos="0 0 0">
<joint name="root_x" type="slide" axis="1 0 0" damping="0.4"/>
<joint name="root_z" type="slide" axis="0 0 1" range="0.25 1.2" damping="6.0"/>
<joint name="root_pitch" type="hinge" axis="0 1 0" range="-0.9 0.9" damping="1.4"/>
<geom name="torso_geom" type="capsule" fromto="-0.30 0 0 0.30 0 0" size="0.05" mass="6.0" rgba="0.85 0.25 0.22 1"/>
<!-- Near side (+Y): one crank motor drives two legs via tandem links -->
<body name="near_crank" pos="0 0.08 0">
<joint name="near_crank_joint" type="hinge" axis="0 1 0" damping="0.2"/>
<geom type="capsule" fromto="0 0 0 -0.0024 0 -0.0457" size="0.007" mass="0.12" rgba="0.10 0.95 0.12 1"/>
<body name="near_leg_f" pos="-0.0024 0 -0.0457">
<joint name="near_leg_f_joint" type="hinge" axis="0 1 0" damping="0.6"/>
<geom type="capsule" fromto="0 0 0 -0.2795 0 -0.3535" size="0.014" mass="0.42" rgba="0.30 0.62 0.92 1"/>
<site name="near_D_site" pos="-0.1460 0 -0.1728" size="0.006" rgba="1 1 0 1"/>
<site name="near_F_site" pos="-0.2795 0 -0.3535" size="0.007" rgba="1 0.8 0.1 1"/>
<geom name="near_front_foot" type="sphere" pos="-0.2795 0 -0.3535" size="0.022" mass="0.12" rgba="0.95 0.62 0.26 1"/>
</body>
<body name="near_leg_g" pos="-0.0024 0 -0.0457">
<joint name="near_leg_g_joint" type="hinge" axis="0 1 0" damping="0.6"/>
<geom type="capsule" fromto="0 0 0 0.2801 0 -0.3522" size="0.014" mass="0.42" rgba="0.36 0.68 0.95 1"/>
<site name="near_E_site" pos="0.1408 0 -0.1660" size="0.006" rgba="1 1 0 1"/>
<site name="near_G_site" pos="0.2801 0 -0.3522" size="0.007" rgba="1 0.8 0.1 1"/>
<geom name="near_rear_foot" type="sphere" pos="0.2801 0 -0.3522" size="0.022" mass="0.12" rgba="0.95 0.62 0.26 1"/>
</body>
</body>
<body name="near_tendon_f" pos="-0.2715 0.08 -0.0020">
<joint name="near_tendon_f_joint" type="hinge" axis="0 1 0" damping="0.8"/>
<geom type="capsule" fromto="0 0 0 0.1231 0 -0.2165" size="0.011" mass="0.24" rgba="0.95 0.56 0.25 1"/>
</body>
<body name="near_tendon_g" pos="0.2744 0.08 -0.0040">
<joint name="near_tendon_g_joint" type="hinge" axis="0 1 0" damping="0.8"/>
<geom type="capsule" fromto="0 0 0 -0.1360 0 -0.2076" size="0.011" mass="0.24" rgba="0.95 0.56 0.25 1"/>
</body>
<!-- Far side (-Y): same linkage, separate crank motor -->
<body name="far_crank" pos="0 -0.08 0">
<joint name="far_crank_joint" type="hinge" axis="0 1 0" damping="0.2"/>
<geom type="capsule" fromto="0 0 0 -0.0024 0 -0.0457" size="0.007" mass="0.12" rgba="0.10 0.95 0.12 0.65"/>
<body name="far_leg_f" pos="-0.0024 0 -0.0457">
<joint name="far_leg_f_joint" type="hinge" axis="0 1 0" damping="0.6"/>
<geom type="capsule" fromto="0 0 0 -0.2795 0 -0.3535" size="0.014" mass="0.42" rgba="0.30 0.62 0.92 0.72"/>
<site name="far_D_site" pos="-0.1460 0 -0.1728" size="0.006" rgba="1 1 0 0.9"/>
<site name="far_F_site" pos="-0.2795 0 -0.3535" size="0.007" rgba="1 0.8 0.1 0.9"/>
<geom name="far_front_foot" type="sphere" pos="-0.2795 0 -0.3535" size="0.022" mass="0.12" rgba="0.95 0.62 0.26 0.75"/>
</body>
<body name="far_leg_g" pos="-0.0024 0 -0.0457">
<joint name="far_leg_g_joint" type="hinge" axis="0 1 0" damping="0.6"/>
<geom type="capsule" fromto="0 0 0 0.2801 0 -0.3522" size="0.014" mass="0.42" rgba="0.36 0.68 0.95 0.72"/>
<site name="far_E_site" pos="0.1408 0 -0.1660" size="0.006" rgba="1 1 0 0.9"/>
<site name="far_G_site" pos="0.2801 0 -0.3522" size="0.007" rgba="1 0.8 0.1 0.9"/>
<geom name="far_rear_foot" type="sphere" pos="0.2801 0 -0.3522" size="0.022" mass="0.12" rgba="0.95 0.62 0.26 0.75"/>
</body>
</body>
<body name="far_tendon_f" pos="-0.2715 -0.08 -0.0020">
<joint name="far_tendon_f_joint" type="hinge" axis="0 1 0" damping="0.8"/>
<geom type="capsule" fromto="0 0 0 0.1231 0 -0.2165" size="0.011" mass="0.24" rgba="0.95 0.56 0.25 0.72"/>
</body>
<body name="far_tendon_g" pos="0.2744 -0.08 -0.0040">
<joint name="far_tendon_g_joint" type="hinge" axis="0 1 0" damping="0.8"/>
<geom type="capsule" fromto="0 0 0 -0.1360 0 -0.2076" size="0.011" mass="0.24" rgba="0.95 0.56 0.25 0.72"/>
</body>
</body>
</worldbody>
<equality>
<connect body1="near_leg_f" body2="near_tendon_f" anchor="-0.1484 0.08 -0.2185"/>
<connect body1="near_leg_g" body2="near_tendon_g" anchor="0.1384 0.08 -0.2116"/>
<connect body1="far_leg_f" body2="far_tendon_f" anchor="-0.1484 -0.08 -0.2185"/>
<connect body1="far_leg_g" body2="far_tendon_g" anchor="0.1384 -0.08 -0.2116"/>
</equality>
<actuator>
<motor name="near_crank_motor" joint="near_crank_joint" gear="1"/>
<motor name="far_crank_motor" joint="far_crank_joint" gear="1"/>
</actuator>
<keyframe>
<key name="stand" qpos="0 0.42 0 0 0 0 0 0 0 0 0 0 0"/>
</keyframe>
</mujoco>