ami-iit / bipedal-locomotion-framework

Suite of libraries for achieving bipedal locomotion on humanoid robots
https://ami-iit.github.io/bipedal-locomotion-framework/
BSD 3-Clause "New" or "Revised" License
136 stars 36 forks source link

Restructure ML component #771

Closed GiulioRomualdi closed 8 months ago

GiulioRomualdi commented 8 months ago

This PR is the outcome of the refactoring carried out with @paolo-viceconte In detail, we implemented MANN::generateDummyMANNOutput and MANN::generateDummyMANNInput in the ML component. Additionally, we restructured MANNAutoregressive for improved reset handling by introducing the MANNFootState class and consolidating reset-related quantities in MANNAutoregressive::AutoregressiveState. This simplifies the generation of the initial AutoregressiveState required to start trajectory generation. Concurrently, we restructured MANNTrajectoryGenerator by eliminating the need to pass foot positions in setInitialState. We enhanced MANNTrajectoryGenerator with reset capabilities similar to MANNAutoregressive and corrected the position and time scaling to ensure accurate scaling of the CoM, base, and feet positions. The Python bindings have been updated accordingly.

Last but not least I added two examples that show how to use MANNAutoregressive and MANNTrajectoryGenerator

MANNAutoregressive

MANNAutoregressive

MANNTrajectoryGenerator

MANNTrajectoryGenerator

S-Dafarra commented 8 months ago

Reading just the header, I was a bit puzzled by the word dummy. I interpret dummy usually as a placeholder, so it is not clear to me why you want to generate a dummy? Can dummy be removed is the resulting output is actually well formed?

Reading the cpp I understood that the dummy stuff is basically filled with zeros. At this point, I would simply suggest to specify this in the doc

GiulioRomualdi commented 8 months ago

In https://github.com/ami-iit/bipedal-locomotion-framework/pull/771/commits/ae629760046a4d5cc01c897d12846254aaa80b00 I improved the documentation regarding the dummy

GiulioRomualdi commented 8 months ago

Hi @paolo-viceconte and @S-Dafarra I removed the hardcoded size of the vectors in MANN https://github.com/ami-iit/bipedal-locomotion-framework/pull/771/commits/e19b84e5bf1e42e3d4318070096066e88cdcc241

GiulioRomualdi commented 8 months ago

Hi @S-Dafarra and @paolo-viceconte if you are fine with the changes we can merge it