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

Implement FeasibleContactWrenchTask for TSID component #369

Merged
merged 7 commits into from
Jul 21, 2021

Conversation

GiulioRomualdi
Copy link
Member

@GiulioRomualdi GiulioRomualdi commented Jul 14, 2021

This PR implements a task for the TSID component ensuring a feasible contract wrench

@GiulioRomualdi GiulioRomualdi self-assigned this Jul 14, 2021
@GiulioRomualdi GiulioRomualdi marked this pull request as ready for review July 15, 2021 06:23
src/TSID/src/FeasibleContactWrenchTask.cpp Outdated Show resolved Hide resolved
src/TSID/src/FeasibleContactWrenchTask.cpp Outdated Show resolved Hide resolved
Comment on lines 101 to 108
* Enable the task. I.e. a contact wrench different from zero is allowed.
*/
void enable();

/**
* Disable the task. I.e. the contact wrench is forced to be equal to zero.
*/
void disable();
Copy link
Member

Choose a reason for hiding this comment

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

There is some potential confusion on whether it is the task to be disabled (hence the wrench is not constrained), or if the wrench cannot be used to control the robot. A possibility could be to allow setting directly the maximum normal component. Another possibility could be to have a method like setContactState with an enum. Otherwise also a different naming could do the trick, although I did not find any good alternatives myself.

Copy link
Member Author

Choose a reason for hiding this comment

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

I like setContactState! the enum could be Active Inactive, what do you think?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

That would be nice. On the other hand, we should try to be coherent and use that enum also inside the class. Right now it is a boolean https://github.com/dic-iit/bipedal-locomotion-framework/blob/d81b390683127a451669b0e09ff06da199f9490a/src/Contacts/include/BipedalLocomotion/Contacts/Contact.h#L102
and only in the EstimatedContact.

For the time being, we could simply add the boolean and start using it in separate PRs.

Copy link
Member Author

Choose a reason for hiding this comment

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

In 9b8662b I implemented the function we discussed.

Co-authored-by: Stefano Dafarra <stefano.dafarra@gmail.com>
@GiulioRomualdi
Copy link
Member Author

@S-Dafarra let mIf I can merge the PR 😃

* Disable the task. I.e. the contact wrench is forced to be equal to zero.
*/
void disable();
void isContactActive(bool isActive);
Copy link
Member

Choose a reason for hiding this comment

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

I realized later that isContactActive is more in the form of a question, so I would expect a return value. Maybe setContactActive would suggest more that you are changing an internal state. Does it make sense?

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed in 1277a62

@GiulioRomualdi GiulioRomualdi force-pushed the TSID/feasible_contact_wrench_task branch from c59fc2a to 1277a62 Compare July 21, 2021 09:41
@GiulioRomualdi GiulioRomualdi force-pushed the TSID/feasible_contact_wrench_task branch from 1277a62 to 7ffb525 Compare July 21, 2021 09:43
@GiulioRomualdi GiulioRomualdi merged commit 6cc6f94 into master Jul 21, 2021
@GiulioRomualdi GiulioRomualdi deleted the TSID/feasible_contact_wrench_task branch July 21, 2021 10:14
@S-Dafarra
Copy link
Member

S-Dafarra commented Jul 21, 2021

Most of the jobs failed, did you check the output?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants