File size: 2,518 Bytes
1e71a55 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | ## 1. Example Code Guide
This document provides a minimal end-to-end example for training, evaluating, and submitting a policy.
## 2. RL for Locomotion
### 2.1 Train a PPO Policy (Example)
The baseline workflow references: https://github.com/fan-ziqi/robot_lab
Run the following command from the repository root:
```bash
python scripts/rsl_rl/train.py --task ATEC-Isaac-Velocity-Flat-Unitree-B2-v0 --headless --video
```
On an **NVIDIA RTX 5090**, this example typically takes around **90 minutes**.
Actual training time depends on driver/runtime version, CPU performance, and current GPU load.
### 2.2 Evaluate the Trained Policy
After training, evaluate with:
```bash
python scripts/rsl_rl/play.py --task ATEC-Isaac-Velocity-Flat-Unitree-B2-v0
```
This loads the trained checkpoint and runs rollout in the same task setting.
### 2.3 Test Locally
The file `demo/solution.py` is the only entrance for locally testing and online submission.
Use the test command:
```bash
cd ATEC2026_Simulation_Challenge
python scripts/play_atec_task.py --task ATEC-TaskA-B2Piper --enable_cameras
```
Notes:
- `--task` selects the arena and robot. See the Environment Matrix in `readme.md`.
- Use `--debug` to print runtime status and score.
Pretrained baseline checkpoint:
- `./atec_robot_model/baseline/unitree_b2_flat/policy.pt`
This checkpoint path can be modified in `demo/solution.py`.

## 3. IL for Manipoulation
This section follows the core idea of ACT (Action Chunking with Transformers).
Reference implementation: https://github.com/tonyzhaozh/act
### 3.1 Collect Demonstrations
Collect expert trajectories for Task E:
```bash
python scripts/act/collect_demos_task_e.py --pick_objects 3 --num_demos 100 --headless --enable_cameras --save_images
```
Filter out near-zero actions from the collected dataset:
```bash
python scripts/act/filter_demos.py \
--input datasets/atec_task_e/trajectory.hdf5 \
--output datasets/atec_task_e/trajectory_filtered.hdf5 \
--threshold 0.001
```
### 3.2 Train ACT Policy
Run ACT baseline training from the `scripts/act` directory:
```bash
cd scripts/act
bash baseline.sh
```
### 3.3 Run the Trained Policy
Use the test command:
```bash
python scripts/play_atec_task.py --task ATEC-TaskE-Piper --enable_cameras
```
Note: `./atec_robot_model/baseline/act/policy.pt` is the provided baseline checkpoint. You can replace it with your own trained policy path in `demo/solution`.

|