ir-lab / bimanual-imitation

Code for paper, "A Comparison of Imitation Learning Algorithms for Bimanual Manipulation" (Drolet et al., 2024)
MIT License
61 stars 3 forks source link

Confusion about the admittance control #1

Closed zichunxx closed 2 months ago

zichunxx commented 2 months ago

Hi! Thanks for your great sharing!

I'm curious about the implementation of the admittance control that if it is necessary to compensate for the gravity of the gripper to require precise force sensor data.

Thanks!

mdrolet01 commented 2 months ago

Hi @zichunxx, a gravity term is included in our OSC class and we apply the rotation transformation for the gripper's coordinate frame here: https://github.com/ir-lab/bimanual-imitation/blob/main/irl_control/device.py#L202. If you notice the gripper are pulled down when the admittance gain is increased, this is due to the forces of the object. To avoid making the controller too specific, you can decrease/increase the gain depending on the object/task.

zichunxx commented 2 months ago

Thanks for your kind reply!

If you notice the gripper are pulled down when the admittance gain is increased, this is due to the forces of the object. To avoid making the controller too specific, you can decrease/increase the gain depending on the object/task.

I will try to tune the admittance gain to neutralize the object force.

I'm unfamiliar with the admittance control and don't know if the admittance control,

i.e.,

https://github.com/ir-lab/bimanual-imitation/blob/2676916f7f0092697e04b67986c5d2e1b2a39f85/irl_control/osc.py#L243-L246

significantly impacts insertion success. Will the admittance control perform better than the pure OSC mode?

Looking forward to getting some of your expertise!

mdrolet01 commented 2 months ago

For this task, you may just want to use a small gain (such as the default one). A small admittance term can in theory help cope with the contact forces during the peg insertion. But the extent to which this improves the performance might be marginal.

zichunxx commented 2 months ago

Thanks for your help! @mdrolet01

mdrolet01 commented 2 months ago

No problem! :)