Skip to content

hutslib/NavThinker

Repository files navigation

NavThinker: Action-Conditioned World Models for
Coupled Prediction and Planning in Social Navigation

Tianshuai Hu1, Zeying Gong2, Lingdong Kong3, XiaoDong Mei1, Yiyi Ding2,
Qi Zeng2, Ao Liang4, Rong Li2, Yangyi Zhong2, Junwei Liang1,2,†

1HKUST    2HKUST (Guangzhou)    3NUS    4UCAS
Corresponding author

Project Page | Paper (arXiv)

Project Page Badge arXiv Paper Badge Habitat Sim Badge MIT License Badge

🚧 Code is still under cleanup

This repository is being prepared for open-source release. The code is not yet complete — APIs, configs, and file layout may change. See the release checklist below for status.

✨ Overview

To move safely and efficiently through crowds, a robot should not just react to what it sees now — it should think ahead about how the scene and the people in it will evolve under the actions it is considering. In social navigation, the robot's motion and human motion are mutually coupled: where the robot goes changes how people move, and vice versa.

NavThinker tackles this with an action-conditioned world model that is tightly coupled with a reinforcement-learning policy. The world model operates in the patch feature space of a frozen Depth Anything V2 encoder and autoregressively predicts the future, with multi-head decoders that reconstruct future depth maps, human trajectories, and reward. These action-conditioned future features are fused back into the policy's observation embedding and turned into social reward shaping, so the policy learns to weigh how each candidate action would reshape the future before committing to it.

The policy is trained with DD-PPO on real environment interactions and stays image-based throughout — the world model acts as an on-line advisor (foresight via feature fusion and reward shaping) rather than replacing real experience. This keeps the robustness of model-free training while injecting model-based lookahead.

We evaluate on the Social-HM3D & Social-MP3D SocialNav benchmark — large-scale photo-realistic indoor scenes populated with humans following natural movement patterns, with zero-shot transfer to Social-MP3D.

Highlights

  • Unified scene-and-interaction world model. Future depth (scene dynamics) and human trajectories (interaction) are predicted from the same patch-level latent state, sharing one dynamics model so the two predictions reinforce each other.
  • Coupled prediction & planning. The world model influences the policy through two channels: feature fusion of predictive features and action-conditioned imagination reward shaping that converts predicted human motion into social-safety penalties.

Release Checklist

This is a staged open-source release. Current status:

Done

  • README
  • Policy training + evaluation code (NavThinker, with the coupled online world model)
  • Clean configs/ and launcher scripts/ for Social-HM3D

To do

  • Full code cleanup, comments, and API stabilization
  • Pretrained checkpoints (policy + world model)
  • End-to-end verified install & dataset/episode download guide
  • Baseline configs/scripts (A*, ORCA, Habita-official, Falcon)

🛠️ Installation

This codebase is built on top of Habitat-Lab / Habitat-Sim 3.0 and the Falcon social-navigation framework.

1. Prepare the conda environment

Assuming you have conda installed:

conda_env_name=navthinker
conda create -n $conda_env_name python=3.9 cmake=3.14.0
conda activate $conda_env_name

2. Install habitat-sim & habitat-lab

Following Habitat-Lab's instructions:

conda install habitat-sim=0.3.1 withbullet headless -c conda-forge -c aihabitat

If you hit network problems, you can manually download the conda package from this link and install it via conda install --use-local /path/to/xxx.tar.bz2.

Then clone this repository and install the bundled Habitat packages and dependencies:

git clone https://github.com/hutslib/socialnav-wm.git
cd socialnav-wm
pip install -e habitat-lab
pip install -e habitat-baselines
pip install -r requirements.txt

The frozen Depth Anything V2 encoder weights are also required for the world model — see the Depth Anything V2 repository.

