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 time-varying dcm planner #61

Merged
merged 25 commits into from
Jul 17, 2020
Merged

Conversation

GiulioRomualdi
Copy link
Member

This PR implements the time-varying DCM planner.

@GiulioRomualdi GiulioRomualdi self-assigned this Jul 6, 2020
@GiulioRomualdi GiulioRomualdi added the enhancement New feature or request label Jul 6, 2020
@GiulioRomualdi GiulioRomualdi force-pushed the feature/3d-dcm branch 3 times, most recently from c447adf to 0da8305 Compare July 6, 2020 13:29
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.

I am missing the TimeVaryingDCMPlanner.cpp file

src/Planners/CMakeLists.txt Outdated Show resolved Hide resolved
@S-Dafarra
Copy link
Member

I am not experiencing any memory leak on my setup with Ubuntu 20.04. What about 18.04?

@GiulioRomualdi
Copy link
Member Author

I am not experiencing any memory leak on my setup with Ubuntu 20.04. What about 18.04?

Idem

@GiulioRomualdi
Copy link
Member Author

GiulioRomualdi commented Jul 8, 2020

The current status of the CI is a bit discouraging:

According to the website the maintainers strongly suggest using directly the binaries. However, I'm not able to find the c++ version of the binaries in the get page.

@GiulioRomualdi
Copy link
Member Author

On Windows the convex hull test and the DCM planner test are failing. Actually that's very strange because the convex hull test is passing on master. The only think changed here is the vcpkg_ribotolgy version used. Tomorrow I try to replicate the problem on my PC.

@GiulioRomualdi
Copy link
Member Author

GiulioRomualdi commented Jul 17, 2020

I tried to install everything (superbuild and casadi + qhull) on my laptop and I noticed that the installation folders are structure as follows.

I installed casadi and qhull in a separate folder instead of ./robotology-superbuild/build/install

./robotology-superbuild/build/install ./robot-install
image image
Folder PATH listing for volume OS
Volume serial number is D813-7936
C:\USERS\GROMUALDI\ROBOT-INSTALL
├───bin
├───casadi
│   ├───cmake
│   ├───include
│   │   └───casadi
│   │       └───core
│   │           └───runtime
│   └───pkgconfig
├───doc
├───include
│   ├───libqhull
│   ├───libqhullcpp
│   └───libqhull_r
├───lib
│   ├───cmake
│   │   └───Qhull
│   └───pkgconfig
└───man
    └───man1  

@traversaro do you think this may be related to the issue that we have with CI on windows?

@traversaro
Copy link
Collaborator

@traversaro do you think this may be related to the issue that we have with CI on windows?

Sorry, I did not check the test output. If you check it, you can see that it is Exit code 0xc0000135 that typically means that a required dll is not found. Probably you just need to add the directory that contains the qhull and casadi dll (<install_prefix>/bin ?) to the PATH, or copy those dll in the test directory. For vcpkg dependencies this is not necessary because if I remember correctly the .dll are automatically copied by some logic contained in the vcpkg's CMAKE_TOOLCHAIN_FILE, but I may recall not correctly.

@S-Dafarra
Copy link
Member

That's weird. On my laptop, casadi does not install a casadi folder in the install prefix 🤔

image

@traversaro
Copy link
Collaborator

I checked in the log, and casadi indeed installs the .dll in a strange directory:

2020-07-15T18:08:17.0921073Z   -- Installing: D:/a/bipedal-locomotion-framework/bipedal-locomotion-framework/install/deps/casadi/casadi_xmlfile_tinyxml.lib
2020-07-15T18:08:17.0921336Z   -- Installing: D:/a/bipedal-locomotion-framework/bipedal-locomotion-framework/install/deps/casadi/casadi_xmlfile_tinyxml.dll
2020-07-15T18:08:17.0921759Z   -- Installing: D:/a/bipedal-locomotion-framework/bipedal-locomotion-framework/install/deps/casadi/casadi_conic_nlpsol.lib
2020-07-15T18:08:17.0922014Z   -- Installing: D:/a/bipedal-locomotion-framework/bipedal-locomotion-framework/install/deps/casadi/casadi_conic_nlpsol.dll
2020-07-15T18:08:17.0922316Z   -- Installing: D:/a/bipedal-locomotion-framework/bipedal-locomotion-framework/install/deps/casadi/casadi_conic_qrqp.lib
2020-07-15T18:08:17.0922577Z   -- Installing: D:/a/bipedal-locomotion-framework/bipedal-locomotion-framework/install/deps/casadi/casadi_conic_qrqp.dll
2020-07-15T18:08:17.0922941Z   -- Installing: D:/a/bipedal-locomotion-framework/bipedal-locomotion-framework/install/deps/casadi/casadi_nlpsol_qrsqp.lib
2020-07-15T18:08:17.0923535Z   -- Installing: D:/a/bipedal-locomotion-framework/bipedal-locomotion-framework/install/deps/casadi/casadi_nlpsol_qrsqp.dll
2020-07-15T18:08:17.0923812Z   -- Installing: D:/a/bipedal-locomotion-framework/bipedal-locomotion-framework/install/deps/casadi/casadi_importer_shell.lib
2020-07-15T18:08:17.0924067Z   -- Installing: D:/a/bipedal-locomotion-framework/bipedal-locomotion-framework/install/deps/casadi/casadi_importer_shell.dll
2020-07-15T18:08:17.0924323Z   -- Installing: D:/a/bipedal-locomotion-framework/bipedal-locomotion-framework/install/deps/casadi/casadi_integrator_rk.lib
2020-07-15T18:08:17.0924662Z   -- Installing: D:/a/bipedal-locomotion-framework/bipedal-locomotion-framework/install/deps/casadi/casadi_integrator_rk.dll

