Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the possibility to change the weight in TSID/IK #475

Merged
merged 6 commits into from
Dec 3, 2021

Conversation

GiulioRomualdi
Copy link
Member

This closes #474

@GiulioRomualdi GiulioRomualdi marked this pull request as ready for review December 2, 2021 19:34
@GiulioRomualdi GiulioRomualdi self-assigned this Dec 2, 2021
@traversaro
Copy link
Collaborator

traversaro commented Dec 2, 2021

@GiulioRomualdi did you wanted to ask for a review instead of assigning?

@GiulioRomualdi
Copy link
Member Author

@GiulioRomualdi did you wanted to ask for a review instead of assigning?

Ops 😃

Copy link
Member

@S-Dafarra S-Dafarra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good to me. What I find misleading is that weight is singular, but it is expecting a vector instead of a number. In general, I did not understand what is the effect of this weight? In a quadratic cost function we could have two weights
$$
w1 c(x)^T diag(w2) c(x) + w1' c(x)'^T diag(w2') c(x)'.
$$
Which weight are we changing?

@GiulioRomualdi
Copy link
Member Author

Hi @S-Dafarra

The weight I'm referring to is the one associated with the norm. In TSID (same for the IK) each component of the cost function is a l2 weighted norm of the form

image

where W, in our case is a diagonal matrix. In setTaskWeight the diagonal of the diagonal matrix is passed to the solver

@S-Dafarra
Copy link
Member

Ok I see. Basically, it is the w2 in #475 (review). Can we also set the w1? If not, then there is no ambiguity

@GiulioRomualdi
Copy link
Member Author

Ok I see. Basically, it is the w2 in #475 (review). Can we also set the w1? If not, then there is no ambiguity

w1 is always 1 in tsid/ik

@GiulioRomualdi GiulioRomualdi merged commit 15b2d3c into master Dec 3, 2021
@GiulioRomualdi GiulioRomualdi deleted the ik-tsid/weights branch December 3, 2021 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make the weights editable in the IK/TSID
3 participants