- libccd: https://github.com/danfis/libccd, follow the instruction to install libccd.
- fcl: https://github.com/flexible-collision-library/fcl, follow the instruction to install fcl. Perhaps you also need to install eigen3 manually. I use
sudo apt install libeigen3-dev
to install eigen3 library. - Tight-Inclusion: https://github.com/Continuous-Collision-Detection/Tight-Inclusion, clone Tight-Inclusion in the root directory of this repository.
- yaml-cpp: https://github.com/jbeder/yaml-cpp, follow the instruction to install yaml-cpp
- Clone the repository with
--recursive
- Install dependencies.
- Create a conda environment:
conda create -n knotting_tie python=3.8
. You can also create a conda environment follow the instruction in DiffCloth. It will create a python3.7 environment. But I found python3.8 also works well. Then, installtorch
,numpy
,PyYAML
, and other package you need. - Run
python setup.py install
at the root directory of this repository. It will automatically compile DiffClothAI and install python interface. - Start configuering your tasks. First you need to define the mesh parameters and scene configuration. These are written in a yaml file. You can take
towel_config.yaml
for example. Then, to write you own script, you can start withsrc/python_code/repair.py
for how to load a mesh into DiffClothAI and drag some vertices on it to control the mesh. A more complex example issrc/python_code/action_select.py
. It will set an optimization objective and use gradient descent to optimizea_control
to control the mesh.
real2sim related files: src/python_code/fitting_alt.py
learn@sim related files: src/python_code/RL_tie.py
, action_select_env.py