Skip to content

Commit 2ba317e

Browse files
authored
Improve Artefacts setup (#12)
* Add Artefacts setup instructions * Use `ARTEFACTS_SCENARIO_UPLOAD_DIR` for outputs * Simplify artefacts instructions and clear-up language * Remove OUTPUT_DIR environment variable from simulation node * Fix typo
1 parent 47d9f75 commit 2ba317e

4 files changed

Lines changed: 64 additions & 49 deletions

File tree

README.md

Lines changed: 57 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Isaac Sim - Unitree Go2 example
22

3-
This project demos testing waypoint mission execution by a Unitree Go2 quadruped in different simulated environments.
3+
This project demonstrates testing waypoint mission execution with a Unitree Go2 quadruped in different simulated environments.
44

55
<img width="3716" height="2100" alt="go2-example-scenes" src="https://github.com/user-attachments/assets/212c96c9-bbe3-42e5-9a3a-7e28ee00b5f0" />
66

77
## Prerequisites
8-
- Isaac Sim 5.0 compatible [hardware](https://docs.isaacsim.omniverse.nvidia.com/latest/installation/requirements.html) and [driver](https://docs.omniverse.nvidia.com/dev-guide/latest/common/technical-requirements.html)
9-
- [`uv` package manager](https://docs.astral.sh/uv/getting-started/installation/) (Not mandatory, but the instructions below are using `uv`)
8+
- Isaac Sim 5.0 compatible [hardware](https://docs.isaacsim.omniverse.nvidia.com/latest/installation/requirements.html) and [drivers](https://docs.omniverse.nvidia.com/dev-guide/latest/common/technical-requirements.html)
9+
- [`uv` package manager](https://docs.astral.sh/uv/getting-started/installation/) (Not mandatory, but the instructions below use `uv`)
1010
- [Git LFS](https://docs.github.com/en/repositories/working-with-files/managing-large-files/installing-git-large-file-storage)
1111

1212
## Setup
@@ -17,85 +17,100 @@ git lfs pull
1717
```
1818

1919
```sh
20-
# create the virtual environment and install dependencies
20+
# Create the virtual environment and install dependencies
2121
uv sync
2222
```
2323

24-
## Run teleop demo
25-
Use **WASD** for linear motion and **QE** for turning. **R** reloads the scene and **F** jumps to the next one.
24+
## Run Teleop Demo
25+
Use **WASD** for linear motion and **QE** for turning. Press **R** to reload the scene and **F** to jump to the next one.
2626
```sh
2727
uv run dataflow --teleop
2828
```
2929

30+
## Run Tests with dora-rs
31+
This executes all the tests locally.
32+
```sh
33+
# Run test with dora-rs and pytest
34+
uv run dataflow --test-all
35+
```
36+
See `uv run dataflow --help` for all options
3037

3138
## Testing with Artefacts
3239

33-
Follow the instructions at [docs.artefacts.com](https://docs.artefacts.com/getting-started/) to set-up the project.
40+
### Set up the Artefacts Dashboard
41+
Follow these steps to set up your Artefacts project. For more details, refer to the [documentation](https://docs.artefacts.com/getting-started/).
3442

43+
1. Install the CLI using `pipx` (other installation methods are available).
3544
```sh
36-
# Launch Isaac Sim and execute multiple waypoint tests
37-
uvx --from artefacts-cli artefacts run waypoint_missions
45+
sudo apt install pipx
46+
pipx ensurepath
47+
pipx install artefacts-cli
3848
```
3949

40-
## Run tests with dora-rs
41-
This will execute all the tests without parameterization in `artefacts.yaml`
50+
2. Create an account at https://app.artefacts.com and log in.
51+
3. Create a new project and follow the authentication instructions provided on the project page.
52+
4. Update [artefacts.yaml](./artefacts.yaml) with your project name.
53+
54+
### Run Tests with Artefacts
55+
4256
```sh
43-
# Run test with dora-rs and pytest
44-
uv run dataflow --test-all
57+
# Launch Isaac Sim and execute multiple waypoint tests
58+
artefacts run waypoint_missions
4559
```
46-
See `uv run dataflow --help` for all options
60+
Track the job status on your project page. Test outputs for each scenario will appear there upon completion.
61+
4762

4863

4964

50-
## Project walkthrough
65+
## Project Walkthrough
5166

52-
### Main tools:
67+
### Main Tools
5368
- Isaac Sim for simulation
5469
- `dora-rs` as the robotics framework
55-
- PyTorch executing the control policy
70+
- PyTorch for executing the control policy
5671

57-
This repo is organized as a Python workspace with multiple Python packages.
72+
This repository is organized as a Python workspace containing multiple packages.
5873

5974
### Nodes
60-
The `dora-rs` nodes are organized as separate Python packages under `nodes/*`
75+
`dora-rs` nodes are organized as separate Python packages located in `nodes/*`.
6176

62-
- [`simulation`](./nodes/simulation/) runs the Isaac Sim simulation
63-
- It outputs observations and information about the simulation like `robot_pose`, `simulation_time`, `waypoints`.
64-
- It listens to the low-level joint commands and applies them on the simulated robot.
65-
- Also accepts `load_scene` input that allows the test nodes to load different scenes without restarting the simulation.
66-
- [`navigator`](./nodes/navigator/) using the robot position and the waypoint positions, it computes and publishes the high-level 2D navigation commands.
67-
- [`policy_controller`](./nodes/policy_controller/) takes the high-level 2D navigation commands from the `navigator` nodes and outputs the low-level joint commands to the `simulation` node
68-
- [`tester`](./nodes/tester/) contains the test nodes that should be executed with `pytest`
69-
- [test_waypoints_poses.py](./nodes/tester/tester/test_waypoints_poses.py) Executes multiple waypoint navigation scenarios and uses the robot and waypoint position data to determine if the waypoint mission was successful.
70-
- [test_waypoints_report.py](./nodes/tester/tester/test_waypoints_report.py) The simplified version of the test above, that uses the internal waypoint mission state from the simulation to determine if the waypoint mission was successful.
71-
- [`teleop`](./nodes/teleop/) implements keyboard teleop control
77+
- [`simulation`](./nodes/simulation/) runs the Isaac Sim simulation.
78+
- Outputs observations and simulation data, such as `robot_pose`, `simulation_time`, and `waypoints`.
79+
- Listens for low-level joint commands and applies them to the simulated robot.
80+
- Accepts a `load_scene` input, allowing test nodes to switch scenes without restarting the simulation.
81+
- [`navigator`](./nodes/navigator/) computes and publishes high-level 2D navigation commands based on the robot's position and waypoints.
82+
- [`policy_controller`](./nodes/policy_controller/) receives high-level 2D navigation commands from the `navigator` node and outputs low-level joint commands to the `simulation` node.
83+
- [`tester`](./nodes/tester/) contains test nodes executed via `pytest`.
84+
- [test_waypoints_poses.py](./nodes/tester/tester/test_waypoints_poses.py) Executes multiple waypoint navigation scenarios, using robot and waypoint position data to verify mission success.
85+
- [test_waypoints_report.py](./nodes/tester/tester/test_waypoints_report.py) A simplified version of the above test that uses the simulation's internal waypoint mission state to verify success.
86+
- [`teleop`](./nodes/teleop/) implements keyboard teleoperation control.
7287

73-
### Other packages
74-
- [`msgs`](./msgs/) Implements the necessary messages as python classes using [`arrow-message`](https://github.com/hennzau/arrow-message)
75-
- [`dataflow`](./dataflow/) Using the [`dora-rs dataflow builder`](https://github.com/dora-rs/dora/tree/main/examples/python-dataflow-builder) implements a CLI to configure and run `dora-rs` dataflows. Run `uv run dataflow --help` to see all options.
88+
### Other Packages
89+
- [`msgs`](./msgs/) implements necessary messages as Python classes using [`arrow-message`](https://github.com/hennzau/arrow-message).
90+
- [`dataflow`](./dataflow/) implements a CLI to configure and run `dora-rs` dataflows using the [`dora-rs dataflow builder`](https://github.com/dora-rs/dora/tree/main/examples/python-dataflow-builder). Run `uv run dataflow --help` for options.
7691

77-
### Future nodes
78-
- `teleop` for controlling the robot with keyboard or gamepad
79-
- `dds-transport` for interfacing the real Unitree Go2 hardware
92+
### Future Nodes
93+
- `teleop`: Control the robot via keyboard or gamepad.
94+
- `dds-transport`: Interface with real Unitree Go2 hardware.
8095

8196

8297
## Training
8398

84-
Policy training is separated in a standard Isaac Lab project: https://github.com/art-e-fact/go2_isaac_lab_env.
99+
Policy training is handled in a separate Isaac Lab project: [go2_isaac_lab_env](https://github.com/art-e-fact/go2_isaac_lab_env).
85100

86101
Steps:
87-
- Follow the instructions in [go2_isaac_lab_env](https://github.com/art-e-fact/go2_isaac_lab_env) train the new policy
88-
- Use `scripts/rsl_rl/play.py` to export the trained policy.
89-
- This will generate `logs/<checkpoint>/exported/policy.pt` and `logs/<checkpoint>/params/env.yaml`.
90-
- Override these files in the `./nodes/policy_controller/policy` of this repo.
91-
- Try the new policy with `uv run python -m simulation`
102+
- Follow the instructions in the [go2_isaac_lab_env](https://github.com/art-e-fact/go2_isaac_lab_env) repository to train a new policy.
103+
- Use `scripts/rsl_rl/play.py` to export the policy.
104+
- This generates `logs/<checkpoint>/exported/policy.pt` and `logs/<checkpoint>/params/env.yaml`.
105+
- Overwrite the files in `./nodes/policy_controller/policy` in this repository with the newly generated files.
106+
- Test the new policy with `uv run python -m simulation`.
92107

93108

94109

95110
## Development
96111

97112
```sh
98-
# Setup isaacsim type hints in VS Code
113+
# Set up Isaac Sim type hints in VS Code
99114
uv run -m isaacsim --generate-vscode-settings
100115
```
101116

artefacts.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,8 @@ jobs:
3535
scenarios:
3636
settings:
3737
- name: report_based_waypoint_mission_test
38-
run: "rm -rf outputs/artefacts && uv run dataflow --test-waypoint-report"
39-
output_dirs: ["outputs/artefacts"]
38+
run: "uv run dataflow --test-waypoint-report"
4039

4140
- name: pose_based_waypoint_mission_test
42-
run: "rm -rf outputs/artefacts && uv run dataflow --test-waypoint-poses"
43-
output_dirs: ["outputs/artefacts"]
41+
run: "uv run dataflow --test-waypoint-poses"
4442

dataflow/src/dataflow/dataflow.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1+
import os
12
import typer
23
import dora
34
from dora.builder import DataflowBuilder
45
from typing_extensions import Annotated
56
from pathlib import Path
67

78
workspace_path = Path(__file__).parent.parent.parent.parent
8-
output_path = workspace_path / "outputs/artefacts"
99
nodes_path = workspace_path / "nodes"
10+
output_path = Path(
11+
os.getenv("ARTEFACTS_SCENARIO_UPLOAD_DIR", workspace_path / "outputs/artefacts")
12+
)
1013
temp_dataflow_path = output_path / "dataflow.yaml"
1114

1215

@@ -29,7 +32,6 @@ def _create_base_dataflow() -> DataflowBuilder:
2932
args="--scene generated_pyramid --use-auto-pilot",
3033
env={
3134
"OMNI_KIT_ACCEPT_EULA": "YES",
32-
"OUTPUT_DIR": str(output_path),
3335
},
3436
)
3537
simulation.add_input("pub_status_tick", "dora/timer/millis/200")

nodes/simulation/simulation/go2_scene.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from simulation.waypoint_mission import WaypointMission
2626

2727
SCENE_ROOT = "/Scene"
28-
OUTPUT_DIR = Path(os.getenv("OUTPUT_DIR", "outputs/artefacts"))
28+
OUTPUT_DIR = Path(os.getenv("ARTEFACTS_SCENARIO_UPLOAD_DIR", "outputs/artefacts"))
2929

3030

3131
def add_reference(

0 commit comments

Comments
 (0)