Skip to content

chengyzhao/HairCombSim

Repository files navigation

Hair Combing Simulator

This is the hair combing simulator used in the paper "DYMO-Hair: Generalizable Volumetric Dynamics Modeling for Robot Hair Manipulation".

This simulator is built upon Genesis, with custom Position-Based Dynamics (PBD)-based solvers for strand-level, contact-rich hair-combing simulation.

Our simulator is tested with the following environment setup:

  • Operating System: Ubuntu 22.04
  • Python Version: 3.10.14
  • Conda Version: 24.7.1
  • GCC Version: 11.4.0
  • CUDA Version: 11.8
  • NVIDIA Driver Version: 580.95.05

Installation

For installation, please run:

bash install.sh

This will set up a conda environment named ${ENV_NAME} (default: hairsim) with all necessary dependencies.

Download Assets

Please download the hair simulation assets (hair models, head models, tools, example motions, etc.) from the Google Drive link. Unzip the downloaded file and place the data folder in the root directory of this repository.

Usage

We provide several example scripts in the examples directory to show how to use the simulator for hair combing simulation and how to access the simulation states.

  1. To manually interact with the hair, run:
export PYTHONPATH=$(pwd):$PYTHONPATH

python examples/manual_mess_demo.py --case_tag <case_tag>

Replace <case_tag> with the desired case tag (e.g., usc_82). This will open a GUI window where you can use the mouse to specify combing trajectories in open3d's visualizer and pass them to the simulator for interactive hair combing.

  1. To load example motions to perform hair combing, run:
python examples/example_mess_demo.py --case_tag <case_tag>

Replace <case_tag> with the desired case tag (e.g., usc_82). This will load the pre-sampled combing trajectories for each case and perform hair combing simulation accordingly. For each trajectory, a GUI window will be opened to visualize the trajectory, and then the simulation will be performed.

About

A simulator for hair combing simulation, used in "DYMO-Hair: Generalizable Volumetric Dynamics Modeling for Robot Hair Manipulation".

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors