unilab.envs.locomotion.go2_arm.base¶
Functions
Classes
Asset(base_name: 'str' = 'base', foot_name: 'str' = 'foot', ground: 'str' = 'floor', ee_site_name: 'str' = 'endpoint', ee_body_name: 'str' = 'link6', arm_joint_names: 'tuple[str, ...]' = ('joint1', 'joint2', 'joint3', 'joint4', 'joint5', 'joint6')) |
|
ControlConfig(action_scale: 'float' = 0.25, simulate_action_latency: 'bool' = False, Kp: 'float' = 35.0, Kd: 'float' = 0.5, leg_kp: 'float | list[float] | None' = 60.0, leg_kd: 'float | list[float] | None' = 2.0, arm_kp: 'float | list[float] | None' = <factory>, arm_kd: 'float | list[float] | None' = <factory>, arm_action_scale: 'float' = 0.0) |
|
Go2ArmBaseCfg(scene: unilab.base.scene.SceneCfg | None = None, sim_dt: 'float' = 0.01, max_episode_seconds: Optional[float] = None, 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: 'ControlConfig' = <factory>, noise_config: 'NoiseConfig' = <factory>, sensor: 'Go2ArmSensor' = <factory>, ik: 'IKConfig' = <factory>, asset: 'Asset' = <factory>, iterations: 'int | None' = None) |
|
Go2ArmSensor(feet_force: 'list[str]' = <factory>, feet_pos: 'list[str]' = <factory>, ee_local_pos: 'str' = 'endpoint_pos', ee_local_quat: 'str' = 'endpoint_quat', ee_local_vel: 'str' = 'endpoint_vel', ee_relative_pos: 'str' = 'endpoint_relative_pos', ee_relative_quat: 'str' = 'endpoint_relative_quat', arm_ref_world_quat: 'str' = 'armbasepoint_world_quat') |
|
IKConfig(damping: 'float' = 0.05, gain: 'float' = 1.0, dq_clip: 'float' = 0.2, use_orientation: 'bool' = False, orientation_mode: 'str' = 'target') |
|
NoiseConfig(level: 'float' = 0.0, scale_joint_angle: 'float' = 0.03, scale_joint_vel: 'float' = 0.5, scale_gyro: 'float' = 0.2, scale_gravity: 'float' = 0.05, scale_linvel: 'float' = 0.1, scale_ee_pos: 'float' = 0.02) |
- class unilab.envs.locomotion.go2_arm.base.NoiseConfig[source]¶
Bases:
objectNoiseConfig(level: ‘float’ = 0.0, scale_joint_angle: ‘float’ = 0.03, scale_joint_vel: ‘float’ = 0.5, scale_gyro: ‘float’ = 0.2, scale_gravity: ‘float’ = 0.05, scale_linvel: ‘float’ = 0.1, scale_ee_pos: ‘float’ = 0.02)
- Parameters:
- class unilab.envs.locomotion.go2_arm.base.ControlConfig[source]¶
Bases:
ControlConfigBaseControlConfig(action_scale: ‘float’ = 0.25, simulate_action_latency: ‘bool’ = False, Kp: ‘float’ = 35.0, Kd: ‘float’ = 0.5, leg_kp: ‘float | list[float] | None’ = 60.0, leg_kd: ‘float | list[float] | None’ = 2.0, arm_kp: ‘float | list[float] | None’ = <factory>, arm_kd: ‘float | list[float] | None’ = <factory>, arm_action_scale: ‘float’ = 0.0)
- Parameters:
- __init__(action_scale=0.25, simulate_action_latency=False, Kp=35.0, Kd=0.5, leg_kp=60.0, leg_kd=2.0, arm_kp=<factory>, arm_kd=<factory>, arm_action_scale=0.0)¶
- class unilab.envs.locomotion.go2_arm.base.IKConfig[source]¶
Bases:
objectIKConfig(damping: ‘float’ = 0.05, gain: ‘float’ = 1.0, dq_clip: ‘float’ = 0.2, use_orientation: ‘bool’ = False, orientation_mode: ‘str’ = ‘target’)
- Parameters:
- class unilab.envs.locomotion.go2_arm.base.Asset[source]¶
Bases:
objectAsset(base_name: ‘str’ = ‘base’, foot_name: ‘str’ = ‘foot’, ground: ‘str’ = ‘floor’, ee_site_name: ‘str’ = ‘endpoint’, ee_body_name: ‘str’ = ‘link6’, arm_joint_names: ‘tuple[str, …]’ = (‘joint1’, ‘joint2’, ‘joint3’, ‘joint4’, ‘joint5’, ‘joint6’))
- Parameters:
- __init__(base_name='base', foot_name='foot', ground='floor', ee_site_name='endpoint', ee_body_name='link6', arm_joint_names=('joint1', 'joint2', 'joint3', 'joint4', 'joint5', 'joint6'))¶
- class unilab.envs.locomotion.go2_arm.base.Go2ArmSensor[source]¶
Bases:
SensorGo2ArmSensor(feet_force: ‘list[str]’ = <factory>, feet_pos: ‘list[str]’ = <factory>, ee_local_pos: ‘str’ = ‘endpoint_pos’, ee_local_quat: ‘str’ = ‘endpoint_quat’, ee_local_vel: ‘str’ = ‘endpoint_vel’, ee_relative_pos: ‘str’ = ‘endpoint_relative_pos’, ee_relative_quat: ‘str’ = ‘endpoint_relative_quat’, arm_ref_world_quat: ‘str’ = ‘armbasepoint_world_quat’)
- Parameters:
- __init__(feet_force=<factory>, feet_pos=<factory>, ee_local_pos='endpoint_pos', ee_local_quat='endpoint_quat', ee_local_vel='endpoint_vel', ee_relative_pos='endpoint_relative_pos', ee_relative_quat='endpoint_relative_quat', arm_ref_world_quat='armbasepoint_world_quat')¶
- class unilab.envs.locomotion.go2_arm.base.Go2ArmBaseCfg[source]¶
Bases:
LocomotionBaseCfgGo2ArmBaseCfg(scene: unilab.base.scene.SceneCfg | None = None, sim_dt: ‘float’ = 0.01, max_episode_seconds: Optional[float] = None, 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: ‘ControlConfig’ = <factory>, noise_config: ‘NoiseConfig’ = <factory>, sensor: ‘Go2ArmSensor’ = <factory>, ik: ‘IKConfig’ = <factory>, asset: ‘Asset’ = <factory>, iterations: ‘int | None’ = None)
- Parameters:
sim_dt (
float)ctrl_dt (
float)render_spacing (
float)render_offset_mode (
str)post_step_forward_sensor (
bool)control_config (
ControlConfig)noise_config (
NoiseConfig)sensor (
Go2ArmSensor)ik (
IKConfig)asset (
Asset)
- noise_config: NoiseConfig¶
- control_config: ControlConfig¶
- ik: IKConfig¶
- asset: Asset¶
- sensor: Go2ArmSensor¶
- iterations: int | None = None¶
- sim_dt: float = 0.01¶
- ctrl_dt: float = 0.02¶
- __init__(scene=None, sim_dt=0.01, max_episode_seconds=None, 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>, ik=<factory>, asset=<factory>, iterations=None)¶
- Parameters:
sim_dt (
float)ctrl_dt (
float)render_spacing (
float)render_offset_mode (
str)post_step_forward_sensor (
bool)control_config (
ControlConfig)noise_config (
NoiseConfig)sensor (
Go2ArmSensor)ik (
IKConfig)asset (
Asset)
- unilab.envs.locomotion.go2_arm.base.build_go2_arm_position_gains(cfg)[source]¶
- Parameters:
cfg (
ControlConfig)- Return type:
- class unilab.envs.locomotion.go2_arm.base.Go2ArmBaseEnv[source]¶
Bases:
LocomotionBaseEnv- Parameters:
cfg (
Go2ArmBaseCfg)backend (
SimBackend)num_envs (
int)
- __init__(cfg, backend, num_envs=1)[source]¶
- Parameters:
cfg (
Go2ArmBaseCfg)backend (
SimBackend)num_envs (
int)
- compute_arm_ik_delta(goal_local_pos, curr_local_pos, goal_local_quat=None, curr_local_quat=None)[source]¶
Compute damped least-squares IK delta for the 6 arm joints.
Position and optional orientation errors are expressed in the arm reference frame (
armbasepoint). MuJoCo provides world-frame site Jacobians, so both translational and rotational blocks are rotated into that same frame before solving.