72 lines
2.7 KiB
XML
72 lines
2.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<mujoco model="VLA 3D 导航 - 圆柱体与障碍物">
|
||
<option timestep="0.002" gravity="0 0 -9.81"/>
|
||
|
||
<default>
|
||
<geom friction="1 0.5 0.5" condim="3"/>
|
||
</default>
|
||
|
||
<worldbody>
|
||
<!-- 地面 -->
|
||
<geom name="floor" type="plane" size="10 10 0.1" rgba="0.7 0.7 0.75 1"/>
|
||
|
||
<!-- 圆柱体小车(全向移动:vx, vy, wz) -->
|
||
<body name="cylinder_agent" pos="0 0 0.35">
|
||
<joint name="slide_x" type="slide" axis="1 0 0"/>
|
||
<joint name="slide_y" type="slide" axis="0 1 0"/>
|
||
<joint name="hinge_yaw" type="hinge" axis="0 0 1"/>
|
||
<geom name="agent_body" type="cylinder" size="0.2 0.15" rgba="0.2 0.6 0.9 1"
|
||
mass="5"/>
|
||
<!-- 前进方向箭头 X/Y/Z(contype/conaffinity=0 不参与碰撞) -->
|
||
<geom name="axis_x" type="cylinder" fromto="0 0 0 0.38 0 0" size="0.035"
|
||
rgba="1 0 0 0.95" contype="0" conaffinity="0"/>
|
||
<geom name="axis_y" type="cylinder" fromto="0 0 0 0 0.25 0" size="0.025"
|
||
rgba="0 0.9 0 0.9" contype="0" conaffinity="0"/>
|
||
<geom name="axis_z" type="cylinder" fromto="0 0 0 0 0 0.2" size="0.025"
|
||
rgba="0 0 1 0.9" contype="0" conaffinity="0"/>
|
||
<site name="ray_origin" pos="0.25 0 0" size="0.01"/>
|
||
</body>
|
||
|
||
<!-- 目标点标记(用 freejoint 可动态更新位置) -->
|
||
<body name="goal_marker" pos="0 0 0.15">
|
||
<freejoint name="goal_joint"/>
|
||
<geom name="goal_geom" type="sphere" size="0.12" rgba="1 1 0 0.6"
|
||
contype="0" conaffinity="0"/>
|
||
</body>
|
||
|
||
<!-- 障碍物 1: 红色盒子 -->
|
||
<body name="obstacle_box1" pos="1.5 0 0.25">
|
||
<geom name="obs_box1" type="box" size="0.3 0.3 0.25" rgba="0.9 0.2 0.2 1"/>
|
||
</body>
|
||
|
||
<!-- 障碍物 2: 绿色圆柱 -->
|
||
<body name="obstacle_cyl1" pos="-1.2 1.0 0.2">
|
||
<geom name="obs_cyl1" type="cylinder" size="0.15 0.2" rgba="0.2 0.8 0.3 1"/>
|
||
</body>
|
||
|
||
<!-- 障碍物 3: 蓝色球体 -->
|
||
<body name="obstacle_sphere1" pos="0.8 -1.0 0.15">
|
||
<geom name="obs_sphere1" type="sphere" size="0.15" rgba="0.2 0.3 0.9 1"/>
|
||
</body>
|
||
|
||
<!-- 障碍物 4: 黄色盒子 -->
|
||
<body name="obstacle_box2" pos="-0.5 -0.8 0.2">
|
||
<geom name="obs_box2" type="box" size="0.25 0.25 0.2" rgba="0.95 0.85 0.2 1"/>
|
||
</body>
|
||
|
||
<!-- 障碍物 5: 紫色圆柱 -->
|
||
<body name="obstacle_cyl2" pos="1.0 0.8 0.25">
|
||
<geom name="obs_cyl2" type="cylinder" size="0.12 0.25" rgba="0.6 0.2 0.8 1"/>
|
||
</body>
|
||
|
||
<camera name="top_down" pos="0 0 5" xyaxes="1 0 0 0 1 0"/>
|
||
</worldbody>
|
||
|
||
<!-- 全向 velocity 执行器 -->
|
||
<actuator>
|
||
<velocity name="vel_x" joint="slide_x" kv="80"/>
|
||
<velocity name="vel_y" joint="slide_y" kv="80"/>
|
||
<velocity name="vel_yaw" joint="hinge_yaw" kv="30"/>
|
||
</actuator>
|
||
</mujoco>
|