Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ set(ROBOTS
lite
lite_bimanual
lite_biped
lite_biped_debug
lite_dummy
lite_pro
)
Expand Down
9 changes: 9 additions & 0 deletions robot_assets/workflow/urdf_to_mjcf.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,18 @@ def is_collision(geom: ET.Element) -> bool:
def walk(body: ET.Element, in_foot: bool) -> None:
nonlocal n_foot, n_other
foot = in_foot or (body.get("name") in foot_bodies)
# Name collision geoms <body>_collision_<i>. MuJoCo leaves URDF-imported
# geoms anonymous, but the training env selects them BY NAME -- mjlab's
# friction DR matches r"^(left|right)_foot_collision_\d+$" -- and an
# unnamed geom can never match, so the randomization would silently do
# nothing. Only fills blanks; an explicit name in the MJCF wins.
collision_index = 0
for geom in body.findall("geom"):
if not is_collision(geom):
continue
if not geom.get("name"):
geom.set("name", f"{body.get('name')}_collision_{collision_index}")
collision_index += 1
if foot:
geom.set("condim", "3")
geom.set("friction", foot_friction_str)
Expand Down
2 changes: 1 addition & 1 deletion robots/lite/mjcf/lite.xml
Original file line number Diff line number Diff line change
Expand Up @@ -462,4 +462,4 @@
</body>
</body>
</worldbody>
<actuator><motor name="left_hip_pitch" joint="left_hip_pitch" forcerange="-36.0 36.0" /><motor name="left_hip_roll" joint="left_hip_roll" forcerange="-36.0 36.0" /><motor name="left_hip_yaw" joint="left_hip_yaw" forcerange="-17.0 17.0" /><motor name="left_knee_pitch" joint="left_knee_pitch" forcerange="-36.0 36.0" /><motor name="left_ankle_yaw" joint="left_ankle_yaw" forcerange="-14.0 14.0" /><motor name="left_ankle_pitch" joint="left_ankle_pitch" forcerange="-14.0 14.0" /><motor name="left_ankle_roll" joint="left_ankle_roll" forcerange="-5.5 5.5" /><motor name="right_hip_pitch" joint="right_hip_pitch" forcerange="-36.0 36.0" /><motor name="right_hip_roll" joint="right_hip_roll" forcerange="-36.0 36.0" /><motor name="right_hip_yaw" joint="right_hip_yaw" forcerange="-17.0 17.0" /><motor name="right_knee_pitch" joint="right_knee_pitch" forcerange="-36.0 36.0" /><motor name="right_ankle_yaw" joint="right_ankle_yaw" forcerange="-14.0 14.0" /><motor name="right_ankle_pitch" joint="right_ankle_pitch" forcerange="-14.0 14.0" /><motor name="right_ankle_roll" joint="right_ankle_roll" forcerange="-5.5 5.5" /><motor name="waist_yaw" joint="waist_yaw" forcerange="-36.0 36.0" /><motor name="left_shoulder_pitch" joint="left_shoulder_pitch" forcerange="-17.0 17.0" /><motor name="left_shoulder_roll" joint="left_shoulder_roll" forcerange="-14.0 14.0" /><motor name="left_shoulder_yaw" joint="left_shoulder_yaw" forcerange="-14.0 14.0" /><motor name="left_elbow_pitch" joint="left_elbow_pitch" forcerange="-14.0 14.0" /><motor name="left_wrist_yaw" joint="left_wrist_yaw" forcerange="-5.5 5.5" /><motor name="left_wrist_roll" joint="left_wrist_roll" forcerange="-5.5 5.5" /><motor name="left_wrist_pitch" joint="left_wrist_pitch" forcerange="-5.5 5.5" /><motor name="left_finger1_j1" joint="left_finger1_j1" forcerange="-10 10" /><motor name="left_finger1_j2" joint="left_finger1_j2" forcerange="-10 10" /><motor name="left_finger1_j3" joint="left_finger1_j3" forcerange="-10 10" /><motor name="left_finger1_j4" joint="left_finger1_j4" forcerange="-10 10" /><motor name="left_finger2_j1" joint="left_finger2_j1" forcerange="-10 10" /><motor name="left_finger2_j2" joint="left_finger2_j2" forcerange="-10 10" /><motor name="left_finger2_j3" joint="left_finger2_j3" forcerange="-10 10" /><motor name="left_finger2_j4" joint="left_finger2_j4" forcerange="-10 10" /><motor name="left_finger3_j1" joint="left_finger3_j1" forcerange="-10 10" /><motor name="left_finger3_j2" joint="left_finger3_j2" forcerange="-10 10" /><motor name="left_finger3_j3" joint="left_finger3_j3" forcerange="-10 10" /><motor name="left_finger3_j4" joint="left_finger3_j4" forcerange="-10 10" /><motor name="left_finger4_j1" joint="left_finger4_j1" forcerange="-10 10" /><motor name="left_finger4_j2" joint="left_finger4_j2" forcerange="-10 10" /><motor name="left_finger4_j3" joint="left_finger4_j3" forcerange="-10 10" /><motor name="left_finger4_j4" joint="left_finger4_j4" forcerange="-10 10" /><motor name="left_finger5_j1" joint="left_finger5_j1" forcerange="-10 10" /><motor name="left_finger5_j2" joint="left_finger5_j2" forcerange="-10 10" /><motor name="left_finger5_j3" joint="left_finger5_j3" forcerange="-10 10" /><motor name="left_finger5_j4" joint="left_finger5_j4" forcerange="-10 10" /><motor name="right_shoulder_pitch" joint="right_shoulder_pitch" forcerange="-17.0 17.0" /><motor name="right_shoulder_roll" joint="right_shoulder_roll" forcerange="-14.0 14.0" /><motor name="right_shoulder_yaw" joint="right_shoulder_yaw" forcerange="-14.0 14.0" /><motor name="right_elbow_pitch" joint="right_elbow_pitch" forcerange="-14.0 14.0" /><motor name="right_wrist_yaw" joint="right_wrist_yaw" forcerange="-5.5 5.5" /><motor name="right_wrist_roll" joint="right_wrist_roll" forcerange="-5.5 5.5" /><motor name="right_wrist_pitch" joint="right_wrist_pitch" forcerange="-5.5 5.5" /><motor name="right_finger1_j1" joint="right_finger1_j1" forcerange="-10 10" /><motor name="right_finger1_j2" joint="right_finger1_j2" forcerange="-10 10" /><motor name="right_finger1_j3" joint="right_finger1_j3" forcerange="-10 10" /><motor name="right_finger1_j4" joint="right_finger1_j4" forcerange="-10 10" /><motor name="right_finger2_j1" joint="right_finger2_j1" forcerange="-10 10" /><motor name="right_finger2_j2" joint="right_finger2_j2" forcerange="-10 10" /><motor name="right_finger2_j3" joint="right_finger2_j3" forcerange="-10 10" /><motor name="right_finger2_j4" joint="right_finger2_j4" forcerange="-10 10" /><motor name="right_finger3_j1" joint="right_finger3_j1" forcerange="-10 10" /><motor name="right_finger3_j2" joint="right_finger3_j2" forcerange="-10 10" /><motor name="right_finger3_j3" joint="right_finger3_j3" forcerange="-10 10" /><motor name="right_finger3_j4" joint="right_finger3_j4" forcerange="-10 10" /><motor name="right_finger4_j1" joint="right_finger4_j1" forcerange="-10 10" /><motor name="right_finger4_j2" joint="right_finger4_j2" forcerange="-10 10" /><motor name="right_finger4_j3" joint="right_finger4_j3" forcerange="-10 10" /><motor name="right_finger4_j4" joint="right_finger4_j4" forcerange="-10 10" /><motor name="right_finger5_j1" joint="right_finger5_j1" forcerange="-10 10" /><motor name="right_finger5_j2" joint="right_finger5_j2" forcerange="-10 10" /><motor name="right_finger5_j3" joint="right_finger5_j3" forcerange="-10 10" /><motor name="right_finger5_j4" joint="right_finger5_j4" forcerange="-10 10" /><motor name="neck_yaw" joint="neck_yaw" forcerange="-4.8 4.8" /><motor name="neck_roll" joint="neck_roll" forcerange="-4.8 4.8" /><motor name="neck_pitch" joint="neck_pitch" forcerange="-4.8 4.8" /></actuator></mujoco>
<actuator><position name="left_hip_pitch" joint="left_hip_pitch" forcerange="-36.0 36.0" /><position name="left_hip_roll" joint="left_hip_roll" forcerange="-36.0 36.0" /><position name="left_hip_yaw" joint="left_hip_yaw" forcerange="-17.0 17.0" /><position name="left_knee_pitch" joint="left_knee_pitch" forcerange="-36.0 36.0" /><position name="left_ankle_yaw" joint="left_ankle_yaw" forcerange="-14.0 14.0" /><position name="left_ankle_pitch" joint="left_ankle_pitch" forcerange="-14.0 14.0" /><position name="left_ankle_roll" joint="left_ankle_roll" forcerange="-5.5 5.5" /><position name="right_hip_pitch" joint="right_hip_pitch" forcerange="-36.0 36.0" /><position name="right_hip_roll" joint="right_hip_roll" forcerange="-36.0 36.0" /><position name="right_hip_yaw" joint="right_hip_yaw" forcerange="-17.0 17.0" /><position name="right_knee_pitch" joint="right_knee_pitch" forcerange="-36.0 36.0" /><position name="right_ankle_yaw" joint="right_ankle_yaw" forcerange="-14.0 14.0" /><position name="right_ankle_pitch" joint="right_ankle_pitch" forcerange="-14.0 14.0" /><position name="right_ankle_roll" joint="right_ankle_roll" forcerange="-5.5 5.5" /><position name="waist_yaw" joint="waist_yaw" forcerange="-36.0 36.0" /><position name="left_shoulder_pitch" joint="left_shoulder_pitch" forcerange="-17.0 17.0" /><position name="left_shoulder_roll" joint="left_shoulder_roll" forcerange="-14.0 14.0" /><position name="left_shoulder_yaw" joint="left_shoulder_yaw" forcerange="-14.0 14.0" /><position name="left_elbow_pitch" joint="left_elbow_pitch" forcerange="-14.0 14.0" /><position name="left_wrist_yaw" joint="left_wrist_yaw" forcerange="-5.5 5.5" /><position name="left_wrist_roll" joint="left_wrist_roll" forcerange="-5.5 5.5" /><position name="left_wrist_pitch" joint="left_wrist_pitch" forcerange="-5.5 5.5" /><position name="left_finger1_j1" joint="left_finger1_j1" forcerange="-10 10" /><position name="left_finger1_j2" joint="left_finger1_j2" forcerange="-10 10" /><position name="left_finger1_j3" joint="left_finger1_j3" forcerange="-10 10" /><position name="left_finger1_j4" joint="left_finger1_j4" forcerange="-10 10" /><position name="left_finger2_j1" joint="left_finger2_j1" forcerange="-10 10" /><position name="left_finger2_j2" joint="left_finger2_j2" forcerange="-10 10" /><position name="left_finger2_j3" joint="left_finger2_j3" forcerange="-10 10" /><position name="left_finger2_j4" joint="left_finger2_j4" forcerange="-10 10" /><position name="left_finger3_j1" joint="left_finger3_j1" forcerange="-10 10" /><position name="left_finger3_j2" joint="left_finger3_j2" forcerange="-10 10" /><position name="left_finger3_j3" joint="left_finger3_j3" forcerange="-10 10" /><position name="left_finger3_j4" joint="left_finger3_j4" forcerange="-10 10" /><position name="left_finger4_j1" joint="left_finger4_j1" forcerange="-10 10" /><position name="left_finger4_j2" joint="left_finger4_j2" forcerange="-10 10" /><position name="left_finger4_j3" joint="left_finger4_j3" forcerange="-10 10" /><position name="left_finger4_j4" joint="left_finger4_j4" forcerange="-10 10" /><position name="left_finger5_j1" joint="left_finger5_j1" forcerange="-10 10" /><position name="left_finger5_j2" joint="left_finger5_j2" forcerange="-10 10" /><position name="left_finger5_j3" joint="left_finger5_j3" forcerange="-10 10" /><position name="left_finger5_j4" joint="left_finger5_j4" forcerange="-10 10" /><position name="right_shoulder_pitch" joint="right_shoulder_pitch" forcerange="-17.0 17.0" /><position name="right_shoulder_roll" joint="right_shoulder_roll" forcerange="-14.0 14.0" /><position name="right_shoulder_yaw" joint="right_shoulder_yaw" forcerange="-14.0 14.0" /><position name="right_elbow_pitch" joint="right_elbow_pitch" forcerange="-14.0 14.0" /><position name="right_wrist_yaw" joint="right_wrist_yaw" forcerange="-5.5 5.5" /><position name="right_wrist_roll" joint="right_wrist_roll" forcerange="-5.5 5.5" /><position name="right_wrist_pitch" joint="right_wrist_pitch" forcerange="-5.5 5.5" /><position name="right_finger1_j1" joint="right_finger1_j1" forcerange="-10 10" /><position name="right_finger1_j2" joint="right_finger1_j2" forcerange="-10 10" /><position name="right_finger1_j3" joint="right_finger1_j3" forcerange="-10 10" /><position name="right_finger1_j4" joint="right_finger1_j4" forcerange="-10 10" /><position name="right_finger2_j1" joint="right_finger2_j1" forcerange="-10 10" /><position name="right_finger2_j2" joint="right_finger2_j2" forcerange="-10 10" /><position name="right_finger2_j3" joint="right_finger2_j3" forcerange="-10 10" /><position name="right_finger2_j4" joint="right_finger2_j4" forcerange="-10 10" /><position name="right_finger3_j1" joint="right_finger3_j1" forcerange="-10 10" /><position name="right_finger3_j2" joint="right_finger3_j2" forcerange="-10 10" /><position name="right_finger3_j3" joint="right_finger3_j3" forcerange="-10 10" /><position name="right_finger3_j4" joint="right_finger3_j4" forcerange="-10 10" /><position name="right_finger4_j1" joint="right_finger4_j1" forcerange="-10 10" /><position name="right_finger4_j2" joint="right_finger4_j2" forcerange="-10 10" /><position name="right_finger4_j3" joint="right_finger4_j3" forcerange="-10 10" /><position name="right_finger4_j4" joint="right_finger4_j4" forcerange="-10 10" /><position name="right_finger5_j1" joint="right_finger5_j1" forcerange="-10 10" /><position name="right_finger5_j2" joint="right_finger5_j2" forcerange="-10 10" /><position name="right_finger5_j3" joint="right_finger5_j3" forcerange="-10 10" /><position name="right_finger5_j4" joint="right_finger5_j4" forcerange="-10 10" /><position name="neck_yaw" joint="neck_yaw" forcerange="-4.8 4.8" /><position name="neck_roll" joint="neck_roll" forcerange="-4.8 4.8" /><position name="neck_pitch" joint="neck_pitch" forcerange="-4.8 4.8" /></actuator></mujoco>
Loading
Loading