3. Downloading the Social-HM3D & Social-MP3D datasets

  • Scene datasets. Follow the instructions for HM3D and MatterPort3D in Habitat-Lab's DATASETS.md.

  • Episode datasets. Download the SocialNav episodes for the test scenes from this link, unzip them, and place them under the default location:

    unzip <episodes>.zip -d data/datasets/pointnav
  • Leg animation data.

    wget https://github.com/facebookresearch/habitat-lab/files/12502177/spot_walking_trajectory.csv \
      -O data/robots/spot_data/spot_walking_trajectory.csv
  • Multi-agent assets.

    python -m habitat_sim.utils.datasets_download \
      --uids hab3-episodes habitat_humanoids hab3_bench_assets hab_spot_arm

The resulting file structure should look like this:

socialnav-wm/
└── data/
    ├── datasets/
    │   └── pointnav/
    │       ├── social-hm3d/{train,val}/{content,*.json.gz}
    │       └── social-mp3d/{train,val}/{content,*.json.gz}
    ├── scene_datasets/
    ├── robots/
    ├── humanoids/
    ├── versioned_data/
    └── hab3_bench_assets/

Note: the definition of SocialNav here differs from the original task in Habitat 3.0; it follows the Social-HM3D / Social-MP3D benchmark introduced in Falcon.

🚀 Training

Experiment configs live in configs/ and the launcher scripts in scripts/. Train the NavThinker policy with DD-PPO:

# bash scripts/train.sh <config_name> <num_gpus>
bash scripts/train.sh navthinker_hm3d.yaml 4

Re-running resumes automatically and writes logs/checkpoints under experiments/<config_name>/.

The world model is co-trained online with the policy: the policy is optimized on real interactions with DD-PPO, while the world model is optimized on a replay buffer by a separate optimizer and feeds detached foresight back to the policy via feature fusion and social reward shaping. (The standalone offline world-model training pipeline is not part of this release.)

▶️ Evaluation

Evaluate a trained checkpoint on the val split (writes videos/TensorBoard under eval_experiments/navthinker/):

# bash scripts/eval.sh <config_name> <checkpoint.pth> [num_envs]
bash scripts/eval.sh navthinker_hm3d_eval.yaml experiments/navthinker/checkpoints/ckpt.100.pth 1

For zero-shot transfer, switch the benchmark task in configs/navthinker_hm3d_eval.yaml to the Social-MP3D task and evaluate the same Social-HM3D-trained checkpoint.

Baselines

For reference, the benchmark also includes two classic rule-based planners and a learning-based baseline:

  • A* — shortest-path planning with a heuristic.
  • ORCA — reciprocal collision-free multi-agent navigation.
python -u -m habitat_baselines.run --config-name=social_nav_v2/astar_hm3d.yaml
python -u -m habitat_baselines.run --config-name=social_nav_v2/orca_hm3d.yaml

✒️ Citation

If you find this repository useful in your research, please consider citing our paper:

@article{hu2026navthinker,
  title={NavThinker: Action-Conditioned World Models for Coupled Prediction and Planning in Social Navigation},
  author={Hu, Tianshuai and Gong, Zeying and Kong, Lingdong and Mei, XiaoDong and Ding, Yiyi and Zeng, Qi and Liang, Ao and Li, Rong and Zhong, Yangyi and Liang, Junwei},
  journal={arXiv preprint arXiv:2603.15359},
  year={2026}
}

This work builds on our earlier social-navigation framework, Falcon:

@article{gong2024cognition,
  title={From Cognition to Precognition: A Future-Aware Framework for Social Navigation},
  author={Gong, Zeying and Hu, Tianshuai and Qiu, Ronghe and Liang, Junwei},
  journal={arXiv preprint arXiv:2409.13244},
  year={2024}
}

🙏 Acknowledgments

We thank the following projects, on which this work builds:

📜 License

This project is released under the MIT License.

About

code for https://hutslib.github.io/NavThinker/

Resources

License

Code of conduct

Contributing

Stars

7 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors