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

General improvements of the TimeVarying DCM planner #127

Merged

Conversation

GiulioRomualdi
Copy link
Member

This PR introduces some general improvements for the TimeVarying DCM planner.

  • 5da3568 convert the Casadi::MX element in Casadi::SX object. Thanks to this modification the desired DCM trajectory is computed faster.
    For instance, the test gives the following results:
    • Without the PR:
      ******************************************************************************
      This program contains Ipopt, a library for large-scale nonlinear optimization.
       Ipopt is released as open source code under the Eclipse Public License (EPL).
               For more information visit http://projects.coin-or.org/Ipopt
      ******************************************************************************
      
            solver  :   t_proc      (avg)   t_wall      (avg)    n_eval
             nlp_f  | 595.00us (  8.50us) 597.40us (  8.53us)        70
             nlp_g  |  56.22ms (803.11us)  22.99ms (328.42us)        70
          nlp_grad  |   1.91ms (  1.91ms) 727.76us (727.76us)         1
        nlp_grad_f  | 489.00us ( 19.56us) 493.73us ( 19.75us)        25
        nlp_hess_l  |  71.06ms (  3.38ms)  28.67ms (  1.37ms)        21
         nlp_jac_g  |  81.14ms (  3.01ms)  31.11ms (  1.15ms)        27
             total  | 501.12ms (501.12ms) 374.23ms (374.23ms)         1
      
    • With the PR:
      ******************************************************************************
      This program contains Ipopt, a library for large-scale nonlinear optimization.
       Ipopt is released as open source code under the Eclipse Public License (EPL).
               For more information visit http://projects.coin-or.org/Ipopt
      ******************************************************************************
      
            solver  :   t_proc      (avg)   t_wall      (avg)    n_eval
             nlp_f  | 815.00us ( 15.38us) 822.17us ( 15.51us)        53
             nlp_g  |   1.21ms ( 22.91us)   1.18ms ( 22.20us)        53
          nlp_grad  | 107.00us (107.00us) 106.85us (106.85us)         1
        nlp_grad_f  | 737.00us ( 32.04us) 738.33us ( 32.10us)        23
        nlp_hess_l  |   1.48ms ( 73.80us)   1.50ms ( 74.94us)        20
         nlp_jac_g  |   1.40ms ( 58.13us)   1.41ms ( 58.79us)        24
             total  | 276.92ms (276.92ms) 277.00ms (277.00ms)         1
      
  • 393f668 introduces the possibility to switch the linear solver used by the IPOPT.
  • f9a4cc3 improves the documentation

@GiulioRomualdi
Copy link
Member Author

GiulioRomualdi commented Oct 6, 2020

CI is failing on windows with this error that this not related with this PR

2020-10-03T02:13:45.5270628Z -- Acquiring MSYS2...
2020-10-03T02:13:45.5271845Z -- Downloading https://sourceforge.net/projects/msys2/files/Base/x86_64/msys2-base-x86_64-20190524.tar.xz/download...
2020-10-03T02:13:45.5273331Z -- Downloading http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz...
2020-10-03T02:13:45.5275261Z -- Downloading http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz... Failed. Status: 28;"Timeout was reached"
2020-10-03T02:13:45.5276616Z CMake Error at scripts/cmake/vcpkg_download_distfile.cmake:176 (message):
2020-10-03T02:13:45.5277185Z       
2020-10-03T02:13:45.5277545Z       Failed to download file.
2020-10-03T02:13:45.5278263Z       If you use a proxy, please set the HTTPS_PROXY and HTTP_PROXY environment
2020-10-03T02:13:45.5282223Z       variables to "***your-proxy-ip-address:port/".
2020-10-03T02:13:45.5283011Z       Otherwise, please submit an issue at https://github.com/Microsoft/vcpkg/issues
2020-10-03T02:13:45.5283441Z 
2020-10-03T02:13:45.5283740Z Call Stack (most recent call first):
2020-10-03T02:13:45.5284241Z   scripts/cmake/vcpkg_acquire_msys.cmake:86 (vcpkg_download_distfile)
2020-10-03T02:13:45.5284848Z   scripts/cmake/vcpkg_fixup_pkgconfig.cmake:281 (vcpkg_acquire_msys)
2020-10-03T02:13:45.5285431Z   ports/cppad/portfile.cmake:39 (vcpkg_fixup_pkgconfig)
2020-10-03T02:13:45.5285909Z   scripts/ports.cmake:79 (include)
2020-10-03T02:13:45.5286181Z 
2020-10-03T02:13:45.5286311Z 
2020-10-03T02:13:45.5286706Z Error: Building package cppad:x64-windows failed with: BUILD_FAILED
2020-10-03T02:13:45.5287284Z Please ensure you're using the latest portfiles with `.\vcpkg update`, then
2020-10-03T02:13:45.5287941Z submit an issue at https://github.com/Microsoft/vcpkg/issues including:
2020-10-03T02:13:45.5288478Z   Package: cppad:x64-windows
2020-10-03T02:13:45.5288819Z   Vcpkg version: 2020.06.15-nohash

Associated issue: microsoft/vcpkg#13286
cc @traversaro

@traversaro
Copy link
Collaborator

CI is failing on windows with this error that this not related with this PR

2020-10-03T02:13:45.5270628Z -- Acquiring MSYS2...
2020-10-03T02:13:45.5271845Z -- Downloading https://sourceforge.net/projects/msys2/files/Base/x86_64/msys2-base-x86_64-20190524.tar.xz/download...
2020-10-03T02:13:45.5273331Z -- Downloading http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz...
2020-10-03T02:13:45.5275261Z -- Downloading http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz... Failed. Status: 28;"Timeout was reached"
2020-10-03T02:13:45.5276616Z CMake Error at scripts/cmake/vcpkg_download_distfile.cmake:176 (message):
2020-10-03T02:13:45.5277185Z       
2020-10-03T02:13:45.5277545Z       Failed to download file.
2020-10-03T02:13:45.5278263Z       If you use a proxy, please set the HTTPS_PROXY and HTTP_PROXY environment
2020-10-03T02:13:45.5282223Z       variables to "***your-proxy-ip-address:port/".
2020-10-03T02:13:45.5283011Z       Otherwise, please submit an issue at https://github.com/Microsoft/vcpkg/issues
2020-10-03T02:13:45.5283441Z 
2020-10-03T02:13:45.5283740Z Call Stack (most recent call first):
2020-10-03T02:13:45.5284241Z   scripts/cmake/vcpkg_acquire_msys.cmake:86 (vcpkg_download_distfile)
2020-10-03T02:13:45.5284848Z   scripts/cmake/vcpkg_fixup_pkgconfig.cmake:281 (vcpkg_acquire_msys)
2020-10-03T02:13:45.5285431Z   ports/cppad/portfile.cmake:39 (vcpkg_fixup_pkgconfig)
2020-10-03T02:13:45.5285909Z   scripts/ports.cmake:79 (include)
2020-10-03T02:13:45.5286181Z 
2020-10-03T02:13:45.5286311Z 
2020-10-03T02:13:45.5286706Z Error: Building package cppad:x64-windows failed with: BUILD_FAILED
2020-10-03T02:13:45.5287284Z Please ensure you're using the latest portfiles with `.\vcpkg update`, then
2020-10-03T02:13:45.5287941Z submit an issue at https://github.com/Microsoft/vcpkg/issues including:
2020-10-03T02:13:45.5288478Z   Package: cppad:x64-windows
2020-10-03T02:13:45.5288819Z   Vcpkg version: 2020.06.15-nohash

Associated issue: microsoft/vcpkg#13286
cc @traversaro

That error was fixed in microsoft/vcpkg#13889 . I am generating a new archive in https://github.com/robotology/robotology-superbuild-dependencies-vcpkg, but indeed there are regressions. For the time being I suggest to bump the vcpkg tag to 76a7e9248fb3c57350b559966dcaa2d52a5e4458 as done in robotology/robotology-vcpkg-ports#16 .

@GiulioRomualdi
Copy link
Member Author

Thank you @traversaro. In e82a5e3 I bumped the vcpkg commit. Let's see if it solves the problem.

@GiulioRomualdi
Copy link
Member Author

e82a5e3 fixes the problem. Merging

@GiulioRomualdi GiulioRomualdi merged commit e43cc18 into ami-iit:master Oct 7, 2020
@GiulioRomualdi GiulioRomualdi deleted the dcm_planner/improve_speed branch October 7, 2020 08:56
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