Yinsen Jia, Boyuan Chen — Duke University
Paper · Video · Project website
Train and evaluate time-aware policies for cube stacking, granular-media pouring, and drawer opening. The repository includes simulation environments, trained policies, and code for real-robot deployment.
- Ubuntu 20.04 or 22.04
- NVIDIA GPU and a compatible driver
- Python 3.8
- At least 16 GB GPU memory for the default 16,384-environment training setup
The GitHub checkout includes Isaac Gym Preview 4. Clone it and enter the project folder.
git clone https://github.com/generalroboticslab/TimeAwarePolicy.git
cd TimeAwarePolicyFor a Zenodo download, unzip the project and enter TimeAwarePolicy/.
Download Isaac Gym Preview 4 for Ubuntu Linux from the
NVIDIA download archive.
Extract the SDK and copy its entire isaacgym/ folder next to requirements.txt.
From the project folder, check the SDK path and install the dependencies.
ls isaacgym/python/setup.py
conda create -n timeaware python=3.8
conda activate timeaware
export LD_LIBRARY_PATH="$CONDA_PREFIX/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
pip install -r requirements.txt -e isaacgym/python --no-cache-dirVerify the installation and included artifacts without starting a simulator:
bash tests/release/check.shRendering uses a Vulkan device ordinal, which can differ from the CUDA index. Find the correct ordinal with:
vulkaninfo --summaryThe interactive command uses ordinal 0 by default. Override it with
--graphics_device_id DEVICE when needed.
Cube stacking:
bash exec/TimeAwarePolicy/eval/interactive.sh \
--task FrankaCubeStackGranular-media pouring:
bash exec/TimeAwarePolicy/eval/interactive.sh \
--task FrankaGmPourDrawer opening:
bash exec/TimeAwarePolicy/eval/interactive.sh \
--task FrankaCabinetUse the up/down arrow keys to increase/decrease the time ratio by 0.1.
Training has four stages:
- learn a task policy;
- fine-tune a time-optimal policy;
- distill it into a policy with temporal inputs;
- optimize the time-aware CMDP objective.
For commands and task-specific horizons, see the training guide.
Strict evaluation reports success over all rollouts and timing and instability over successful rollouts. See the evaluation commands and metrics.
For the bundled policies and the settings used in evaluation, see the checkpoint inventory and reproducibility guide.
Use the saved settings for each task and set the shell variables in the examples below.
Train one initial policy per task. Evaluate its saved checkpoints on held-out configurations and select four with success rates closest to 40%, 60%, 80%, and 95%. Use the same four checkpoints for every fine-tuning seed.
bash exec/TimeAwarePolicy/train/initial_policy.sh \
--task "$TASK"
bash exec/TimeAwarePolicy/train/initializer_quality.sh \
--task "$TASK" \
--producer "$INITIAL_TRAINING_FOLDER" \
--output-bank "$INITIALIZER_SET" \
--execute--execute runs the evaluations and saves the selected checkpoints and their
measured success rates. Omit it to preview the commands.
Launch matched time-optimal refinements by setting QUALITY and SEED for
each run:
bash exec/TimeAwarePolicy/train/time_optimal.sh \
--task "$TASK" \
--checkpoint "$INITIALIZER_SET" \
--index "quality_$QUALITY" \
--seed "$SEED"Compare N-P3O, PPO-Lagrangian, and CPO using the same temporal-input student,
1,000-configuration calibration set, seeds, and training settings. Set
METHOD to np3o, ppo_lagrangian, or cpo.
bash exec/TimeAwarePolicy/train/time_aware.sh \
--task "$TASK" \
--checkpoint "$TEMPORAL_STUDENT" \
--cmdp_method "$METHOD" --seed "$SEED"For clock representations, calibration, motion thresholds, PCN, joint training, and shared-policy distillation, see the temporal comparisons guide.
Training writes to train_res/TASK_NAME and evaluation writes to
eval_res/TASK_NAME unless the corresponding directory option is overridden.
Versioned paper-result inputs live in projects/TimeAwarePolicy/paper/configs/.
For instructions to verify the inputs and generate paper figures, see the
results guide.
To plot training curves, pass the results folder containing status.json and
the run logs to --campaign-dir.
bash exec/TimeAwarePolicy/plot/run.sh training-curves \
--campaign-dir /path/to/campaignThe unit suite runs without a GPU:
bash tests/run_unit.shFull simulator smoke tests require Isaac Gym and an NVIDIA GPU.
Run one environment rollout and optimizer update for every public task, while keeping logs and the validation manifest outside the repository:
bash tests/release/smoke.sh \
--gpu 0 --output-dir /tmp/timeaware-task-smokesThe shell scripts in exec/TimeAwarePolicy/ call the Python commands in
projects/TimeAwarePolicy/. The stage scripts also supply task-specific training settings.
.
├── envs/ # Simulation environments and assets
│ ├── assets/
│ └── isaacgymenvs/
├── core/ # Learning algorithms and evaluation
│ ├── agents/ # Policy architecture and normalization
│ ├── training/ # Rollouts, PPO/CMDP updates, logging, checkpoints
│ ├── evaluation/ # Generic evaluator and visualization support
│ └── common/ # I/O, timing, tensors, and NumPy transforms
├── projects/
│ └── TimeAwarePolicy/ # Training, evaluation, and plotting
│ ├── train.py # Run the policy trainer
│ ├── eval.py # Evaluate a checkpoint in simulation or on hardware
│ ├── plot.py # Plot saved results
│ ├── arguments/ # Training and evaluation options
│ ├── evaluation/ # Policy evaluator and evaluation protocols
│ ├── experiments/
│ │ ├── initializer_quality/ # Select starting policies by success rate
│ │ └── temporal_comparisons/ # Compare clock inputs, calibration, and policies
│ └── paper/ # Build figures and tables
│ ├── configs/
│ └── figures/
├── exec/TimeAwarePolicy/ # Shell commands
│ ├── train/
│ ├── eval/
│ └── plot/
├── train_res/ # Bundled base and time-aware policies
│ ├── FrankaCabinet/
│ ├── FrankaCubeStack/
│ └── FrankaGmPour/
├── eval_res/ # Bundled temporal calibration sets
│ ├── FrankaCabinet/
│ ├── FrankaCubeStack/
│ └── FrankaGmPour/
├── real_robot/ # Camera, estimation, and robot communication
├── isaacgym/ # NVIDIA Isaac Gym Preview 4
├── docs/ # Training, evaluation, and deployment guides
├── tests/ # Unit, integration, and release validation
│ ├── unit/
│ ├── integration/
│ └── release/
├── requirements.txt # Simulation dependencies
└── requirements-real.txt # Additional real-robot dependencies
The checkpoint manifest lists the included policies and calibration sets. The other profiles in that directory specify inputs for evaluation and plotting.
Real deployment additionally requires the Franka controller stack, RealSense drivers, camera extrinsic calibration, and optional hardware dependencies:
conda install -c conda-forge portaudio
export CPATH="$CONDA_PREFIX/include${CPATH:+:$CPATH}"
export LIBRARY_PATH="$CONDA_PREFIX/lib${LIBRARY_PATH:+:$LIBRARY_PATH}"
pip install -r requirements-real.txt --no-cache-dir
bash tests/release/check.sh --real-robotSet --controller_ip to the Franka controller host on a trusted, isolated
network. The controller exchanges pickled Python objects.
bash exec/TimeAwarePolicy/eval/run.sh \
--num_envs 1 --real_robot \
--controller_ip CONTROLLER_HOST \
--checkpoint CHECKPOINT --index_episode best_rew \
--par_configs_eval true \
--goal_time 10Hardware operation can cause injury or damage. Validate workspace limits, emergency-stop behavior, calibration, and controller gains before enabling motion. See docs/real_robot.md for the controller protocol, calibration layout, dry-run procedure, and recording options.
The repository is released under CC BY-NC-ND 4.0.
NVIDIA Isaac Gym Preview 4 is proprietary software. Its original license is
retained verbatim at
isaacgym/python/LICENSE.txt; use, modification,
and redistribution of isaacgym/ are governed by those terms rather than the
repository-level license.
Other bundled simulator, runtime, and asset notices are retained under
isaacgym/licenses/ and
envs/assets/licenses/. These third-party terms are
separate from the repository-level license and continue to govern their
respective code, native libraries, and assets.
@misc{jia2025timecontrol,
title={Time as a Control Dimension in Robot Learning},
author={Yinsen Jia and Boyuan Chen},
year={2025},
eprint={2511.07654},
archivePrefix={arXiv},
primaryClass={cs.RO},
url={https://arxiv.org/abs/2511.07654}
}
