diff --git a/artefacts.yaml b/artefacts.yaml index 4ef840c..b16c24a 100644 --- a/artefacts.yaml +++ b/artefacts.yaml @@ -35,8 +35,8 @@ jobs: scenarios: settings: - name: report_based_waypoint_mission_test - run: "uv run dataflow --test-waypoint-report" + run: "uv run dataflow --test-waypoint-poses --policy stumbling" - name: pose_based_waypoint_mission_test - run: "uv run dataflow --test-waypoint-poses" + run: "uv run dataflow --test-waypoint-poses --policy complete" \ No newline at end of file diff --git a/dataflow/src/dataflow/dataflow.py b/dataflow/src/dataflow/dataflow.py index 4fb6b4a..1910130 100644 --- a/dataflow/src/dataflow/dataflow.py +++ b/dataflow/src/dataflow/dataflow.py @@ -3,6 +3,7 @@ import dora from dora.builder import DataflowBuilder from typing_extensions import Annotated +from typing import Optional from pathlib import Path workspace_path = Path(__file__).parent.parent.parent.parent @@ -12,6 +13,13 @@ ) temp_dataflow_path = output_path / "dataflow.yaml" +policies_folder = Path(__file__).resolve().parent.parent.parent.parent / "policies" +available_policy_folders = ( + sorted([p.name for p in policies_folder.iterdir() if p.is_dir()]) + if policies_folder.exists() + else [] +) + def _exec_dataflow(dataflow: DataflowBuilder, temp_dataflow_path: Path): """Build and/or run the dataflow with dora-rs.""" @@ -20,7 +28,7 @@ def _exec_dataflow(dataflow: DataflowBuilder, temp_dataflow_path: Path): dora.run(str(temp_dataflow_path)) -def _create_base_dataflow() -> DataflowBuilder: +def _create_base_dataflow(policy_path: Path) -> DataflowBuilder: dataflow = DataflowBuilder(name="go2-example-dataflow") output_path.mkdir(parents=True, exist_ok=True) @@ -32,6 +40,7 @@ def _create_base_dataflow() -> DataflowBuilder: args="--scene generated_pyramid --use-auto-pilot", env={ "OMNI_KIT_ACCEPT_EULA": "YES", + "GO2_POLICY_PATH": str(policy_path), }, ) simulation.add_input("pub_status_tick", "dora/timer/millis/200") @@ -47,6 +56,7 @@ def _create_base_dataflow() -> DataflowBuilder: policy_controller = dataflow.add_node( id="policy_controller", path="policy_controller", + env={"GO2_POLICY_PATH": str(policy_path)}, ) policy_controller.add_input("observations", "simulation/observations") policy_controller.add_input("clock", "simulation/simulation_time") @@ -59,6 +69,16 @@ def run_dataflow( teleop: Annotated[ bool, typer.Option(help="Use keyboard teleoperation to control the robot") ] = False, + policy: Annotated[ + Optional[str], + typer.Option( + help=( + "Policy folder name inside 'policies' or absolute path. " + f"Available: {', '.join(available_policy_folders) if available_policy_folders else 'none detected'}. " + "Default: GO2_POLICY_PATH env or 'complete'." + ) + ), + ] = None, test_waypoint_poses: Annotated[ bool, typer.Option(help="Run the waypoint poses tests") ] = False, @@ -81,12 +101,25 @@ def run_dataflow( if test_waypoint_report or test_all: tests.append("test_waypoints_report.py") - if not tests: - print("No tests selected to run. Use --help for options.") - # TODO: run default dataflow without tester node (and optionally with teleop) + if not policy: + policy = os.getenv("GO2_POLICY_PATH") + if not policy: + policy = "complete" + + if policy in available_policy_folders: + policy = policies_folder / policy + + resolved_policy_path = Path(policy).expanduser().resolve() + + if not resolved_policy_path.exists(): + raise typer.BadParameter( + f"Policy path '{resolved_policy_path}' does not exist." + ) if teleop: - dataflow, simulation, policy_controller = _create_base_dataflow() + dataflow, simulation, policy_controller = _create_base_dataflow( + resolved_policy_path + ) teleop_node = dataflow.add_node( id="teleop", @@ -102,7 +135,9 @@ def run_dataflow( _exec_dataflow(dataflow, temp_dataflow_path) for test in tests: - dataflow, simulation, policy_controller = _create_base_dataflow() + dataflow, simulation, policy_controller = _create_base_dataflow( + resolved_policy_path + ) # Add waypoint navigation navigator = dataflow.add_node( diff --git a/nodes/policy_controller/policy_controller/main.py b/nodes/policy_controller/policy_controller/main.py index 09f3f96..846d568 100644 --- a/nodes/policy_controller/policy_controller/main.py +++ b/nodes/policy_controller/policy_controller/main.py @@ -1,10 +1,11 @@ """Policy controller node.""" +import os from pathlib import Path +import msgs from dora import Node -import msgs from policy_controller.policy import Policy @@ -12,9 +13,18 @@ def main(): """Receive observations and twist commands and output joint commands.""" node = Node() + default_policy_path = ( + Path(__file__).resolve().parent.parent.parent.parent / "policies" / "complete" + ) + # Try to read policy path from environment variable + policy_path_str = os.getenv("GO2_POLICY_PATH", str(default_policy_path)) + policy_path = Path(policy_path_str) + if not policy_path.exists(): + raise FileNotFoundError(f"Policy path not found at {policy_path}") + policy = Policy( - model_path=Path(__file__).parent / "policy" / "policy.pt", - config_path=Path(__file__).parent / "policy" / "env.yaml", + model_path=policy_path / "policy.pt", + config_path=policy_path / "env.yaml", ) control_timestep = policy.config.dt * policy.config.decimation diff --git a/nodes/simulation/simulation/follow_camera.py b/nodes/simulation/simulation/follow_camera.py index e7fd08b..3041d1a 100644 --- a/nodes/simulation/simulation/follow_camera.py +++ b/nodes/simulation/simulation/follow_camera.py @@ -18,7 +18,7 @@ def __init__(self, target_prim_path: str = "/World/Go2/Head_lower"): orientation=rot_utils.euler_angles_to_quats( np.array([0, 0, 0]), degrees=True ), - resolution=(1080 // 4, 720 // 4), + resolution=(1080 // 2, 720 // 2), ) self.camera.set_focal_length(1.8) # Same as the default perspective camera self.camera_location = np.array([0.0, 5.0, 2.0]) diff --git a/nodes/simulation/simulation/go2_robot.py b/nodes/simulation/simulation/go2_robot.py index aa204d6..bcf0ab3 100644 --- a/nodes/simulation/simulation/go2_robot.py +++ b/nodes/simulation/simulation/go2_robot.py @@ -1,12 +1,14 @@ +import os from pathlib import Path -import msgs import numpy as np from isaacsim.core.utils.rotations import quat_to_rot_matrix from isaacsim.core.utils.types import ArticulationAction from isaacsim.robot.policy.examples.controllers import PolicyController, config_loader from scipy.spatial.transform import Rotation +import msgs + from .height_scan import HeightScanGrid @@ -39,13 +41,17 @@ def __init__( super().__init__(name, prim_path, root_path, usd_path, position, orientation) - # TODO: load policy config from messages - policy_path = ( - Path(__file__).resolve().parent.parent.parent - / "policy_controller" - / "policy_controller" - / "policy" + default_policy_path = ( + Path(__file__).resolve().parent.parent.parent.parent + / "policies" + / "complete" ) + # Try to read policy path from environment variable + policy_path_str = os.getenv("GO2_POLICY_PATH", str(default_policy_path)) + policy_path = Path(policy_path_str) + if not policy_path.exists(): + raise FileNotFoundError(f"Policy path not found at {policy_path}") + env_path = policy_path / "env.yaml" if not env_path.exists(): raise FileNotFoundError(f"Env config file not found at {env_path}") diff --git a/nodes/tester/tester/test_waypoints_poses.py b/nodes/tester/tester/test_waypoints_poses.py index 3f725a6..335f74f 100644 --- a/nodes/tester/tester/test_waypoints_poses.py +++ b/nodes/tester/tester/test_waypoints_poses.py @@ -19,7 +19,7 @@ def test_receives_scene_info_on_startup(node): @pytest.mark.parametrize("difficulty", [0.1, 0.7, 1.1]) -@pytest.mark.clock_timeout(30) +@pytest.mark.clock_timeout(15) def test_completes_waypoint_mission_with_variable_height_steps(node, difficulty: float): """Test that the waypoint mission completes successfully. @@ -29,7 +29,7 @@ def test_completes_waypoint_mission_with_variable_height_steps(node, difficulty: @pytest.mark.parametrize("scene", ["rail_blocks", "stone_stairs", "excavator"]) -@pytest.mark.clock_timeout(50) +@pytest.mark.clock_timeout(30) def test_completes_waypoint_mission_in_photo_realistic_env(node, scene: str): """Test that the waypoint mission completes successfully.""" run_waypoint_mission_test(node, scene, difficulty=1.0) diff --git a/nodes/policy_controller/policy_controller/policy/env.yaml b/policies/complete/env.yaml similarity index 100% rename from nodes/policy_controller/policy_controller/policy/env.yaml rename to policies/complete/env.yaml diff --git a/nodes/policy_controller/policy_controller/policy/policy.pt b/policies/complete/policy.pt similarity index 100% rename from nodes/policy_controller/policy_controller/policy/policy.pt rename to policies/complete/policy.pt diff --git a/policies/stumbling/env.yaml b/policies/stumbling/env.yaml new file mode 100644 index 0000000..8407c44 --- /dev/null +++ b/policies/stumbling/env.yaml @@ -0,0 +1,1070 @@ +viewer: + eye: !!python/tuple + - 7.5 + - 7.5 + - 7.5 + lookat: !!python/tuple + - 0.0 + - 0.0 + - 0.0 + cam_prim_path: /OmniverseKit_Persp + resolution: !!python/tuple + - 1280 + - 720 + origin_type: world + env_index: 0 + asset_name: null + body_name: null +sim: + physics_prim_path: /physicsScene + device: cuda:0 + dt: 0.005 + render_interval: 4 + gravity: !!python/tuple + - 0.0 + - 0.0 + - -9.81 + enable_scene_query_support: true + use_fabric: true + physx: + solver_type: 1 + min_position_iteration_count: 1 + max_position_iteration_count: 255 + min_velocity_iteration_count: 0 + max_velocity_iteration_count: 255 + enable_ccd: false + enable_stabilization: false + enable_enhanced_determinism: false + bounce_threshold_velocity: 0.5 + friction_offset_threshold: 0.04 + friction_correlation_distance: 0.025 + gpu_max_rigid_contact_count: 8388608 + gpu_max_rigid_patch_count: 327680 + gpu_found_lost_pairs_capacity: 2097152 + gpu_found_lost_aggregate_pairs_capacity: 33554432 + gpu_total_aggregate_pairs_capacity: 2097152 + gpu_collision_stack_size: 67108864 + gpu_heap_capacity: 67108864 + gpu_temp_buffer_capacity: 16777216 + gpu_max_num_partitions: 8 + gpu_max_soft_body_contacts: 1048576 + gpu_max_particle_contacts: 1048576 + physics_material: + func: isaaclab.sim.spawners.materials.physics_materials:spawn_rigid_body_material + static_friction: 1.0 + dynamic_friction: 1.0 + restitution: 0.0 + friction_combine_mode: multiply + restitution_combine_mode: multiply + compliant_contact_stiffness: 0.0 + compliant_contact_damping: 0.0 + render: + enable_translucency: null + enable_reflections: null + enable_global_illumination: null + antialiasing_mode: null + enable_dlssg: null + enable_dl_denoiser: null + dlss_mode: null + enable_direct_lighting: null + samples_per_pixel: null + enable_shadows: null + enable_ambient_occlusion: null + carb_settings: null + rendering_mode: null + create_stage_in_memory: false +ui_window_class_type: isaaclab.envs.ui.manager_based_rl_env_window:ManagerBasedRLEnvWindow +seed: 42 +decimation: 4 +scene: + num_envs: 4096 + env_spacing: 2.5 + lazy_sensor_update: true + replicate_physics: true + filter_collisions: true + clone_in_fabric: false + robot: + class_type: isaaclab.assets.articulation.articulation:Articulation + prim_path: /World/envs/env_.*/Robot + spawn: + func: isaaclab.sim.spawners.from_files.from_files:spawn_from_usd + visible: true + semantic_tags: null + copy_from_source: true + mass_props: null + deformable_props: null + rigid_props: + rigid_body_enabled: null + kinematic_enabled: null + disable_gravity: false + linear_damping: 0.0 + angular_damping: 0.0 + max_linear_velocity: 1000.0 + max_angular_velocity: 1000.0 + max_depenetration_velocity: 1.0 + max_contact_impulse: null + enable_gyroscopic_forces: null + retain_accelerations: false + solver_position_iteration_count: null + solver_velocity_iteration_count: null + sleep_threshold: null + stabilization_threshold: null + collision_props: null + activate_contact_sensors: true + scale: null + articulation_props: + articulation_enabled: null + enabled_self_collisions: false + solver_position_iteration_count: 4 + solver_velocity_iteration_count: 0 + sleep_threshold: null + stabilization_threshold: null + fix_root_link: null + fixed_tendons_props: null + spatial_tendons_props: null + joint_drive_props: null + visual_material_path: material + visual_material: null + usd_path: https://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/5.0/Isaac/IsaacLab/Robots/Unitree/Go2/go2.usd + variants: null + init_state: + pos: !!python/tuple + - 0.0 + - 0.0 + - 0.4 + rot: !!python/tuple + - 1.0 + - 0.0 + - 0.0 + - 0.0 + lin_vel: !!python/tuple + - 0.0 + - 0.0 + - 0.0 + ang_vel: !!python/tuple + - 0.0 + - 0.0 + - 0.0 + joint_pos: + .*L_hip_joint: 0.1 + .*R_hip_joint: -0.1 + F[L,R]_thigh_joint: 0.8 + R[L,R]_thigh_joint: 1.0 + .*_calf_joint: -1.5 + joint_vel: + .*: 0.0 + collision_group: 0 + debug_vis: false + articulation_root_prim_path: null + soft_joint_pos_limit_factor: 0.9 + actuators: + base_legs: + class_type: isaaclab.actuators.actuator_pd:DCMotor + joint_names_expr: + - .*_hip_joint + - .*_thigh_joint + - .*_calf_joint + effort_limit: 23.5 + velocity_limit: 30.0 + effort_limit_sim: null + velocity_limit_sim: null + stiffness: 25.0 + damping: 0.5 + armature: null + friction: 0.0 + dynamic_friction: null + viscous_friction: null + saturation_effort: 23.5 + actuator_value_resolution_debug_print: false + terrain: + class_type: isaaclab.terrains.terrain_importer:TerrainImporter + collision_group: -1 + prim_path: /World/ground + num_envs: 4096 + terrain_type: generator + terrain_generator: + class_type: isaaclab.terrains.terrain_generator:TerrainGenerator + seed: null + curriculum: true + size: !!python/tuple + - 8.0 + - 8.0 + border_width: 20.0 + border_height: 1.0 + num_rows: 10 + num_cols: 20 + color_scheme: none + horizontal_scale: 0.1 + vertical_scale: 0.005 + slope_threshold: 0.75 + sub_terrains: + pyramid_stairs: + function: isaaclab.terrains.trimesh.mesh_terrains:pyramid_stairs_terrain + proportion: 0.2 + size: !!python/tuple + - 8.0 + - 8.0 + flat_patch_sampling: null + border_width: 1.0 + step_height_range: !!python/tuple + - 0.05 + - 0.3 + step_width: 0.3 + platform_width: 3.0 + holes: false + pyramid_stairs_inv: + function: isaaclab.terrains.trimesh.mesh_terrains:inverted_pyramid_stairs_terrain + proportion: 0.2 + size: !!python/tuple + - 8.0 + - 8.0 + flat_patch_sampling: null + border_width: 1.0 + step_height_range: !!python/tuple + - 0.05 + - 0.3 + step_width: 0.3 + platform_width: 3.0 + holes: false + boxes: + function: isaaclab.terrains.trimesh.mesh_terrains:random_grid_terrain + proportion: 0.2 + size: !!python/tuple + - 8.0 + - 8.0 + flat_patch_sampling: null + grid_width: 0.45 + grid_height_range: !!python/tuple + - 0.025 + - 0.3 + platform_width: 2.0 + holes: false + random_rough: + function: isaaclab.terrains.height_field.hf_terrains:random_uniform_terrain + proportion: 0.2 + size: !!python/tuple + - 8.0 + - 8.0 + flat_patch_sampling: null + border_width: 0.25 + horizontal_scale: 0.1 + vertical_scale: 0.005 + slope_threshold: 0.75 + noise_range: !!python/tuple + - 0.01 + - 0.06 + noise_step: 0.01 + downsampled_scale: null + hf_pyramid_slope: + function: isaaclab.terrains.height_field.hf_terrains:pyramid_sloped_terrain + proportion: 0.1 + size: !!python/tuple + - 8.0 + - 8.0 + flat_patch_sampling: null + border_width: 0.25 + horizontal_scale: 0.1 + vertical_scale: 0.005 + slope_threshold: 0.75 + slope_range: !!python/tuple + - 0.0 + - 0.4 + platform_width: 2.0 + inverted: false + hf_pyramid_slope_inv: + function: isaaclab.terrains.height_field.hf_terrains:pyramid_sloped_terrain + proportion: 0.1 + size: !!python/tuple + - 8.0 + - 8.0 + flat_patch_sampling: null + border_width: 0.25 + horizontal_scale: 0.1 + vertical_scale: 0.005 + slope_threshold: 0.75 + slope_range: !!python/tuple + - 0.0 + - 0.4 + platform_width: 2.0 + inverted: true + difficulty_range: !!python/tuple + - 0.0 + - 1.0 + use_cache: false + cache_dir: /tmp/isaaclab/terrains + usd_path: null + env_spacing: 2.5 + visual_material: + func: isaaclab.sim.spawners.materials.visual_materials:spawn_from_mdl_file + mdl_path: https://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/5.0/Isaac/IsaacLab/Materials/TilesMarbleSpiderWhiteBrickBondHoned/TilesMarbleSpiderWhiteBrickBondHoned.mdl + project_uvw: true + albedo_brightness: null + texture_scale: !!python/tuple + - 0.25 + - 0.25 + physics_material: + func: isaaclab.sim.spawners.materials.physics_materials:spawn_rigid_body_material + static_friction: 1.0 + dynamic_friction: 1.0 + restitution: 0.0 + friction_combine_mode: multiply + restitution_combine_mode: multiply + compliant_contact_stiffness: 0.0 + compliant_contact_damping: 0.0 + max_init_terrain_level: 5 + debug_vis: false + height_scanner: + class_type: isaaclab.sensors.ray_caster.ray_caster:RayCaster + prim_path: /World/envs/env_.*/Robot/base + update_period: 0.02 + history_length: 0 + debug_vis: false + mesh_prim_paths: + - /World/ground + offset: + pos: !!python/tuple + - 0.0 + - 0.0 + - 20.0 + rot: !!python/tuple + - 1.0 + - 0.0 + - 0.0 + - 0.0 + attach_yaw_only: null + ray_alignment: yaw + pattern_cfg: + func: isaaclab.sensors.ray_caster.patterns.patterns:grid_pattern + resolution: 0.06 + size: + - 0.8 + - 0.6 + direction: !!python/tuple + - 0.0 + - 0.0 + - -1.0 + ordering: xy + max_distance: 1000000.0 + drift_range: !!python/tuple + - 0.0 + - 0.0 + ray_cast_drift_range: + x: !!python/tuple + - 0.0 + - 0.0 + y: !!python/tuple + - 0.0 + - 0.0 + z: !!python/tuple + - 0.0 + - 0.0 + visualizer_cfg: + prim_path: /Visuals/RayCaster + markers: + hit: + func: isaaclab.sim.spawners.shapes.shapes:spawn_sphere + visible: true + semantic_tags: null + copy_from_source: true + mass_props: null + rigid_props: null + collision_props: null + activate_contact_sensors: false + visual_material_path: material + visual_material: + func: isaaclab.sim.spawners.materials.visual_materials:spawn_preview_surface + diffuse_color: !!python/tuple + - 1.0 + - 0.0 + - 0.0 + emissive_color: !!python/tuple + - 0.0 + - 0.0 + - 0.0 + roughness: 0.5 + metallic: 0.0 + opacity: 1.0 + physics_material_path: material + physics_material: null + radius: 0.02 + contact_forces: + class_type: isaaclab.sensors.contact_sensor.contact_sensor:ContactSensor + prim_path: /World/envs/env_.*/Robot/.* + update_period: 0.005 + history_length: 3 + debug_vis: false + track_pose: false + track_contact_points: false + max_contact_data_count_per_prim: 4 + track_air_time: true + force_threshold: 1.0 + filter_prim_paths_expr: [] + visualizer_cfg: + prim_path: /Visuals/ContactSensor + markers: + contact: + func: isaaclab.sim.spawners.shapes.shapes:spawn_sphere + visible: true + semantic_tags: null + copy_from_source: true + mass_props: null + rigid_props: null + collision_props: null + activate_contact_sensors: false + visual_material_path: material + visual_material: + func: isaaclab.sim.spawners.materials.visual_materials:spawn_preview_surface + diffuse_color: !!python/tuple + - 1.0 + - 0.0 + - 0.0 + emissive_color: !!python/tuple + - 0.0 + - 0.0 + - 0.0 + roughness: 0.5 + metallic: 0.0 + opacity: 1.0 + physics_material_path: material + physics_material: null + radius: 0.02 + no_contact: + func: isaaclab.sim.spawners.shapes.shapes:spawn_sphere + visible: false + semantic_tags: null + copy_from_source: true + mass_props: null + rigid_props: null + collision_props: null + activate_contact_sensors: false + visual_material_path: material + visual_material: + func: isaaclab.sim.spawners.materials.visual_materials:spawn_preview_surface + diffuse_color: !!python/tuple + - 0.0 + - 1.0 + - 0.0 + emissive_color: !!python/tuple + - 0.0 + - 0.0 + - 0.0 + roughness: 0.5 + metallic: 0.0 + opacity: 1.0 + physics_material_path: material + physics_material: null + radius: 0.02 + sky_light: + class_type: null + prim_path: /World/skyLight + spawn: + func: isaaclab.sim.spawners.lights.lights:spawn_light + visible: true + semantic_tags: null + copy_from_source: true + prim_type: DomeLight + color: !!python/tuple + - 1.0 + - 1.0 + - 1.0 + enable_color_temperature: false + color_temperature: 6500.0 + normalize: false + exposure: 0.0 + intensity: 750.0 + texture_file: https://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/5.0/Isaac/Materials/Textures/Skies/PolyHaven/kloofendal_43d_clear_puresky_4k.hdr + texture_format: automatic + visible_in_primary_ray: true + init_state: + pos: !!python/tuple + - 0.0 + - 0.0 + - 0.0 + rot: !!python/tuple + - 1.0 + - 0.0 + - 0.0 + - 0.0 + collision_group: 0 + debug_vis: false +recorders: + dataset_file_handler_class_type: isaaclab.utils.datasets.hdf5_dataset_file_handler:HDF5DatasetFileHandler + dataset_export_dir_path: /tmp/isaaclab/logs + dataset_filename: dataset + dataset_export_mode: + _value_: 1 + _name_: EXPORT_ALL + _sort_order_: 1 + export_in_record_pre_reset: true +observations: + policy: + concatenate_terms: true + concatenate_dim: -1 + enable_corruption: true + history_length: null + flatten_history_dim: true + base_lin_vel: + func: isaaclab.envs.mdp.observations:base_lin_vel + params: {} + modifiers: null + noise: + func: isaaclab.utils.noise.noise_model:uniform_noise + operation: add + n_min: -0.1 + n_max: 0.1 + clip: null + scale: null + history_length: 0 + flatten_history_dim: true + base_ang_vel: + func: isaaclab.envs.mdp.observations:base_ang_vel + params: {} + modifiers: null + noise: + func: isaaclab.utils.noise.noise_model:uniform_noise + operation: add + n_min: -0.2 + n_max: 0.2 + clip: null + scale: null + history_length: 0 + flatten_history_dim: true + projected_gravity: + func: isaaclab.envs.mdp.observations:projected_gravity + params: {} + modifiers: null + noise: + func: isaaclab.utils.noise.noise_model:uniform_noise + operation: add + n_min: -0.05 + n_max: 0.05 + clip: null + scale: null + history_length: 0 + flatten_history_dim: true + velocity_commands: + func: isaaclab.envs.mdp.observations:generated_commands + params: + command_name: base_velocity + modifiers: null + noise: null + clip: null + scale: null + history_length: 0 + flatten_history_dim: true + joint_pos: + func: isaaclab.envs.mdp.observations:joint_pos_rel + params: {} + modifiers: null + noise: + func: isaaclab.utils.noise.noise_model:uniform_noise + operation: add + n_min: -0.01 + n_max: 0.01 + clip: null + scale: null + history_length: 0 + flatten_history_dim: true + joint_vel: + func: isaaclab.envs.mdp.observations:joint_vel_rel + params: {} + modifiers: null + noise: + func: isaaclab.utils.noise.noise_model:uniform_noise + operation: add + n_min: -1.5 + n_max: 1.5 + clip: null + scale: null + history_length: 0 + flatten_history_dim: true + actions: + func: isaaclab.envs.mdp.observations:last_action + params: {} + modifiers: null + noise: null + clip: null + scale: null + history_length: 0 + flatten_history_dim: true + height_scan: + func: isaaclab.envs.mdp.observations:height_scan + params: + sensor_cfg: + name: height_scanner + joint_names: null + joint_ids: !!python/object/apply:builtins.slice + - null + - null + - null + fixed_tendon_names: null + fixed_tendon_ids: !!python/object/apply:builtins.slice + - null + - null + - null + body_names: null + body_ids: !!python/object/apply:builtins.slice + - null + - null + - null + object_collection_names: null + object_collection_ids: !!python/object/apply:builtins.slice + - null + - null + - null + preserve_order: false + modifiers: null + noise: + func: isaaclab.utils.noise.noise_model:uniform_noise + operation: add + n_min: -0.1 + n_max: 0.1 + clip: !!python/tuple + - -1.0 + - 1.0 + scale: null + history_length: 0 + flatten_history_dim: true +actions: + joint_pos: + class_type: isaaclab.envs.mdp.actions.joint_actions:JointPositionAction + asset_name: robot + debug_vis: false + clip: null + joint_names: + - .* + scale: 0.25 + offset: 0.0 + preserve_order: false + use_default_offset: true +events: + physics_material: + func: isaaclab.envs.mdp.events:randomize_rigid_body_material + params: + asset_cfg: + name: robot + joint_names: null + joint_ids: !!python/object/apply:builtins.slice + - null + - null + - null + fixed_tendon_names: null + fixed_tendon_ids: !!python/object/apply:builtins.slice + - null + - null + - null + body_names: .* + body_ids: !!python/object/apply:builtins.slice + - null + - null + - null + object_collection_names: null + object_collection_ids: !!python/object/apply:builtins.slice + - null + - null + - null + preserve_order: false + static_friction_range: !!python/tuple + - 0.8 + - 0.8 + dynamic_friction_range: !!python/tuple + - 0.6 + - 0.6 + restitution_range: !!python/tuple + - 0.0 + - 0.0 + num_buckets: 64 + mode: startup + interval_range_s: null + is_global_time: false + min_step_count_between_reset: 0 + add_base_mass: + func: isaaclab.envs.mdp.events:randomize_rigid_body_mass + params: + asset_cfg: + name: robot + joint_names: null + joint_ids: !!python/object/apply:builtins.slice + - null + - null + - null + fixed_tendon_names: null + fixed_tendon_ids: !!python/object/apply:builtins.slice + - null + - null + - null + body_names: base + body_ids: !!python/object/apply:builtins.slice + - null + - null + - null + object_collection_names: null + object_collection_ids: !!python/object/apply:builtins.slice + - null + - null + - null + preserve_order: false + mass_distribution_params: !!python/tuple + - -1.0 + - 3.0 + operation: add + mode: startup + interval_range_s: null + is_global_time: false + min_step_count_between_reset: 0 + base_external_force_torque: + func: isaaclab.envs.mdp.events:apply_external_force_torque + params: + asset_cfg: + name: robot + joint_names: null + joint_ids: !!python/object/apply:builtins.slice + - null + - null + - null + fixed_tendon_names: null + fixed_tendon_ids: !!python/object/apply:builtins.slice + - null + - null + - null + body_names: base + body_ids: !!python/object/apply:builtins.slice + - null + - null + - null + object_collection_names: null + object_collection_ids: !!python/object/apply:builtins.slice + - null + - null + - null + preserve_order: false + force_range: !!python/tuple + - 0.0 + - 0.0 + torque_range: !!python/tuple + - -0.0 + - 0.0 + mode: reset + interval_range_s: null + is_global_time: false + min_step_count_between_reset: 0 + reset_base: + func: isaaclab.envs.mdp.events:reset_root_state_uniform + params: + pose_range: + x: !!python/tuple + - -0.5 + - 0.5 + y: !!python/tuple + - -0.5 + - 0.5 + yaw: !!python/tuple + - -3.14 + - 3.14 + velocity_range: + x: !!python/tuple + - 0.0 + - 0.0 + y: !!python/tuple + - 0.0 + - 0.0 + z: !!python/tuple + - 0.0 + - 0.0 + roll: !!python/tuple + - 0.0 + - 0.0 + pitch: !!python/tuple + - 0.0 + - 0.0 + yaw: !!python/tuple + - 0.0 + - 0.0 + mode: reset + interval_range_s: null + is_global_time: false + min_step_count_between_reset: 0 + reset_robot_joints: + func: isaaclab.envs.mdp.events:reset_joints_by_scale + params: + position_range: !!python/tuple + - 1.0 + - 1.0 + velocity_range: !!python/tuple + - 0.0 + - 0.0 + mode: reset + interval_range_s: null + is_global_time: false + min_step_count_between_reset: 0 + push_robot: + func: isaaclab.envs.mdp.events:push_by_setting_velocity + params: + velocity_range: + x: !!python/tuple + - -0.6 + - 0.6 + y: !!python/tuple + - -0.6 + - 0.6 + z: !!python/tuple + - -0.1 + - 0.1 + roll: !!python/tuple + - -0.04 + - 0.04 + pitch: !!python/tuple + - -0.04 + - 0.04 + yaw: !!python/tuple + - -0.04 + - 0.04 + mode: interval + interval_range_s: !!python/tuple + - 1.0 + - 2.0 + is_global_time: false + min_step_count_between_reset: 0 +rerender_on_reset: false +wait_for_textures: true +xr: null +teleop_devices: + devices: {} +export_io_descriptors: false +log_dir: /home/azazdeaz/repos/racers/go2_isaac_lab_env/logs/rsl_rl/unitree_go2_rough/2025-12-12_14-45-59 +is_finite_horizon: false +episode_length_s: 20.0 +rewards: + track_lin_vel_xy_exp: + func: isaaclab.envs.mdp.rewards:track_lin_vel_xy_exp + params: + command_name: base_velocity + std: 0.5 + weight: 1.5 + track_ang_vel_z_exp: + func: isaaclab.envs.mdp.rewards:track_ang_vel_z_exp + params: + command_name: base_velocity + std: 0.5 + weight: 0.75 + lin_vel_z_l2: + func: isaaclab.envs.mdp.rewards:lin_vel_z_l2 + params: {} + weight: -2.0 + ang_vel_xy_l2: + func: isaaclab.envs.mdp.rewards:ang_vel_xy_l2 + params: {} + weight: -0.05 + dof_torques_l2: + func: isaaclab.envs.mdp.rewards:joint_torques_l2 + params: {} + weight: -0.0002 + dof_acc_l2: + func: isaaclab.envs.mdp.rewards:joint_acc_l2 + params: {} + weight: -2.5e-07 + action_rate_l2: + func: isaaclab.envs.mdp.rewards:action_rate_l2 + params: {} + weight: -0.01 + feet_air_time: + func: isaaclab_tasks.manager_based.locomotion.velocity.mdp.rewards:feet_air_time + params: + sensor_cfg: + name: contact_forces + joint_names: null + joint_ids: !!python/object/apply:builtins.slice + - null + - null + - null + fixed_tendon_names: null + fixed_tendon_ids: !!python/object/apply:builtins.slice + - null + - null + - null + body_names: .*_foot + body_ids: !!python/object/apply:builtins.slice + - null + - null + - null + object_collection_names: null + object_collection_ids: !!python/object/apply:builtins.slice + - null + - null + - null + preserve_order: false + command_name: base_velocity + threshold: 0.5 + weight: 0.1 + undesired_contacts: + func: isaaclab.envs.mdp.rewards:undesired_contacts + params: + sensor_cfg: + name: contact_forces + joint_names: null + joint_ids: !!python/object/apply:builtins.slice + - null + - null + - null + fixed_tendon_names: null + fixed_tendon_ids: !!python/object/apply:builtins.slice + - null + - null + - null + body_names: .*_thigh + body_ids: !!python/object/apply:builtins.slice + - null + - null + - null + object_collection_names: null + object_collection_ids: !!python/object/apply:builtins.slice + - null + - null + - null + preserve_order: false + threshold: 1.0 + weight: -1.0 + flat_orientation_l2: + func: isaaclab.envs.mdp.rewards:flat_orientation_l2 + params: {} + weight: 0.0 + dof_pos_limits: + func: isaaclab.envs.mdp.rewards:joint_pos_limits + params: {} + weight: 0.0 +terminations: + time_out: + func: isaaclab.envs.mdp.terminations:time_out + params: {} + time_out: true + base_contact: + func: isaaclab.envs.mdp.terminations:illegal_contact + params: + sensor_cfg: + name: contact_forces + joint_names: null + joint_ids: !!python/object/apply:builtins.slice + - null + - null + - null + fixed_tendon_names: null + fixed_tendon_ids: !!python/object/apply:builtins.slice + - null + - null + - null + body_names: base + body_ids: !!python/object/apply:builtins.slice + - null + - null + - null + object_collection_names: null + object_collection_ids: !!python/object/apply:builtins.slice + - null + - null + - null + preserve_order: false + threshold: 1.0 + time_out: false +curriculum: + terrain_levels: + func: isaaclab_tasks.manager_based.locomotion.velocity.mdp.curriculums:terrain_levels_vel + params: {} +commands: + base_velocity: + class_type: isaaclab.envs.mdp.commands.velocity_command:UniformVelocityCommand + resampling_time_range: !!python/tuple + - 10.0 + - 10.0 + debug_vis: true + asset_name: robot + heading_command: true + heading_control_stiffness: 0.5 + rel_standing_envs: 0.02 + rel_heading_envs: 1.0 + ranges: + lin_vel_x: !!python/tuple + - -1.0 + - 1.0 + lin_vel_y: !!python/tuple + - -1.0 + - 1.0 + ang_vel_z: !!python/tuple + - -1.0 + - 1.0 + heading: !!python/tuple + - -3.141592653589793 + - 3.141592653589793 + goal_vel_visualizer_cfg: + prim_path: /Visuals/Command/velocity_goal + markers: + arrow: + func: isaaclab.sim.spawners.from_files.from_files:spawn_from_usd + visible: true + semantic_tags: null + copy_from_source: true + mass_props: null + deformable_props: null + rigid_props: null + collision_props: null + activate_contact_sensors: false + scale: !!python/tuple + - 0.5 + - 0.5 + - 0.5 + articulation_props: null + fixed_tendons_props: null + spatial_tendons_props: null + joint_drive_props: null + visual_material_path: material + visual_material: + func: isaaclab.sim.spawners.materials.visual_materials:spawn_preview_surface + diffuse_color: !!python/tuple + - 0.0 + - 1.0 + - 0.0 + emissive_color: !!python/tuple + - 0.0 + - 0.0 + - 0.0 + roughness: 0.5 + metallic: 0.0 + opacity: 1.0 + usd_path: https://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/5.0/Isaac/Props/UIElements/arrow_x.usd + variants: null + current_vel_visualizer_cfg: + prim_path: /Visuals/Command/velocity_current + markers: + arrow: + func: isaaclab.sim.spawners.from_files.from_files:spawn_from_usd + visible: true + semantic_tags: null + copy_from_source: true + mass_props: null + deformable_props: null + rigid_props: null + collision_props: null + activate_contact_sensors: false + scale: !!python/tuple + - 0.5 + - 0.5 + - 0.5 + articulation_props: null + fixed_tendons_props: null + spatial_tendons_props: null + joint_drive_props: null + visual_material_path: material + visual_material: + func: isaaclab.sim.spawners.materials.visual_materials:spawn_preview_surface + diffuse_color: !!python/tuple + - 0.0 + - 0.0 + - 1.0 + emissive_color: !!python/tuple + - 0.0 + - 0.0 + - 0.0 + roughness: 0.5 + metallic: 0.0 + opacity: 1.0 + usd_path: https://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/5.0/Isaac/Props/UIElements/arrow_x.usd + variants: null diff --git a/policies/stumbling/policy.pt b/policies/stumbling/policy.pt new file mode 100644 index 0000000..8416f7f Binary files /dev/null and b/policies/stumbling/policy.pt differ