loco-3d / crocoddyl

Crocoddyl is an optimal control library for robot control under contact sequence. Its solver is based on various efficient Differential Dynamic Programming (DDP)-like algorithms
BSD 3-Clause "New" or "Revised" License
834 stars 172 forks source link

Quadruped example - [merged] #453

Closed wxmerkt closed 4 years ago

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 18, 2019, 15:30

Merges quadruped-example -> devel

In this PR I included an example with the HyQ robot (quadruped robot). This example consist of three DDP problems solved in sequences: 1) RH-RF walking phase, 2) LH-LF walking phase, and 3) CoM moving forward and backward.

An important remark here is that it's not possible to solve the entire problems with only DDP problem. Our DDP solver struggles the limitations of single shooting formulations as described here #114. Even with this 3 DDP problems, we cannot increase the number of nodes (i.e. knots) for each phase. Indeed the problems become easily infeasible to solve.

Additionally to this example, I did the follows:

wxmerkt commented 4 years ago

In GitLab by @nmansard on Feb 19, 2019, 09:36

this should be in unittest, even if it is an integrative test. You will then create a similar example in example for locomotion.

wxmerkt commented 4 years ago

In GitLab by @nmansard on Feb 19, 2019, 09:37

I can merge but would prefer that you move your file to unittest with a true assert to check some few aspects of the generated movement before.

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 19, 2019, 10:26

sounds a good idea. What about if I add only the CoM task for unit-testing? We could add it inside test_integrative file, or do you prefer to put in one of the defined files for unit-testing?

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 19, 2019, 13:29

added 2 commits

Compare with previous version

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 19, 2019, 13:59

added 37 commits

Compare with previous version

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 19, 2019, 14:20

added 1 commit

Compare with previous version

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 19, 2019, 14:21

I created a unit-test based on the CoM task. The code is in test_quadruped.

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 19, 2019, 14:21

resolved all discussions

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 19, 2019, 14:25

@nmansard you can merge it now.

There are few extra work. I modified the walking problem, we can now optimize more steps. I noticed that we're not properly setting the defaultState, so the quasiStatic warm point was not working as expected. Now you have both solved this issue and added the quasiStatic warm point in the example.

Extra comment

The quasiStati warm point works well for the walking problem, however it doesn't produce any improvement for single CoM task (inside unit-test). I have no explanation of this behaviour.

wxmerkt commented 4 years ago

In GitLab by @nmansard on Feb 20, 2019, 09:27

marked as a Work In Progress

wxmerkt commented 4 years ago

In GitLab by @nmansard on Feb 20, 2019, 09:27

changed the description

wxmerkt commented 4 years ago

In GitLab by @nmansard on Feb 20, 2019, 09:27

assigned to @cmastalli

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 20, 2019, 09:56

@nmansard is there any reason why you didn't merge it and change it as WIP?

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 20, 2019, 10:24

unmarked as a Work In Progress

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 20, 2019, 17:08

added 19 commits

Compare with previous version

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 20, 2019, 17:09

@nmansard you can merge it now!

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 20, 2019, 17:47

added 1 commit

Compare with previous version

wxmerkt commented 4 years ago

In GitLab by @nmansard on Feb 20, 2019, 17:55

ok thx

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 21, 2019, 08:19

added 1 commit

Compare with previous version

wxmerkt commented 4 years ago

In GitLab by @nmansard on Feb 21, 2019, 12:56

mentioned in commit 23e1d65cd10c122a80e3930ee13c2282264ff2f3

wxmerkt commented 4 years ago

In GitLab by @nmansard on Feb 21, 2019, 12:56

merged