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
9 changes: 5 additions & 4 deletions artefacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ jobs:

scenarios:
settings:
- name: report_based_waypoint_mission_test
run: "uv run dataflow --test-waypoint-poses --policy stumbling"

- name: pose_based_waypoint_mission_test
run: "uv run dataflow --test-waypoint-poses --policy complete"
params:
policy:
- stumbling
- baseline
run: "uv run dataflow --test-waypoint-poses"

1 change: 1 addition & 0 deletions dataflow/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dependencies = [
"teleop",
"dora-rs-cli>=0.3.13",
"typer>=0.20.0",
"artefacts-toolkit>=0.7.1",
]

[project.scripts]
Expand Down
24 changes: 18 additions & 6 deletions dataflow/src/dataflow/dataflow.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
import typer
from pathlib import Path
from typing import Optional

import dora
import typer
from artefacts_toolkit.config import get_artefacts_params
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
nodes_path = workspace_path / "nodes"
Expand Down Expand Up @@ -75,7 +77,7 @@ def run_dataflow(
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'."
"Default: GO2_POLICY_PATH env or 'baseline'."
)
),
] = None,
Expand Down Expand Up @@ -104,7 +106,14 @@ def run_dataflow(
if not policy:
policy = os.getenv("GO2_POLICY_PATH")
if not policy:
policy = "complete"
policy = "baseline"

# Use the policy set with Artefacts parameters if available
try:
policy = get_artefacts_params().get("policy", policy)
except Exception:
# Not executing within Artefacts context
pass

if policy in available_policy_folders:
policy = policies_folder / policy
Expand Down Expand Up @@ -151,10 +160,13 @@ def run_dataflow(
policy_controller.add_input("command_2d", "navigator/command_2d")

# Add the tester node
junit_xml_path = (
output_path / ".." / "tests_junit.xml"
) # Save junit in the root outputs folder
tester = dataflow.add_node(
id="tester",
path="pytest",
args=f"{nodes_path / 'tester/tester' / test} -s --junit-xml={str(output_path / 'tests_junit.xml')}",
args=f"{nodes_path / 'tester/tester' / test} -s --junit-xml={str(junit_xml_path)}",
)
tester.add_input("waypoints", "simulation/waypoints")
tester.add_input("scene_info", "simulation/scene_info")
Expand Down
2 changes: 1 addition & 1 deletion nodes/simulation/simulation/follow_camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 // 2, 720 // 2),
resolution=(1080, 720),
)
self.camera.set_focal_length(1.8) # Same as the default perspective camera
self.camera_location = np.array([0.0, 5.0, 2.0])
Expand Down
2 changes: 1 addition & 1 deletion nodes/tester/tester/test_waypoints_poses.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(15)
@pytest.mark.clock_timeout(30)
def test_completes_waypoint_mission_with_variable_height_steps(node, difficulty: float):
"""Test that the waypoint mission completes successfully.

Expand Down
File renamed without changes.
File renamed without changes.
178 changes: 178 additions & 0 deletions uv.lock

Large diffs are not rendered by default.