Spaces:
Sleeping
Sleeping
| <mujoco model="drone_forest"> | |
| <compiler angle="radian"/> | |
| <option timestep="0.002" gravity="0 0 -9.81" integrator="RK4"/> | |
| <default> | |
| <geom contype="1" conaffinity="1" condim="3" friction="1 0.5 0.5"/> | |
| <joint damping="0.01"/> | |
| </default> | |
| <asset> | |
| <texture name="grid" type="2d" builtin="checker" rgb1="0.3 0.6 0.3" rgb2="0.2 0.5 0.2" | |
| width="512" height="512"/> | |
| <material name="ground_mat" texture="grid" texrepeat="10 10" texuniform="true" | |
| reflectance="0.1"/> | |
| <material name="drone_body_mat" rgba="0.2 0.2 0.2 1"/> | |
| <material name="drone_arm_mat" rgba="0.4 0.4 0.4 1"/> | |
| <material name="rotor_mat" rgba="0.1 0.1 0.8 1"/> | |
| <material name="trunk_mat" rgba="0.45 0.3 0.15 1"/> | |
| <material name="canopy_mat" rgba="0.1 0.5 0.1 0.8"/> | |
| <material name="target_mat" rgba="1.0 0.0 0.0 0.6"/> | |
| </asset> | |
| <worldbody> | |
| <!-- Ground plane --> | |
| <geom name="ground" type="plane" size="25 25 0.1" material="ground_mat" | |
| contype="1" conaffinity="1"/> | |
| <!-- Drone --> | |
| <body name="drone" pos="0 0 1.5"> | |
| <freejoint name="drone_joint"/> | |
| <inertial pos="0 0 0" mass="0.4" diaginertia="0.003 0.003 0.005"/> | |
| <!-- Central body --> | |
| <geom name="drone_body" type="box" size="0.06 0.06 0.025" material="drone_body_mat" | |
| mass="0.2" contype="1" conaffinity="1"/> | |
| <!-- Arm +X (front-right) --> | |
| <geom name="arm_fr" type="capsule" fromto="0.04 -0.04 0 0.14 -0.14 0" | |
| size="0.01" material="drone_arm_mat" mass="0.02" contype="0" conaffinity="0"/> | |
| <site name="rotor_fr" pos="0.14 -0.14 0.01" size="0.04 0.005" type="cylinder" | |
| rgba="0.1 0.1 0.8 0.5"/> | |
| <!-- Arm +X +Y (front-left) --> | |
| <geom name="arm_fl" type="capsule" fromto="0.04 0.04 0 0.14 0.14 0" | |
| size="0.01" material="drone_arm_mat" mass="0.02" contype="0" conaffinity="0"/> | |
| <site name="rotor_fl" pos="0.14 0.14 0.01" size="0.04 0.005" type="cylinder" | |
| rgba="0.1 0.1 0.8 0.5"/> | |
| <!-- Arm -X -Y (back-right) --> | |
| <geom name="arm_br" type="capsule" fromto="-0.04 -0.04 0 -0.14 -0.14 0" | |
| size="0.01" material="drone_arm_mat" mass="0.02" contype="0" conaffinity="0"/> | |
| <site name="rotor_br" pos="-0.14 -0.14 0.01" size="0.04 0.005" type="cylinder" | |
| rgba="0.1 0.1 0.8 0.5"/> | |
| <!-- Arm -X +Y (back-left) --> | |
| <geom name="arm_bl" type="capsule" fromto="-0.04 0.04 0 -0.14 0.14 0" | |
| size="0.01" material="drone_arm_mat" mass="0.02" contype="0" conaffinity="0"/> | |
| <site name="rotor_bl" pos="-0.14 0.14 0.01" size="0.04 0.005" type="cylinder" | |
| rgba="0.1 0.1 0.8 0.5"/> | |
| <!-- FPV camera (front-facing, slightly down) --> | |
| <camera name="drone_fpv" pos="0.08 0 -0.01" xyaxes="0 -1 0 0.1 0 1" | |
| fovy="90"/> | |
| </body> | |
| <!-- Target (visual only) --> | |
| <body name="target" pos="5 5 1.5"> | |
| <geom name="target_geom" type="sphere" size="0.3" material="target_mat" | |
| contype="0" conaffinity="0"/> | |
| </body> | |
| <!-- 25 tree bodies - positions set at runtime via Python --> | |
| <body name="tree_0" pos="3 2 0"> | |
| <geom name="trunk_0" type="cylinder" size="0.15 1.5" pos="0 0 1.5" | |
| material="trunk_mat" contype="1" conaffinity="1"/> | |
| <geom name="canopy_0" type="sphere" size="0.6" pos="0 0 3.2" | |
| material="canopy_mat" contype="0" conaffinity="0"/> | |
| </body> | |
| <body name="tree_1" pos="5 -3 0"> | |
| <geom name="trunk_1" type="cylinder" size="0.15 1.5" pos="0 0 1.5" | |
| material="trunk_mat" contype="1" conaffinity="1"/> | |
| <geom name="canopy_1" type="sphere" size="0.6" pos="0 0 3.2" | |
| material="canopy_mat" contype="0" conaffinity="0"/> | |
| </body> | |
| <body name="tree_2" pos="-4 4 0"> | |
| <geom name="trunk_2" type="cylinder" size="0.15 1.5" pos="0 0 1.5" | |
| material="trunk_mat" contype="1" conaffinity="1"/> | |
| <geom name="canopy_2" type="sphere" size="0.6" pos="0 0 3.2" | |
| material="canopy_mat" contype="0" conaffinity="0"/> | |
| </body> | |
| <body name="tree_3" pos="7 1 0"> | |
| <geom name="trunk_3" type="cylinder" size="0.15 1.5" pos="0 0 1.5" | |
| material="trunk_mat" contype="1" conaffinity="1"/> | |
| <geom name="canopy_3" type="sphere" size="0.6" pos="0 0 3.2" | |
| material="canopy_mat" contype="0" conaffinity="0"/> | |
| </body> | |
| <body name="tree_4" pos="-2 -5 0"> | |
| <geom name="trunk_4" type="cylinder" size="0.15 1.5" pos="0 0 1.5" | |
| material="trunk_mat" contype="1" conaffinity="1"/> | |
| <geom name="canopy_4" type="sphere" size="0.6" pos="0 0 3.2" | |
| material="canopy_mat" contype="0" conaffinity="0"/> | |
| </body> | |
| <body name="tree_5" pos="1 6 0"> | |
| <geom name="trunk_5" type="cylinder" size="0.15 1.5" pos="0 0 1.5" | |
| material="trunk_mat" contype="1" conaffinity="1"/> | |
| <geom name="canopy_5" type="sphere" size="0.6" pos="0 0 3.2" | |
| material="canopy_mat" contype="0" conaffinity="0"/> | |
| </body> | |
| <body name="tree_6" pos="-6 -1 0"> | |
| <geom name="trunk_6" type="cylinder" size="0.15 1.5" pos="0 0 1.5" | |
| material="trunk_mat" contype="1" conaffinity="1"/> | |
| <geom name="canopy_6" type="sphere" size="0.6" pos="0 0 3.2" | |
| material="canopy_mat" contype="0" conaffinity="0"/> | |
| </body> | |
| <body name="tree_7" pos="4 -6 0"> | |
| <geom name="trunk_7" type="cylinder" size="0.15 1.5" pos="0 0 1.5" | |
| material="trunk_mat" contype="1" conaffinity="1"/> | |
| <geom name="canopy_7" type="sphere" size="0.6" pos="0 0 3.2" | |
| material="canopy_mat" contype="0" conaffinity="0"/> | |
| </body> | |
| <body name="tree_8" pos="-3 3 0"> | |
| <geom name="trunk_8" type="cylinder" size="0.15 1.5" pos="0 0 1.5" | |
| material="trunk_mat" contype="1" conaffinity="1"/> | |
| <geom name="canopy_8" type="sphere" size="0.6" pos="0 0 3.2" | |
| material="canopy_mat" contype="0" conaffinity="0"/> | |
| </body> | |
| <body name="tree_9" pos="6 4 0"> | |
| <geom name="trunk_9" type="cylinder" size="0.15 1.5" pos="0 0 1.5" | |
| material="trunk_mat" contype="1" conaffinity="1"/> | |
| <geom name="canopy_9" type="sphere" size="0.6" pos="0 0 3.2" | |
| material="canopy_mat" contype="0" conaffinity="0"/> | |
| </body> | |
| <body name="tree_10" pos="-5 -4 0"> | |
| <geom name="trunk_10" type="cylinder" size="0.15 1.5" pos="0 0 1.5" | |
| material="trunk_mat" contype="1" conaffinity="1"/> | |
| <geom name="canopy_10" type="sphere" size="0.6" pos="0 0 3.2" | |
| material="canopy_mat" contype="0" conaffinity="0"/> | |
| </body> | |
| <body name="tree_11" pos="2 -2 0"> | |
| <geom name="trunk_11" type="cylinder" size="0.15 1.5" pos="0 0 1.5" | |
| material="trunk_mat" contype="1" conaffinity="1"/> | |
| <geom name="canopy_11" type="sphere" size="0.6" pos="0 0 3.2" | |
| material="canopy_mat" contype="0" conaffinity="0"/> | |
| </body> | |
| <body name="tree_12" pos="-1 7 0"> | |
| <geom name="trunk_12" type="cylinder" size="0.15 1.5" pos="0 0 1.5" | |
| material="trunk_mat" contype="1" conaffinity="1"/> | |
| <geom name="canopy_12" type="sphere" size="0.6" pos="0 0 3.2" | |
| material="canopy_mat" contype="0" conaffinity="0"/> | |
| </body> | |
| <body name="tree_13" pos="8 -2 0"> | |
| <geom name="trunk_13" type="cylinder" size="0.15 1.5" pos="0 0 1.5" | |
| material="trunk_mat" contype="1" conaffinity="1"/> | |
| <geom name="canopy_13" type="sphere" size="0.6" pos="0 0 3.2" | |
| material="canopy_mat" contype="0" conaffinity="0"/> | |
| </body> | |
| <body name="tree_14" pos="-7 5 0"> | |
| <geom name="trunk_14" type="cylinder" size="0.15 1.5" pos="0 0 1.5" | |
| material="trunk_mat" contype="1" conaffinity="1"/> | |
| <geom name="canopy_14" type="sphere" size="0.6" pos="0 0 3.2" | |
| material="canopy_mat" contype="0" conaffinity="0"/> | |
| </body> | |
| <body name="tree_15" pos="3 7 0"> | |
| <geom name="trunk_15" type="cylinder" size="0.15 1.5" pos="0 0 1.5" | |
| material="trunk_mat" contype="1" conaffinity="1"/> | |
| <geom name="canopy_15" type="sphere" size="0.6" pos="0 0 3.2" | |
| material="canopy_mat" contype="0" conaffinity="0"/> | |
| </body> | |
| <body name="tree_16" pos="-4 -7 0"> | |
| <geom name="trunk_16" type="cylinder" size="0.15 1.5" pos="0 0 1.5" | |
| material="trunk_mat" contype="1" conaffinity="1"/> | |
| <geom name="canopy_16" type="sphere" size="0.6" pos="0 0 3.2" | |
| material="canopy_mat" contype="0" conaffinity="0"/> | |
| </body> | |
| <body name="tree_17" pos="7 -5 0"> | |
| <geom name="trunk_17" type="cylinder" size="0.15 1.5" pos="0 0 1.5" | |
| material="trunk_mat" contype="1" conaffinity="1"/> | |
| <geom name="canopy_17" type="sphere" size="0.6" pos="0 0 3.2" | |
| material="canopy_mat" contype="0" conaffinity="0"/> | |
| </body> | |
| <body name="tree_18" pos="-8 0 0"> | |
| <geom name="trunk_18" type="cylinder" size="0.15 1.5" pos="0 0 1.5" | |
| material="trunk_mat" contype="1" conaffinity="1"/> | |
| <geom name="canopy_18" type="sphere" size="0.6" pos="0 0 3.2" | |
| material="canopy_mat" contype="0" conaffinity="0"/> | |
| </body> | |
| <body name="tree_19" pos="0 -8 0"> | |
| <geom name="trunk_19" type="cylinder" size="0.15 1.5" pos="0 0 1.5" | |
| material="trunk_mat" contype="1" conaffinity="1"/> | |
| <geom name="canopy_19" type="sphere" size="0.6" pos="0 0 3.2" | |
| material="canopy_mat" contype="0" conaffinity="0"/> | |
| </body> | |
| <body name="tree_20" pos="5 8 0"> | |
| <geom name="trunk_20" type="cylinder" size="0.15 1.5" pos="0 0 1.5" | |
| material="trunk_mat" contype="1" conaffinity="1"/> | |
| <geom name="canopy_20" type="sphere" size="0.6" pos="0 0 3.2" | |
| material="canopy_mat" contype="0" conaffinity="0"/> | |
| </body> | |
| <body name="tree_21" pos="-6 6 0"> | |
| <geom name="trunk_21" type="cylinder" size="0.15 1.5" pos="0 0 1.5" | |
| material="trunk_mat" contype="1" conaffinity="1"/> | |
| <geom name="canopy_21" type="sphere" size="0.6" pos="0 0 3.2" | |
| material="canopy_mat" contype="0" conaffinity="0"/> | |
| </body> | |
| <body name="tree_22" pos="8 3 0"> | |
| <geom name="trunk_22" type="cylinder" size="0.15 1.5" pos="0 0 1.5" | |
| material="trunk_mat" contype="1" conaffinity="1"/> | |
| <geom name="canopy_22" type="sphere" size="0.6" pos="0 0 3.2" | |
| material="canopy_mat" contype="0" conaffinity="0"/> | |
| </body> | |
| <body name="tree_23" pos="-2 8 0"> | |
| <geom name="trunk_23" type="cylinder" size="0.15 1.5" pos="0 0 1.5" | |
| material="trunk_mat" contype="1" conaffinity="1"/> | |
| <geom name="canopy_23" type="sphere" size="0.6" pos="0 0 3.2" | |
| material="canopy_mat" contype="0" conaffinity="0"/> | |
| </body> | |
| <body name="tree_24" pos="1 -4 0"> | |
| <geom name="trunk_24" type="cylinder" size="0.15 1.5" pos="0 0 1.5" | |
| material="trunk_mat" contype="1" conaffinity="1"/> | |
| <geom name="canopy_24" type="sphere" size="0.6" pos="0 0 3.2" | |
| material="canopy_mat" contype="0" conaffinity="0"/> | |
| </body> | |
| <!-- Overhead tracking camera --> | |
| <camera name="tracking" pos="0 0 25" xyaxes="1 0 0 0 1 0" mode="trackcom" | |
| fovy="60"/> | |
| </worldbody> | |
| <!-- Site-based thrust actuators: force applied in site-local z (tilts with drone) --> | |
| <actuator> | |
| <general name="thrust_fr" site="rotor_fr" gear="0 0 1 0 0 0" ctrllimited="true" | |
| ctrlrange="0 3" gainprm="1" biasprm="0 0 0"/> | |
| <general name="thrust_fl" site="rotor_fl" gear="0 0 1 0 0 0" ctrllimited="true" | |
| ctrlrange="0 3" gainprm="1" biasprm="0 0 0"/> | |
| <general name="thrust_br" site="rotor_br" gear="0 0 1 0 0 0" ctrllimited="true" | |
| ctrlrange="0 3" gainprm="1" biasprm="0 0 0"/> | |
| <general name="thrust_bl" site="rotor_bl" gear="0 0 1 0 0 0" ctrllimited="true" | |
| ctrlrange="0 3" gainprm="1" biasprm="0 0 0"/> | |
| </actuator> | |
| </mujoco> | |