This repository contains the official implementation of FreeBAR, an inference-time method for delay-aware execution of chunked flow-matching policies in real-time robotic control.
Real-time action chunking policies commit to a chunk before the next one is ready, so a new chunk is always planned against actions that are already being executed. FreeBAR resolves this at inference time by splitting the planning horizon into three regions and treating each one differently:
committed prefix near future far future
[0, d) [d, h) [h, H)
───────────────── ───────────────── ─────────────────
strict alignment soft alignment unconstrained
to committed actions with exponential decay (left free)
At every denoising step FreeBAR adds a control-barrier-function style guidance
term to the flow velocity: the committed prefix is aligned strictly to the
delayed actions, the near future is aligned softly so the chunk stays coherent
across the boundary, and the far future is left free so the policy can still
replan. The guidance multiplier λ comes from a closed-form QP solution,
clipped to [0, max_guidance_weight].
FreeBAR is evaluated in two settings, both included here:
| Setting | Policy backbone | Environment | Entry point |
|---|---|---|---|
| Kinetix | Flow policy (JAX) | Kinetix | kinetix/src/eval_flow_rtc.py |
| RoboCasa | GR00T N1.5 | RoboCasa | Isaac-GR00T/scripts/run_eval_async.py |
FreeBar/
├── kinetix/ # Kinetix implementation (JAX)
│ ├── src/
│ │ ├── model.py # FlowPolicy + freebar_action
│ │ ├── eval_flow_rtc.py # Evaluation entry point (naive / rtc / freebar)
│ │ └── train_flow.py # Behavior-cloning training
│ ├── worlds/l/ # 12 Kinetix task levels
│ ├── third_party/kinetix/ # Vendored Kinetix environment
│ └── pretrained/ # Place checkpoints here (see pretrained/README.md)
│
├── Isaac-GR00T/ # GR00T fork with the FreeBAR action head
│ ├── gr00t/model/action_head/
│ │ ├── freebar.py # FreeBAR guidance implementation
│ │ ├── freebar_recorder.py # Optional λ / gradient recording
│ │ └── flow_matching_action_head.py
│ └── scripts/run_eval_async.py
│
└── robocasa/ # RoboCasa fork used by the GR00T evaluation
├── robocasa/
├── robomimic/
└── scripts/ # ACT baselines (train / eval / convert)
To keep the repository small, the following are intentionally excluded:
| Excluded | How to obtain |
|---|---|
robocasa/models/ |
Restore from upstream RoboCasa — see RoboCasa |
| RoboCasa textures and objects (~10 GB) | Downloaded by download_kitchen_assets |
| Behavior-cloning checkpoints | Train with kinetix/src/train_flow.py, or place your own under kinetix/pretrained/bc/ |
| GR00T policy checkpoints | Pass your checkpoint path via --model_path |
Environment Note: The Kinetix evaluation was developed and tested on Linux with CUDA.
kinetix/pyproject.tomlpinsjax[cuda12], which has no macOS wheels, souv syncwill fail on macOS and Windows.
cd kinetix
uv syncPlace the behavior-cloning policy checkpoints under kinetix/pretrained/bc. The
directory should contain numbered checkpoint folders with policy files, for
example pretrained/bc/24/policies/worlds_l_grasp_easy.pkl. See
kinetix/pretrained/README.md for the expected layout.
RoboCasa needs two things that are not vendored in this repository:
- the upstream
robosuitepackage, and - the
robocasa/models/directory, which is excluded here to keep the release small (see below).
Everything else under robocasa/ is RoboCasa at commit 9a3a786, with one
local change: the upstream numpy version assertion in robocasa/__init__.py is
relaxed.
Set both up before installing the local packages:
# 1. robosuite (external dependency, installed next to this repository)
cd ..
git clone https://github.com/ARISE-Initiative/robosuite.git
cd robosuite
pip install -e .
# 2. restore robocasa/models/ from upstream RoboCasa
cd ..
git clone https://github.com/robocasa/robocasa.git robocasa-upstream
cd robocasa-upstream
git checkout 9a3a786 # the revision this fork is based on
cp -R robocasa/models ../FreeBar/robocasa/robocasa/
# 3. install the packages in this repository
cd ../FreeBar
pip install -e robocasa
pip install -e robocasa/robomimic
pip install -e Isaac-GR00T
# 4. configure RoboCasa paths and download the benchmark assets
python -m robocasa.scripts.setup_macros
python -m robocasa.scripts.download_kitchen_assetsrobocasa/models/ is required at import time, so step 2 is not optional:
robocasa.environments imports robocasa.models.fixtures,
robocasa.models.objects and robocasa.models.scenes, and
download_kitchen_assets.py reads
models/assets/box_links/box_links_assets.json as soon as it starts. Without
that directory neither the environments nor the asset downloader will run.
The asset download itself is about 10 GB of textures, objects and fixture meshes. Keep the downloaded assets outside Git; they are not part of this release either.
Run the default baseline comparison over naive and rtc:
cd kinetix
uv run src/eval_flow_rtc.py --run-path ./pretrained/bcRun FreeBAR explicitly:
uv run src/eval_flow_rtc.py \
--run-path ./pretrained/bc \
--methods freebar--methods accepts any of naive, rtc, freebar. Other useful flags are
--quick-test, --test-pairs, --output-dir, --config.step,
--config.num-evals and --config.num-flow-steps.
Run FreeBAR:
cd Isaac-GR00T
MUJOCO_GL=egl python scripts/run_eval_async.py \
--model_path /path/to/checkpoint-60000 \
--method freebar \
--n_action_steps 6 \
--inference_delay 3 \
--override_action_horizon 16 \
--task_set atomic_seen \
--split target \
--use_chunked_execution \
--n_envs 5 \
--cbf_alpha 20.0 \
--cbf_max_guidance_weight 10.0RoboCasa keeps the public method set to naive and freebar. In comparison
mode the selected --method is always recorded, and the default extra baseline
is naive:
MUJOCO_GL=egl python scripts/run_eval_async.py \
--model_path /path/to/checkpoint-60000 \
--method freebar \
--compare_methods \
--n_action_steps 6 \
--inference_delay 3 \
--override_action_horizon 16 \
--task_set atomic_seen \
--split target \
--use_chunked_executionIf you find this work useful, please cite:
Coming soonFreeBAR additions and top-level packaging are released under the Apache-2.0 License — see the LICENSE file for details. Third-party components retain their original licenses; see THIRD_PARTY_NOTICES.md.
For questions and feedback, please open an issue or contact .