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 disable the proportional controller in the IK::SE3Task #373

Merged
merged 6 commits into from
Jul 23, 2021

Conversation

GiulioRomualdi
Copy link
Member

This PR adds the possibility to disable/enable the LieGroup controller in the IK::SE3Task.

This feature is useful when the task is used to control the foot. Indeed when the foot is in contact with the ground the desired cartesian velocity should be fixed to zero.

As far as I know, @paolo-viceconte needed this feature to obtain successful results in his test. This PR give a better structure to the feature.

This PR depends on ami-iit/lie-group-controllers#9

@GiulioRomualdi GiulioRomualdi self-assigned this Jul 21, 2021
@GiulioRomualdi GiulioRomualdi force-pushed the feature/SE3_task_disable_controller branch from de06fa9 to b17d3d0 Compare July 21, 2021 14:34
@GiulioRomualdi GiulioRomualdi changed the title Add the possibility to disable the prooportional controller in the IK::SE3Task Add the possibility to disable the proprortional controller in the IK::SE3Task Jul 21, 2021
@GiulioRomualdi GiulioRomualdi changed the title Add the possibility to disable the proprortional controller in the IK::SE3Task Add the possibility to disable the proportional controller in the IK::SE3Task Jul 22, 2021
@GiulioRomualdi GiulioRomualdi force-pushed the feature/SE3_task_disable_controller branch 2 times, most recently from 6c267e1 to 12a6487 Compare July 23, 2021 08:30
@GiulioRomualdi
Copy link
Member Author

I forgot to push a fie. Now the PR is ready to be reviewed

@traversaro
Copy link
Collaborator

I am a bit confused by the setControlState/getControlState naming of the methods. If I understood correctly, this API will permit to disable the "star trick" controller, and directly specify the desired value for the task. If you are disabling the controller, what it does mean to set its state? Furthermore, the PD controller tipically used by "star trick" are state-less controllers, so it is not clear what it does mean to set its state. Perhaps we could call that the "Task Input", and document that the "Task Input" can either be computed automatically with a PD controller that computes this value from position and velocity feedback of some kind, or provided directly.

Also a few lines of examples of use of this API (or even modifying the scheme we did some time ago, and I don't remember if it is somewhere in docs).

@traversaro
Copy link
Collaborator

traversaro commented Jul 23, 2021

Also, having a normal name for "start trick" controller to use in docs and issue/PRs would be probably useful, not sure if anyone has any good idea on this. The words that we use tipically influence how clear we have in mind a subject, especially for new comers (see https://www.youtube.com/watch?v=oQ1WIxtylGc). fyi @DanielePucci

@traversaro
Copy link
Collaborator

(or even modifying the scheme we did some time ago, and I don't remember if it is somewhere in docs

Found it: https://dic-iit.github.io/bipedal-locomotion-framework/classBipedalLocomotion_1_1IK_1_1IntegrationBasedIK.html#vc . I think after this PR that scheme is outdated, we don't need to update it now but I would open an issue to eventually update it.

@traversaro
Copy link
Collaborator

Also, having a normal name for "start trick" controller to use in docs and issue/PRs would be probably useful, not sure if anyone has any good idea on this. The words that we use tipically influence how clear we have in mind a subject, especially for new comers (see https://www.youtube.com/watch?v=oQ1WIxtylGc). fyi @DanielePucci

In https://dic-iit.github.io/bipedal-locomotion-framework/classBipedalLocomotion_1_1IK_1_1IntegrationBasedIK.html#vc we called it "Task Level Controller", probably we can consider that naming.

@DanielePucci
Copy link
Member

DanielePucci commented Jul 23, 2021

Also, having a normal name for "start trick" controller to use in docs and issue/PRs would be probably useful, not sure if anyone has any good idea on this.

I agree on this, a possibility could be that of referring to the quantity set by the "star trick". Often, it is a sort of "desired acceleration", or velocity, that stabilises the task towards the desired value. Calling them "desired velocity/acceleration", however, would create the confusion between the actual desired quantities and those that the controller has to achieve to stabilize the desired quantity itself.

So, more precisely, the star trick often refers to shape of the closed loop dynamics that the control input should impose to stabilize the desired quantity. A possibility then could be that of calling it something like closed-loop-[quantity], e.g closed-loop-acceleration or closed-loop-velocity, or more generally closed-loop-dynamics or closed-loop-task

The words that we use tipically influence how clear we have in mind a subject, especially for new comers (see https://www.youtube.com/watch?v=oQ1WIxtylGc). fyi @DanielePucci

In this respect, there is a nice quote I like by Ambrose Bierce, author of the book Write It Right, a Little Blacklist of Literary Faults that is

Clear writing is clear thinking made visible.

@GiulioRomualdi
Copy link
Member Author

After a F2F discussion with @traversaro we decided to apply the following modification to this class:
1 ControlTask -> ITaskControllerManager
2. State -> Mode
3. setControlState -> setTaskControllerMode
4. getControlState -> getTaskControllerMode

@GiulioRomualdi GiulioRomualdi force-pushed the feature/SE3_task_disable_controller branch from 12a6487 to 41c9920 Compare July 23, 2021 12:33
@GiulioRomualdi
Copy link
Member Author

GiulioRomualdi commented Jul 23, 2021

As usual vcpkg fails but @traversaro is on it robotology/robotology-superbuild-dependencies-vcpkg#48

@GiulioRomualdi GiulioRomualdi merged commit bbc2fff into master Jul 23, 2021
@GiulioRomualdi GiulioRomualdi deleted the feature/SE3_task_disable_controller branch July 23, 2021 14:57
@traversaro
Copy link
Collaborator

After a F2F discussion with @traversaro we decided to apply the following modification to this class:
1 ControlTask -> ITaskControllerManager
2. State -> Mode
3. setControlState -> setTaskControllerMode
4. getControlState -> getTaskControllerMode

To elaborate a bit more on this choice: an instantaneous PD controller in which the actual feedback can be enable or disabled, while the feedforward parts remains, it is effectively a hybrid system, in which there is no continuous state as the output is a function of the input, but with a discrete state that is a boolean variable that indicates if the feedback is active or not. As the "discrete state" in hybrid system is often also called "mode", that was the rationale to use "mode" instead of "state".

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.

3 participants