Probably the installation location depend on the operating system.

@GiulioRomualdi
Copy link
Member Author

That's weird. On my laptop, casadi does not install a casadi folder in the install prefix

Actually also on my laptop (Linux) casadi is not installed in the casadi folder. Those are the cmake options

Commandline options:
-DMATLAB_PREFIX:PATH="casadi" -DINCLUDE_PREFIX:PATH="casadi/include" -DIpopt_DIR:PATH="C:/robotology/vcpkg/installed/x64-windows/share/Ipopt" -DCMAKE_CONFIGURATION_TYPES:STRING="Debug;Release;MinSizeRel;RelWithDebInfo" -DCMAKE_INSTALL_PREFIX:PATH="C:/Users/gromualdi/robot-install" -DCMAKE_PREFIX:PATH="casadi/cmake" -DLIB_PREFIX:PATH="casadi" -DBIN_PREFIX:PATH="casadi" 


Cache file:
MATLAB_PREFIX:PATH=casadi
INCLUDE_PREFIX:PATH=casadi/include
Ipopt_DIR:PATH=C:/robotology/vcpkg/installed/x64-windows/share/Ipopt
CMAKE_CONFIGURATION_TYPES:STRING=Debug;Release;MinSizeRel;RelWithDebInfo
CMAKE_INSTALL_PREFIX:PATH=C:/Users/gromualdi/robot-install
CMAKE_PREFIX:PATH=casadi/cmake
LIB_PREFIX:PATH=casadi
BIN_PREFIX:PATH=casadi

@traversaro
Copy link
Collaborator

The key code is in https://github.com/casadi/casadi/blob/6f122ca22e2a869903628c5738f154c8ac0f7455/CMakeLists.txt#L317 . As in our case also on Windows we typically do "normal" installations, we should pass as LIB_PREFIX lib, BIN_PREFIX bin, etc etc.

@GiulioRomualdi
Copy link
Member Author

GiulioRomualdi commented Jul 17, 2020

The key code is in https://github.com/casadi/casadi/blob/6f122ca22e2a869903628c5738f154c8ac0f7455/CMakeLists.txt#L317 . As in our case also on Windows we typically do "normal" installations, we should pass as LIB_PREFIX lib, BIN_PREFIX bin, etc etc.

Exactly Indeed If I change the CMake options as

Commandline options:
-DMATLAB_PREFIX:PATH="" -DENABLE_EXPORT_ALL:BOOL="0" -DINCLUDE_PREFIX:PATH="include" -DIpopt_DIR:PATH="C:/robotology/vcpkg/installed/x64-windows/share/Ipopt" -DVCPKG_TARGET_TRIPLET:STRING="x64-windows" -DCMAKE_CONFIGURATION_TYPES:STRING="Debug;Release;MinSizeRel;RelWithDebInfo" -DCMAKE_INSTALL_PREFIX:PATH="C:/Users/gromualdi/robot-install" -DCMAKE_PREFIX:PATH="lib/cmake/casadi" -DLIB_PREFIX:PATH="" -DBIN_PREFIX:PATH="" 


Cache file:
MATLAB_PREFIX:PATH=
ENABLE_EXPORT_ALL:BOOL=0
INCLUDE_PREFIX:PATH=include
Ipopt_DIR:PATH=C:/robotology/vcpkg/installed/x64-windows/share/Ipopt
VCPKG_TARGET_TRIPLET:STRING=x64-windows
CMAKE_CONFIGURATION_TYPES:STRING=Debug;Release;MinSizeRel;RelWithDebInfo
CMAKE_INSTALL_PREFIX:PATH=C:/Users/gromualdi/robot-install
CMAKE_PREFIX:PATH=lib/cmake/casadi
LIB_PREFIX:PATH=
BIN_PREFIX:PATH=

casadi is installed in a "normal" manner

@GiulioRomualdi
Copy link
Member Author

422e857 fixes the compilation on Windows. Now we can use CasADi also there.

@GiulioRomualdi
Copy link
Member Author

@traversaro @S-Dafarra let me know If I can merge the PR

Copy link
Collaborator

@traversaro traversaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok for me!

@GiulioRomualdi GiulioRomualdi merged commit ea886f7 into master Jul 17, 2020
@GiulioRomualdi GiulioRomualdi deleted the feature/3d-dcm branch July 17, 2020 13:59
@S-Dafarra
Copy link
Member

BTW, very well done. This is also pretty important for future activities 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants