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
845 stars 173 forks source link

Examples and Jupyter notebooks: improvement and clean-up - [merged] #449

Closed wxmerkt closed 4 years ago

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 12, 2019, 23:21

Merges jupyter-cleanup -> devel

In this PR, I continue with the task defined #83. I will listed here the general changes:

Additionally I improved or added functionality to few examples:

1. Bipedal walking
wxmerkt commented 4 years ago

In GitLab by @nmansard on Feb 13, 2019, 10:09

for an example, what about this solution? from crocoddyl import *

wxmerkt commented 4 years ago

In GitLab by @nmansard on Feb 13, 2019, 10:10

please comment the withGaussApprox option.

# We specify the withGaussApprox=True to have approximation of the hessian based on the jacobian of the cost residuals.

wxmerkt commented 4 years ago

In GitLab by @nmansard on Feb 13, 2019, 10:11

I don't think you need that outside the jupyter. So don't put it here.

wxmerkt commented 4 years ago

In GitLab by @nmansard on Feb 13, 2019, 10:12

why? this is pretending the notebook folder would be used as an external library. We should not have such a file here.

wxmerkt commented 4 years ago

In GitLab by @nmansard on Feb 13, 2019, 10:14

you should propagate these nice display in the plotCartpole function (or better, use the plotCartpole function inside the animateCarpole function).

wxmerkt commented 4 years ago

In GitLab by @nmansard on Feb 13, 2019, 10:18

here it is! I really don't like that. That is a ugly dependency on a subfolder. Either you really want this functionality, then put the example in the notebook folder ; or you don't care so much, the display is only for the notebook, then you don't import from notebook.

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 13, 2019, 10:58

added 50 commits

Compare with previous version

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 13, 2019, 11:07

It's used for the example which are inside example, not notebook

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 13, 2019, 11:08

Do you mean you want cartpole_swing_up.py inside notebooks folder? I put all Python examples inside example folder. If so I need to move all of them

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 13, 2019, 11:09

changed this line in version 3 of the diff

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 13, 2019, 11:09

added 1 commit

Compare with previous version

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 13, 2019, 11:10

I included a comment inside the Python script but also inside the Jupyter notebook.

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 13, 2019, 11:31

changed this line in version 4 of the diff

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 13, 2019, 11:31

changed this line in version 4 of the diff

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 13, 2019, 11:31

added 3 commits

Compare with previous version

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 13, 2019, 11:32

I usef from crocoddyl import * in each example and notebook. This reduces the among of lines.

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 13, 2019, 12:38

added 1 commit

Compare with previous version

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 13, 2019, 12:39

This function doesn't provide anything new. Indeed it's a legacy function. So I decided to remove it.

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 13, 2019, 12:50

changed this line in version 6 of the diff

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 13, 2019, 12:50

changed this line in version 6 of the diff

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 13, 2019, 12:50

added 1 commit

Compare with previous version

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 13, 2019, 12:51

I removed the subfolder dependency and moved these files to notebooks folder.

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 13, 2019, 12:52

I put this file inside notebook folder.

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 13, 2019, 12:52

resolved all discussions

wxmerkt commented 4 years ago

In GitLab by @cmastalli on Feb 13, 2019, 12:53

@nmansard I resolved all the discussions and rebase this branch. Please merge it as soon as possible. We need for tomorrow's class.

wxmerkt commented 4 years ago

In GitLab by @nmansard on Feb 13, 2019, 15:42

closed

wxmerkt commented 4 years ago

In GitLab by @nmansard on Feb 13, 2019, 15:42

reopened

wxmerkt commented 4 years ago

In GitLab by @nmansard on Feb 13, 2019, 15:43

merged

wxmerkt commented 4 years ago

In GitLab by @nmansard on Feb 13, 2019, 15:43

mentioned in commit 47b5db38b81103c7d9cba3959b886f8263b617a9