|
| 1 | +# Copyright (c) 2025, The Berkeley Humanoid Lite Project Developers. |
| 2 | + |
| 3 | +import os |
| 4 | + |
| 5 | +import isaaclab.sim as sim_utils |
| 6 | +from isaaclab.actuators import ImplicitActuatorCfg |
| 7 | +from isaaclab.assets.articulation import ArticulationCfg |
| 8 | + |
| 9 | +ISAACLAB_ASSET_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "data")) |
| 10 | + |
| 11 | +HUMANOID_LITE_LEG_JOINTS = [ |
| 12 | + "leg_left_hip_roll_joint", |
| 13 | + "leg_left_hip_yaw_joint", |
| 14 | + "leg_left_hip_pitch_joint", |
| 15 | + "leg_left_knee_pitch_joint", |
| 16 | + "leg_left_ankle_pitch_joint", |
| 17 | + "leg_left_ankle_roll_joint", |
| 18 | + "leg_right_hip_roll_joint", |
| 19 | + "leg_right_hip_yaw_joint", |
| 20 | + "leg_right_hip_pitch_joint", |
| 21 | + "leg_right_knee_pitch_joint", |
| 22 | + "leg_right_ankle_pitch_joint", |
| 23 | + "leg_right_ankle_roll_joint", |
| 24 | +] |
| 25 | + |
| 26 | +HUMANOID_LITE_ARM_JOINTS = [ |
| 27 | + "arm_left_shoulder_pitch_joint", |
| 28 | + "arm_left_shoulder_roll_joint", |
| 29 | + "arm_left_shoulder_yaw_joint", |
| 30 | + "arm_left_elbow_pitch_joint", |
| 31 | + "arm_left_elbow_roll_joint", |
| 32 | + "arm_right_shoulder_pitch_joint", |
| 33 | + "arm_right_shoulder_roll_joint", |
| 34 | + "arm_right_shoulder_yaw_joint", |
| 35 | + "arm_right_elbow_pitch_joint", |
| 36 | + "arm_right_elbow_roll_joint", |
| 37 | +] |
| 38 | + |
| 39 | +HUMANOID_LITE_JOINTS = HUMANOID_LITE_ARM_JOINTS + HUMANOID_LITE_LEG_JOINTS |
| 40 | + |
| 41 | +HUMANOID_LITE_BIPED_CFG = ArticulationCfg( |
| 42 | + spawn=sim_utils.UsdFileCfg( |
| 43 | + usd_path=f"{ISAACLAB_ASSET_DIR}/usd/berkeley_humanoid_lite_biped.usd", |
| 44 | + activate_contact_sensors=True, |
| 45 | + rigid_props=sim_utils.RigidBodyPropertiesCfg( |
| 46 | + disable_gravity=False, |
| 47 | + retain_accelerations=False, |
| 48 | + linear_damping=0.0, |
| 49 | + angular_damping=0.0, |
| 50 | + max_linear_velocity=1000.0, |
| 51 | + max_angular_velocity=1000.0, |
| 52 | + max_depenetration_velocity=1.0, |
| 53 | + ), |
| 54 | + articulation_props=sim_utils.ArticulationRootPropertiesCfg( |
| 55 | + enabled_self_collisions=False, solver_position_iteration_count=8, solver_velocity_iteration_count=4 |
| 56 | + ), |
| 57 | + ), |
| 58 | + init_state=ArticulationCfg.InitialStateCfg( |
| 59 | + pos=(0.0, 0.0, 0.6), |
| 60 | + joint_pos={ |
| 61 | + "leg_left_hip_roll_joint": 0.0, |
| 62 | + "leg_left_hip_yaw_joint": 0.0, |
| 63 | + "leg_left_hip_pitch_joint": -0.2, |
| 64 | + "leg_left_knee_pitch_joint": 0.4, |
| 65 | + "leg_left_ankle_pitch_joint": -0.3, |
| 66 | + "leg_left_ankle_roll_joint": 0.0, |
| 67 | + "leg_right_hip_roll_joint": 0.0, |
| 68 | + "leg_right_hip_yaw_joint": 0.0, |
| 69 | + "leg_right_hip_pitch_joint": -0.2, |
| 70 | + "leg_right_knee_pitch_joint": 0.4, |
| 71 | + "leg_right_ankle_pitch_joint": -0.3, |
| 72 | + "leg_right_ankle_roll_joint": 0.0, |
| 73 | + }, |
| 74 | + joint_vel={".*": 0.0}, |
| 75 | + ), |
| 76 | + soft_joint_pos_limit_factor=0.9, |
| 77 | + actuators={ |
| 78 | + "legs": ImplicitActuatorCfg( |
| 79 | + joint_names_expr=[ |
| 80 | + "leg_.*_hip_yaw_joint", |
| 81 | + "leg_.*_hip_roll_joint", |
| 82 | + "leg_.*_hip_pitch_joint", |
| 83 | + "leg_.*_knee_pitch_joint", |
| 84 | + ], |
| 85 | + effort_limit=6, |
| 86 | + velocity_limit=10.0, |
| 87 | + stiffness=20, |
| 88 | + damping=2, |
| 89 | + armature=0.007, |
| 90 | + ), |
| 91 | + "ankles": ImplicitActuatorCfg( |
| 92 | + joint_names_expr=[ |
| 93 | + "leg_.*_ankle_pitch_joint", |
| 94 | + "leg_.*_ankle_roll_joint", |
| 95 | + ], |
| 96 | + effort_limit=6, |
| 97 | + velocity_limit=10.0, |
| 98 | + stiffness=20, |
| 99 | + damping=2, |
| 100 | + armature=0.002, |
| 101 | + ), |
| 102 | + }, |
| 103 | +) |
| 104 | +"""Configuration for the Berkeley Humanoid Lite robot in bipedal mode.""" |
| 105 | + |
| 106 | +HUMANOID_LITE_CFG = ArticulationCfg( |
| 107 | + spawn=sim_utils.UsdFileCfg( |
| 108 | + usd_path=f"{ISAACLAB_ASSET_DIR}/usd/berkeley_humanoid_lite.usd", |
| 109 | + activate_contact_sensors=True, |
| 110 | + rigid_props=sim_utils.RigidBodyPropertiesCfg( |
| 111 | + disable_gravity=False, |
| 112 | + retain_accelerations=False, |
| 113 | + linear_damping=0.0, |
| 114 | + angular_damping=0.0, |
| 115 | + max_linear_velocity=1000.0, |
| 116 | + max_angular_velocity=1000.0, |
| 117 | + max_depenetration_velocity=1.0, |
| 118 | + ), |
| 119 | + articulation_props=sim_utils.ArticulationRootPropertiesCfg( |
| 120 | + enabled_self_collisions=False, solver_position_iteration_count=8, solver_velocity_iteration_count=4 |
| 121 | + ), |
| 122 | + ), |
| 123 | + init_state=ArticulationCfg.InitialStateCfg( |
| 124 | + pos=(0.0, 0.0, 0.6), |
| 125 | + joint_pos={ |
| 126 | + "arm_left_shoulder_pitch_joint": 0.0, |
| 127 | + "arm_left_shoulder_roll_joint": 0.0, |
| 128 | + "arm_left_shoulder_yaw_joint": 0.0, |
| 129 | + "arm_left_elbow_pitch_joint": 0.0, |
| 130 | + "arm_left_elbow_roll_joint": 0.0, |
| 131 | + "arm_right_shoulder_pitch_joint": 0.0, |
| 132 | + "arm_right_shoulder_roll_joint": 0.0, |
| 133 | + "arm_right_shoulder_yaw_joint": 0.0, |
| 134 | + "arm_right_elbow_pitch_joint": 0.0, |
| 135 | + "arm_right_elbow_roll_joint": 0.0, |
| 136 | + "leg_left_hip_roll_joint": 0.0, |
| 137 | + "leg_left_hip_yaw_joint": 0.0, |
| 138 | + "leg_left_hip_pitch_joint": -0.2, |
| 139 | + "leg_left_knee_pitch_joint": 0.4, |
| 140 | + "leg_left_ankle_pitch_joint": -0.3, |
| 141 | + "leg_left_ankle_roll_joint": 0.0, |
| 142 | + "leg_right_hip_roll_joint": 0.0, |
| 143 | + "leg_right_hip_yaw_joint": 0.0, |
| 144 | + "leg_right_hip_pitch_joint": -0.2, |
| 145 | + "leg_right_knee_pitch_joint": 0.4, |
| 146 | + "leg_right_ankle_pitch_joint": -0.3, |
| 147 | + "leg_right_ankle_roll_joint": 0.0, |
| 148 | + }, |
| 149 | + joint_vel={".*": 0.0}, |
| 150 | + ), |
| 151 | + soft_joint_pos_limit_factor=0.9, |
| 152 | + actuators={ |
| 153 | + "arms": ImplicitActuatorCfg( |
| 154 | + joint_names_expr=[ |
| 155 | + "arm_.*_shoulder_pitch_joint", |
| 156 | + "arm_.*_shoulder_roll_joint", |
| 157 | + "arm_.*_shoulder_yaw_joint", |
| 158 | + "arm_.*_elbow_pitch_joint", |
| 159 | + "arm_.*_elbow_roll_joint", |
| 160 | + ], |
| 161 | + effort_limit=4, |
| 162 | + velocity_limit=10.0, |
| 163 | + stiffness=10, |
| 164 | + damping=2, |
| 165 | + armature=0.002, |
| 166 | + ), |
| 167 | + "legs": ImplicitActuatorCfg( |
| 168 | + joint_names_expr=[ |
| 169 | + "leg_.*_hip_yaw_joint", |
| 170 | + "leg_.*_hip_roll_joint", |
| 171 | + "leg_.*_hip_pitch_joint", |
| 172 | + "leg_.*_knee_pitch_joint", |
| 173 | + ], |
| 174 | + effort_limit=6, |
| 175 | + velocity_limit=10.0, |
| 176 | + stiffness=20, |
| 177 | + damping=2, |
| 178 | + armature=0.007, |
| 179 | + ), |
| 180 | + "ankles": ImplicitActuatorCfg( |
| 181 | + joint_names_expr=[ |
| 182 | + "leg_.*_ankle_pitch_joint", |
| 183 | + "leg_.*_ankle_roll_joint", |
| 184 | + ], |
| 185 | + effort_limit=6, |
| 186 | + velocity_limit=10.0, |
| 187 | + stiffness=20, |
| 188 | + damping=2, |
| 189 | + armature=0.002, |
| 190 | + ), |
| 191 | + }, |
| 192 | +) |
| 193 | +"""Configuration for the Berkeley Humanoid Lite robot.""" |
0 commit comments