FILIC: Dual-Loop Force-Guided Imitation Learning with Impedance Torque Control for Contact-Rich Manipulation Tasks
Clone this repository and install dependencies
git submodule update --init --recursive
pip install -e .
bash install.shOur modifications are based on some third-party repositories, and the following patch needs to be applied:
git -C third_party/DISCOVERSE am $(pwd)/patch/discoverse.patchTo collect demonstrations in simulation, run:
python3 third_party/DISCOVERSE/discoverse/examples/mocap_ik/mocap_ik_manipulator.py -r airbot_play_force -t peg_in_hole --mouse-3d --recordThe data will be saved in the third_party/DISCOVERSE/data directory by default.
To convert the collected demonstrations data to the required format for training, run:
python3 filic/convert_data.py --root third_party/DISCOVERSE/data --task-name airbot_play_force_peg_in_hole --output-dir third_party/DISCOVERSE/policies/act/data/mcapThis will convert the data and save it in the specified output directory.
To train the policy, run:
CUDA_VISIBLE_DEVICES=0 python3 train.py -tn airbot_play_force_peg_in_holeThe trained models and logs will be saved in the third_party/DISCOVERSE/policies/act/my_ckpt directory by default.
To evaluate the trained policy, run:
CUDA_VISIBLE_DEVICES=0 python3 infer.py -tn airbot_play_force_peg_in_hole -ts <timestamp>Please replace -ts with the appropriate timestamp of your trained model.
FILIC is released under the MIT License. See the license file for details.