lucabeber / effort_controller

4 stars 0 forks source link

Reference frame handling for cartesian compliance control #1

Open matteodv99tn opened 1 month ago

matteodv99tn commented 1 month ago

I am looking at the code, and I think there's an issue in how you handle reference frames

https://github.com/lucabeber/effort_controller/blob/25213244d5cf555498ff02a56f78fcd18e1fd8e6/cartesian_impedance_controller/src/cartesian_impedance_controller.cpp#L234

In this line of code you have the motion_error which appears to be computed in the base reference frame of the robot, while the m_cartesian_stiffness is defined w.r.t. the compliance link (the same goes for the damping).

I think that what you want to do is something like this, where stiffness/damping are projected from the compliance link into base. From what I understand, this step is missing in your code (so implicitly, you always use the base link as compliance frame).

Let me know if this remark is correct or I am missing something.

matteodv99tn commented 1 month ago

@Hydran00 maybe you should also get a look at that

Hydran00 commented 1 month ago

@lucabeber maybe you should also get a look at that