1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
| """ Step 3: 物理属性配置 ==================== 关节、碰撞几何、质量、摩擦 """
import numpy as np
PHYSICS_CONFIG = { "steering_wheel": { "joints": { "steering_axis": { "type": "revolute", "axis": [0, 0, 1], "limits": [-450, 450], "damping": 0.5, }, }, "collision": { "type": "convex_hull", "collision_mesh": "steering_wheel_collision.usd", }, "mass": 1.5, "friction": 0.8, }, "driver_seat": { "joints": { "slider": { "type": "prismatic", "axis": [1, 0, 0], "limits": [0, 0.25], }, "recline": { "type": "revolute", "axis": [0, 1, 0], "limits": [-30, 30], }, }, "collision": { "type": "convex_decomposition", "parts": ["cushion_col", "backrest_col", "headrest_col"], }, "mass": 25.0, "friction": 0.6, }, "driver_human": { "joints": { "neck": {"type": "revolute", "limits": [-60, 60]}, "spine": {"type": "spherical", "limits": [-30, 30]}, "shoulder_left": {"type": "spherical", "limits": [0, 180]}, "elbow_left": {"type": "revolute", "limits": [0, 150]}, "hip_left": {"type": "spherical", "limits": [-90, 90]}, "knee_left": {"type": "revolute", "limits": [0, 150]}, }, "collision": { "type": "capsule_decomposition", "parts": ["head", "torso", "upper_arm_l", "lower_arm_l", "upper_arm_r", "lower_arm_r", "upper_leg_l", "lower_leg_l", "upper_leg_r", "lower_leg_r"], }, "mass": 75.0, "friction": 0.4, }, }
OOP_SCENARIOS = { "forward_lean": { "description": "驾驶员前倾到仪表台", "joint_changes": {"spine": 45, "neck": 30, "shoulder_left": 90, "shoulder_right": 90}, "collision_check": "torso vs dashboard", "airbag_risk": "HIGH", }, "side_lean": { "description": "驾驶员侧倾到副驾", "joint_changes": {"spine": -35, "neck": -20}, "collision_check": "torso vs center_console", "airbag_risk": "MEDIUM", }, "backward_lean": { "description": "驾驶员后仰靠座椅", "joint_changes": {"spine": -30, "neck": -15}, "collision_check": "head vs headrest", "airbag_risk": "LOW (normal position)", }, "feet_on_dash": { "description": "乘客脚放到仪表台", "joint_changes": {"hip_left": 90, "hip_right": 90, "knee_left": 0, "knee_right": 0}, "collision_check": "feet vs dashboard", "airbag_risk": "CRITICAL", }, }
|