初始提交:关节模组仿真平台

- 三接口契约:自包含 MJCF / 配置 schema / 报告计算规范
- Python 流水线:urdf_to_mjcf → generate_schema → simulate_report(validate_module 一键编排)
- 输入案例 urdf + 生成产物 output(自包含 MJCF/schema/报告/网格副本)
- 详细架构说明 docs/architecture.md
This commit is contained in:
2026-08-28 11:37:47 +08:00
commit 4240bb889a
34 changed files with 6294 additions and 0 deletions
@@ -0,0 +1,68 @@
<mujoco model="planetary_joint_split_motor_demo">
<!-- 由 urdf_to_mjcf.py 自动生成:只补质量/惯量/作动器,不改变运动学/动力学/传动关系 -->
<compiler angle="radian" meshdir="meshes"/>
<option timestep="0.001" gravity="0 0 -9.81"/>
<default>
<joint damping="0.01" armature="0.0005"/>
<geom contype="0" conaffinity="0"/>
</default>
<asset>
<mesh name="carrier_link" file="carrier_link.stl" scale="0.001 0.001 0.001"/>
<mesh name="fixed_structure" file="fixed_structure.stl" scale="0.001 0.001 0.001"/>
<mesh name="motor_rotor" file="motor_rotor.stl" scale="0.001 0.001 0.001"/>
<mesh name="motor_stator" file="motor_stator_decimated.stl" scale="0.001 0.001 0.001"/>
<mesh name="planet_0_link" file="planet_0_link.stl" scale="0.001 0.001 0.001"/>
<mesh name="planet_1_link" file="planet_1_link.stl" scale="0.001 0.001 0.001"/>
<mesh name="planet_2_link" file="planet_2_link.stl" scale="0.001 0.001 0.001"/>
<mesh name="sun_drive" file="sun_drive.stl" scale="0.001 0.001 0.001"/>
</asset>
<worldbody>
<body name="base_link">
<inertial pos="0.0257167 7.22096e-05 -0.000297192" mass="0.551159" fullinertia="0.000656887 0.00056339 0.000561847 7.94201e-07 -3.24687e-06 -4.98415e-07"/>
<geom type="mesh" mesh="fixed_structure" rgba="0.62 0.68 0.72 1"/>
<geom type="mesh" mesh="motor_stator" rgba="0.3 0.34 0.38 1"/>
<body name="sun_link">
<inertial pos="0.0313876 -2.35229e-07 1.25343e-06" mass="0.277539" fullinertia="0.000266278 0.000167853 0.000167874 -1.18454e-09 1.34599e-10 -3.3208e-09"/>
<joint name="sun_input_joint" type="hinge" axis="1 0 0" range="-37.6991118431 37.6991118431"/>
<geom type="mesh" mesh="sun_drive" rgba="0.95 0.62 0.16 1"/>
<geom type="mesh" mesh="motor_rotor" rgba="0.8 0.33 0.16 1"/>
</body>
<body name="carrier_link">
<inertial pos="0.060147 -8.40334e-08 -3.49296e-08" mass="0.163946" fullinertia="8.63028e-05 4.65499e-05 4.65516e-05 -9.27503e-11 -4.76284e-12 3.77741e-10"/>
<joint name="carrier_output_joint" type="hinge" axis="1 0 0" range="-37.6991118431 37.6991118431"/>
<geom type="mesh" mesh="carrier_link" rgba="0.28 0.56 0.82 1"/>
<body name="planet_0_link" pos="0.0535 -0.0239016371622 -0.00217065450165">
<inertial pos="-0.00192323 -3.97574e-13 -1.58818e-10" mass="0.0159851" fullinertia="2.47374e-06 1.2559e-06 1.2559e-06 -2.46924e-15 1.66624e-17 1.84976e-14"/>
<joint name="planet_0_spin_joint" type="hinge" axis="1 0 0" range="-37.6991118431 37.6991118431"/>
<geom type="mesh" mesh="planet_0_link" rgba="0.76 0.78 0.8 1" pos="-0.0535 0.0239016371622 0.00217065450165"/>
</body>
<body name="planet_1_link" pos="0.0535 0.0138306605224 -0.0196140977237">
<inertial pos="-0.00192323 -1.31616e-10 3.93298e-10" mass="0.0159851" fullinertia="2.47374e-06 1.2559e-06 1.2559e-06 2.59167e-16 2.08757e-15 3.78659e-14"/>
<joint name="planet_1_spin_joint" type="hinge" axis="1 0 0" range="-37.6991118431 37.6991118431"/>
<geom type="mesh" mesh="planet_1_link" rgba="0.76 0.78 0.8 1" pos="-0.0535 -0.0138306605224 0.0196140977237"/>
</body>
<body name="planet_2_link" pos="0.0535 0.0100709766398 0.0217847522253">
<inertial pos="-0.00192323 -9.59476e-10 1.01754e-10" mass="0.0159851" fullinertia="2.47374e-06 1.2559e-06 1.2559e-06 2.46116e-15 -3.08763e-15 4.97491e-15"/>
<joint name="planet_2_spin_joint" type="hinge" axis="1 0 0" range="-37.6991118431 37.6991118431"/>
<geom type="mesh" mesh="planet_2_link" rgba="0.76 0.78 0.8 1" pos="-0.0535 -0.0100709766398 -0.0217847522253"/>
</body>
</body>
</body>
</worldbody>
<equality>
<joint joint1="carrier_output_joint" joint2="sun_input_joint" polycoef="0 0.166666666666667 0 0 0" solref="0.002 1" solimp="0.9 0.95 0.0001"/>
<joint joint1="planet_0_spin_joint" joint2="sun_input_joint" polycoef="0 -0.416666666666667 0 0 0" solref="0.002 1" solimp="0.9 0.95 0.0001"/>
<joint joint1="planet_1_spin_joint" joint2="sun_input_joint" polycoef="0 -0.416666666666667 0 0 0" solref="0.002 1" solimp="0.9 0.95 0.0001"/>
<joint joint1="planet_2_spin_joint" joint2="sun_input_joint" polycoef="0 -0.416666666666667 0 0 0" solref="0.002 1" solimp="0.9 0.95 0.0001"/>
</equality>
<actuator>
<motor name="input_motor" joint="sun_input_joint" gear="1" ctrlrange="-10 10"/>
<motor name="load_motor" joint="carrier_output_joint" gear="1" ctrlrange="-1e+06 1e+06"/>
</actuator>
</mujoco>