unilab.envs.locomotion.go2.footstand¶
Classes
FootstandControlConfig(action_scale: 'float' = 0.25, simulate_action_latency: 'bool' = False, Kp: 'float' = 35.0, Kd: 'float' = 0.5, clip_actions: 'float' = 1.0) |
|
FootstandNoiseConfig(level: 'float' = 1.0, scale_joint_angle: 'float' = 0.01, scale_joint_vel: 'float' = 1.5, scale_gyro: 'float' = 0.2, scale_gravity: 'float' = 0.05, scale_linvel: 'float' = 0.1) |
|
FootstandSensor() |
|
Go2FootStandCfg(scene: 'SceneCfg' = <factory>, sim_dt: 'float' = 0.01, max_episode_seconds: 'float' = 10.0, ctrl_dt: 'float' = 0.02, render_spacing: float = 1.0, render_offset_mode: str = 'grid', motrix_max_iterations: Optional[int] = None, post_step_forward_sensor: bool = False, control_config: 'FootstandControlConfig' = <factory>, noise_config: 'FootstandNoiseConfig' = <factory>, sensor: 'FootstandSensor' = <factory>, asset: 'Asset' = <factory>, init_state: 'InitState' = <factory>, commands: 'Commands' = <factory>, reward_config: 'RewardConfig | None' = None, domain_rand: 'Go2FootStandDomainRandConfig' = <factory>, add_body_sensors: 'bool' = True, obs_history_len: 'int' = 15, soft_joint_pos_limit_factor: 'float' = 0.9, energy_termination_threshold: 'float' = inf, termination_grace_steps: 'int' = 100, termination_height_fraction: 'float' = 0.8, termination_orientation_threshold: 'float' = 0.2) |
|
Go2FootStandDomainRandConfig(randomize_base_mass: 'bool' = False, added_mass_range: 'list[float]' = <factory>, randomize_body_mass: 'bool' = False, body_mass_multiplier_range: 'list[float]' = <factory>, random_com: 'bool' = False, com_offset_x: 'list[float]' = <factory>, randomize_gravity: 'bool' = False, gravity_range: 'list[list[float]]' = <factory>, randomize_ground_friction: 'bool' = False, ground_friction_multiplier_range: 'list[float]' = <factory>, randomize_dof_armature: 'bool' = True, dof_armature_multiplier_range: 'list[float]' = <factory>, push_robots: 'bool' = False, push_interval: 'int' = 750, max_force: 'list[float]' = <factory>, push_body_name: 'str | None' = None, randomize_kp: 'bool' = False, kp_multiplier_range: 'list[float]' = <factory>, randomize_kd: 'bool' = False, kd_multiplier_range: 'list[float]' = <factory>, randomize_floor_friction: 'bool' = True, floor_friction_range: 'list[float]' = <factory>, randomize_link_mass: 'bool' = True, link_mass_scale_range: 'list[float]' = <factory>, torso_added_mass_range: 'list[float]' = <factory>, randomize_torso_com: 'bool' = True, torso_com_offset_range: 'list[float]' = <factory>, dof_armature_scale_range: 'list[float]' = <factory>, randomize_reset_joint_qpos: 'bool' = True, reset_joint_qpos_range: 'list[float]' = <factory>) |
|
- class unilab.envs.locomotion.go2.footstand.FootstandNoiseConfig[source]¶
Bases:
NoiseConfigFootstandNoiseConfig(level: ‘float’ = 1.0, scale_joint_angle: ‘float’ = 0.01, scale_joint_vel: ‘float’ = 1.5, scale_gyro: ‘float’ = 0.2, scale_gravity: ‘float’ = 0.05, scale_linvel: ‘float’ = 0.1)
- Parameters:
- class unilab.envs.locomotion.go2.footstand.FootstandControlConfig[source]¶
Bases:
ControlConfigFootstandControlConfig(action_scale: ‘float’ = 0.25, simulate_action_latency: ‘bool’ = False, Kp: ‘float’ = 35.0, Kd: ‘float’ = 0.5, clip_actions: ‘float’ = 1.0)
- Parameters:
- class unilab.envs.locomotion.go2.footstand.Go2FootStandDomainRandConfig[source]¶
Bases:
Go2DomainRandConfigGo2FootStandDomainRandConfig(randomize_base_mass: ‘bool’ = False, added_mass_range: ‘list[float]’ = <factory>, randomize_body_mass: ‘bool’ = False, body_mass_multiplier_range: ‘list[float]’ = <factory>, random_com: ‘bool’ = False, com_offset_x: ‘list[float]’ = <factory>, randomize_gravity: ‘bool’ = False, gravity_range: ‘list[list[float]]’ = <factory>, randomize_ground_friction: ‘bool’ = False, ground_friction_multiplier_range: ‘list[float]’ = <factory>, randomize_dof_armature: ‘bool’ = True, dof_armature_multiplier_range: ‘list[float]’ = <factory>, push_robots: ‘bool’ = False, push_interval: ‘int’ = 750, max_force: ‘list[float]’ = <factory>, push_body_name: ‘str | None’ = None, randomize_kp: ‘bool’ = False, kp_multiplier_range: ‘list[float]’ = <factory>, randomize_kd: ‘bool’ = False, kd_multiplier_range: ‘list[float]’ = <factory>, randomize_floor_friction: ‘bool’ = True, floor_friction_range: ‘list[float]’ = <factory>, randomize_link_mass: ‘bool’ = True, link_mass_scale_range: ‘list[float]’ = <factory>, torso_added_mass_range: ‘list[float]’ = <factory>, randomize_torso_com: ‘bool’ = True, torso_com_offset_range: ‘list[float]’ = <factory>, dof_armature_scale_range: ‘list[float]’ = <factory>, randomize_reset_joint_qpos: ‘bool’ = True, reset_joint_qpos_range: ‘list[float]’ = <factory>)
- Parameters:
randomize_base_mass (
bool)randomize_body_mass (
bool)random_com (
bool)randomize_gravity (
bool)randomize_ground_friction (
bool)randomize_dof_armature (
bool)push_robots (
bool)push_interval (
int)randomize_kp (
bool)randomize_kd (
bool)randomize_floor_friction (
bool)randomize_link_mass (
bool)randomize_torso_com (
bool)randomize_reset_joint_qpos (
bool)
- __init__(randomize_base_mass=False, added_mass_range=<factory>, randomize_body_mass=False, body_mass_multiplier_range=<factory>, random_com=False, com_offset_x=<factory>, randomize_gravity=False, gravity_range=<factory>, randomize_ground_friction=False, ground_friction_multiplier_range=<factory>, randomize_dof_armature=True, dof_armature_multiplier_range=<factory>, push_robots=False, push_interval=750, max_force=<factory>, push_body_name=None, randomize_kp=False, kp_multiplier_range=<factory>, randomize_kd=False, kd_multiplier_range=<factory>, randomize_floor_friction=True, floor_friction_range=<factory>, randomize_link_mass=True, link_mass_scale_range=<factory>, torso_added_mass_range=<factory>, randomize_torso_com=True, torso_com_offset_range=<factory>, dof_armature_scale_range=<factory>, randomize_reset_joint_qpos=True, reset_joint_qpos_range=<factory>)¶
- Parameters:
randomize_base_mass (
bool)randomize_body_mass (
bool)random_com (
bool)randomize_gravity (
bool)randomize_ground_friction (
bool)randomize_dof_armature (
bool)push_robots (
bool)push_interval (
int)randomize_kp (
bool)randomize_kd (
bool)randomize_floor_friction (
bool)randomize_link_mass (
bool)randomize_torso_com (
bool)randomize_reset_joint_qpos (
bool)
- class unilab.envs.locomotion.go2.footstand.FootstandSensor[source]¶
Bases:
JoystickSensorFootstandSensor()
- accelerometer = 'accelerometer'¶
- global_angvel = 'global_angvel'¶
- ternamate_contact = ['RL_hip_contact', 'RR_hip_contact', 'RL_thigh_contact', 'RR_thigh_contact', 'RL_calf_contact1', 'RL_calf_contact2', 'RR_calf_contact1', 'RR_calf_contact2']¶
- penalty_contact = ['FL_hip_contact', 'FR_hip_contact', 'FL_thigh_contact', 'FR_thigh_contact', 'FL_calf_contact1', 'FL_calf_contact2', 'FR_calf_contact1', 'FR_calf_contact2']¶
- __init__()¶
- class unilab.envs.locomotion.go2.footstand.Go2FootStandCfg[source]¶
Bases:
Go2HandStandCfgGo2FootStandCfg(scene: ‘SceneCfg’ = <factory>, sim_dt: ‘float’ = 0.01, max_episode_seconds: ‘float’ = 10.0, ctrl_dt: ‘float’ = 0.02, render_spacing: float = 1.0, render_offset_mode: str = ‘grid’, motrix_max_iterations: Optional[int] = None, post_step_forward_sensor: bool = False, control_config: ‘FootstandControlConfig’ = <factory>, noise_config: ‘FootstandNoiseConfig’ = <factory>, sensor: ‘FootstandSensor’ = <factory>, asset: ‘Asset’ = <factory>, init_state: ‘InitState’ = <factory>, commands: ‘Commands’ = <factory>, reward_config: ‘RewardConfig | None’ = None, domain_rand: ‘Go2FootStandDomainRandConfig’ = <factory>, add_body_sensors: ‘bool’ = True, obs_history_len: ‘int’ = 15, soft_joint_pos_limit_factor: ‘float’ = 0.9, energy_termination_threshold: ‘float’ = inf, termination_grace_steps: ‘int’ = 100, termination_height_fraction: ‘float’ = 0.8, termination_orientation_threshold: ‘float’ = 0.2)
- Parameters:
scene (SceneCfg)
sim_dt (float)
max_episode_seconds (float)
ctrl_dt (float)
render_spacing (
float)render_offset_mode (
str)post_step_forward_sensor (
bool)control_config (FootstandControlConfig)
noise_config (FootstandNoiseConfig)
sensor (FootstandSensor)
asset (Asset)
init_state (InitState)
commands (Commands)
reward_config (RewardConfig | None)
domain_rand (Go2FootStandDomainRandConfig)
add_body_sensors (bool)
obs_history_len (int)
soft_joint_pos_limit_factor (float)
energy_termination_threshold (float)
termination_grace_steps (int)
termination_height_fraction (float)
termination_orientation_threshold (float)
- max_episode_seconds: float = 10.0¶
- add_body_sensors: bool = True¶
- obs_history_len: int = 15¶
- soft_joint_pos_limit_factor: float = 0.9¶
- energy_termination_threshold: float = inf¶
- termination_grace_steps: int = 100¶
- termination_height_fraction: float = 0.8¶
- termination_orientation_threshold: float = 0.2¶
- noise_config: FootstandNoiseConfig¶
- control_config: FootstandControlConfig¶
- sensor: FootstandSensor¶
- domain_rand: Go2FootStandDomainRandConfig¶
- __init__(scene=<factory>, sim_dt=0.01, max_episode_seconds=10.0, ctrl_dt=0.02, render_spacing=1.0, render_offset_mode='grid', motrix_max_iterations=None, post_step_forward_sensor=False, control_config=<factory>, noise_config=<factory>, sensor=<factory>, asset=<factory>, init_state=<factory>, commands=<factory>, reward_config=None, domain_rand=<factory>, add_body_sensors=True, obs_history_len=15, soft_joint_pos_limit_factor=0.9, energy_termination_threshold=inf, termination_grace_steps=100, termination_height_fraction=0.8, termination_orientation_threshold=0.2)¶
- Parameters:
scene (SceneCfg)
sim_dt (float)
max_episode_seconds (float)
ctrl_dt (float)
render_spacing (
float)render_offset_mode (
str)post_step_forward_sensor (
bool)control_config (FootstandControlConfig)
noise_config (FootstandNoiseConfig)
sensor (FootstandSensor)
asset (Asset)
init_state (InitState)
commands (Commands)
reward_config (RewardConfig | None)
domain_rand (Go2FootStandDomainRandConfig)
add_body_sensors (bool)
obs_history_len (int)
soft_joint_pos_limit_factor (float)
energy_termination_threshold (float)
termination_grace_steps (int)
termination_height_fraction (float)
termination_orientation_threshold (float)
- class unilab.envs.locomotion.go2.footstand.Go2FootStandTask[source]¶
Bases:
Go2HandStandTask- Parameters:
cfg (
Go2FootStandCfg)
- __init__(cfg, num_envs=1, backend_type='mujoco')[source]¶
- Parameters:
cfg (
Go2FootStandCfg)
- property obs_groups_spec: dict[str, int]¶
101}.
Subclasses MUST override this property.
- Type:
Return observation group dimensions, e.g. {“obs”
- Type:
98, “critic”
- apply_action(actions, state)[source]¶
子类实现:action → ctrl
- Parameters:
actions (
ndarray)state (
NpEnvState)
- Return type:
- update_state(state)[source]¶
子类实现:计算 obs/reward/terminated
- Parameters:
state (
NpEnvState)- Return type: