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 the MultiStateWeightProvider and refactor the WeightProvider #555

Merged
merged 6 commits into from
Sep 5, 2022

Conversation

GiulioRomualdi
Copy link
Member

@GiulioRomualdi GiulioRomualdi commented Sep 2, 2022

The MultiStateWeightProvider is a provider that will allow us to perform gain scheduling. The user should provide a configuration file containing the name and the weight for each state. Then the provider will interpolate among the states using a FirstOrder stable system. The settling time of the system should be set in the configuration file.

I also implemented the associated tests and the python bindings.

I also add the possibility to set the weight provider directly in the ILinearTaskSolver::addTask() method.

The PR also introduces the concept of output and input ports. These two interfaces contain functions to get and set signals only. And advanceable inherits from them. Thanks to this w can split the concept of advanceable from the concept of getting values. For instance

class Foo : public Advanceable<double> {...};

void f(const OutputPort<double>& port);


int main() {
    Foo foo;
    f(foo);

Now the user knows that f will only get the output of the advanceable and nothing more, (for instance it will never call advance or setInput)


This substitutes #507

@GiulioRomualdi GiulioRomualdi self-assigned this Sep 2, 2022
@GiulioRomualdi GiulioRomualdi changed the title Implement the MultiWeightProvider and refactor the WeightProvider Implement the MultiStateWeightProvider and refactor the WeightProvider Sep 2, 2022
@GiulioRomualdi GiulioRomualdi force-pushed the weight_solver branch 2 times, most recently from 3440c52 to d204e91 Compare September 2, 2022 10:22
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.

Mostly comments about documentation

src/TSID/include/BipedalLocomotion/TSID/QPTSID.h Outdated Show resolved Hide resolved
src/TSID/src/QPTSID.cpp Outdated Show resolved Hide resolved
src/TSID/src/QPTSID.cpp Show resolved Hide resolved
src/IK/include/BipedalLocomotion/IK/QPInverseKinematics.h Outdated Show resolved Hide resolved
src/IK/src/QPInverseKinematics.cpp Show resolved Hide resolved
src/IK/src/QPInverseKinematics.cpp Outdated Show resolved Hide resolved
@GiulioRomualdi GiulioRomualdi force-pushed the weight_solver branch 3 times, most recently from d118a28 to 9e94ed5 Compare September 5, 2022 11:07
@GiulioRomualdi
Copy link
Member Author

@S-Dafarra I think I handled all your comments

@GiulioRomualdi
Copy link
Member Author

brew fails as already reported in: robotology/robotology-superbuild#1234

- Remove IWeightProvider
- Now ConstantWeightProvider does not inherit from IWeightProvider but from Advanceable<Eigen::VectorXd>
- Change the signature of all the methods that took as input an IWeightProvider (IWeightProvider -> PortOutput<Eigen::VectorXd>)
- Update the python bindings accordingly
@GiulioRomualdi GiulioRomualdi merged commit f1ccfd0 into master Sep 5, 2022
@GiulioRomualdi GiulioRomualdi deleted the weight_solver branch September 5, 2022 19:43
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.

2 participants