[Admittance] applies control frame transform to mass matrix #1139
+12
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In admittance control mass matrix is not transformed to the control frame. This will reflect in two main issues:
damping_ratio
under assumption that mass and stiffness are in the same reference frame but this at the end is not the case (mass in base and stiffness in control). This (I think) may cause an under/over-damped behavior if the masses of the two involved axis (x
andz
in the example) has very different values.How to reproduce
For simplicity, suppose to be in a configuration with the
control_frame
having thez
axis coincident with thex
axis of robot base like the following:The admittance controller is configured with the following admittance parameters:
Now, faking force readings we are able to make the robot move due to compliance:
Changing the value of the parameter
admittance.mass
to [1.0, 1.0, 100.0, 0.05, 0.05, 0.05] and repeating the previous experiment should end up in ashorter
motion performed by the TCP but this is not the case. Instead, by settingadmittance.mass
to [100.0, 1.0, 1.0, 0.05, 0.05, 0.05] the motion amplitude is reduced.The effect of the missing transformation can be seen clearly in this case due to the selected configuration and since we are exasperating asymmetry in desired masses.
Proposed solution
Apply the same operations done for
stiffness
anddamping
also to themass_inv
Note: what about defining a new method or lambda function to avoid to repeat the same code for each matrix? Let me know so that I can open a new PR for that