MCPcopy Index your code
hub / github.com/XuAdventurer/PIN-WM

github.com/XuAdventurer/PIN-WM @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
533 symbols 1,622 edges 78 files 83 documented · 16%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

PIN-WM : Learning Physics-INformed World Models for Non-Prehensile Manipulation

Project Page | Paper

Wenxuan Li, Hang Zhao, Zhiyuan Yu, Yu Du, Qin Zou, Ruizhen Hu†, Kai Xu†

*Equal Contribution, †Corresponding Authors

While non-prehensile manipulation (e.g., controlled pushing/poking) constitutes a foundational robotic skill, its learning remains challenging due to the high sensitivity to complex physical interactions involving friction and restitution. To achieve robust policy learning and generalization, we opt to learn a world model of the 3D rigid body dynamics involved in non- prehensile manipulations and use it for model-based reinforcement learning.We propose PIN-WM, a Physics-INformed World Model that enables efficient end-to-end identification of a 3D rigid body dynamical system from visual observations. Adopting differentiable physics simulation, PIN-WM can be learned with only few-shot and task-agnostic physical interaction trajectories. Further, PIN-WM is learned with observational loss induced by Gaussian Splatting without needing state estimation. To bridge Sim2Real gaps, we turn the learned PIN-WM into a group of Digital Cousins via physics-aware perturbations which perturb physics and rendering parameters to generate diverse and meaningful variations of the PIN-WM.Extensive evaluations on both simulation and real-world tests demonstrate that PIN- WM, enhanced with physics-aware digital cousins, facilitates learning robust non-prehensile manipulation skills with Sim2Real transfer, surpassing the Real2Sim2Real state-of-the-arts.

TODO

  • [x] Release the code of data preparation.
  • [x] Release the code of 2dgs training.
  • [x] Release the code of physical parameters identification.

Installation

git clone https://github.com/XuAdventurer/PIN-WM.git
cd PIN-WM
conda env create -f environment.yaml
conda activate pin_wm

Prepare the data

python ./scripts/collect_2dgs_data.py
python ./scripts/collect_video_data.py

Train the 2dgs

python ./scripts/train_2dgs.py

Identify physical parameters

python ./scripts/identify_physical_parameters.py

Acknowledgement

Parts of the code are modified from 2DGS and diffsdfsim. Thanks to the original authors.

Citation

@article{li2025pin,
        title={PIN-WM: Learning Physics-INformed World Models for Non-Prehensile Manipulation},
        author={Li, Wenxuan and Zhao, Hang and Yu, Zhiyuan and Du, Yu and Zou, Qin and Hu, Ruizhen and Xu, Kai},
        journal={arXiv preprint arXiv:2504.16693},
        year={2025}
      }

Core symbols most depended-on inside this repo

record
called by 19
utils/sys_utils.py
log
called by 14
utils/sys_utils.py
expandParam
called by 14
diff_simulation/solver/util.py
get_material
called by 13
diff_simulation/physical_parameters.py
read_next_bytes
called by 13
diff_rendering/gaussian_splatting_2d/scene/colmap_loader.py
get_body
called by 10
diff_simulation/simulator.py
get_body_list_index
called by 10
diff_simulation/simulator.py
write
called by 9
utils/sys_utils.py

Shape

Method 252
Function 221
Class 60

Languages

Python94%
C++6%

Modules by API surface

utils/sys_utils.py40 symbols
diff_rendering/gaussian_splatting_2d/scene/gaussian_model.py38 symbols
diff_simulation/simulator.py32 symbols
diff_simulation/body/base.py31 symbols
diff_rendering/gaussian_splatting_2d/submodules/diff-surfel-rasterization/cuda_rasterizer/auxiliary.h23 symbols
utils/quaternion_utils.py20 symbols
diff_simulation/solver/lcp_solver.py18 symbols
diff_rendering/gaussian_splatting_2d/utils/render_utils.py16 symbols
diff_rendering/gaussian_splatting_2d/utils/general_utils.py15 symbols
envs/base.py14 symbols
diff_simulation/solver/batch.py14 symbols
diff_rendering/gaussian_splatting_2d/utils/mesh_utils.py14 symbols

For agents

$ claude mcp add PIN-WM \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact