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

Added files to add osqp, OsqpEigen, UnicyclePlanner and walking-controllers #87

Merged
merged 2 commits into from
Feb 5, 2019

Conversation

S-Dafarra
Copy link
Collaborator

@S-Dafarra S-Dafarra commented Jun 13, 2018

Right now it is not compiling since https://github.com/robotology/capture-point-walking does not have a CMakeLists.txt in the root folder.

TODO:

cc @GiulioRomualdi

@S-Dafarra
Copy link
Collaborator Author

S-Dafarra commented Jun 13, 2018

For what concerns the tutorial, we may modify and link the README of the walking https://github.com/robotology/capture-point-walking/blob/master/code/cpp/README.md

CMakeLists.txt Outdated
find_or_build_package(osqp)
find_or_build_package(OsqpEigen)
find_or_build_package(UnicyclePlanner)
find_or_build_package(icubWalkingDCM)
Copy link
Member

Choose a reason for hiding this comment

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

I think we can just leave this line (or at limit the UnicyclePlanner). All other projects will be automatically downloaded and compiled as dependency listed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I see, even if I prefer to have the full list available in the CMakeLists to make sure at a first sight what is compiled.

Copy link
Member

Choose a reason for hiding this comment

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

I see, but I would at least avoid the external (osqp and qpOASES). Furthermore, for consistency I would put all the non-conditional find_or_build_package's call before the first if(ROBOTOLOGY_USES_GAZEBO).

Copy link
Member

@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.

Comments.

@traversaro
Copy link
Member

New iDynTree released, we can proceed with this PR.

@traversaro
Copy link
Member

We should update the table of the ROBOTOLOGY_ENABLE_DYNAMICS repositories in https://github.com/robotology/robotology-superbuild#profile-cmake-options . No need to list all of them, just the important ones, like walking-controllers.

@traversaro
Copy link
Member

README modified (at least for the link to walking-controllers repo) in S-Dafarra@f0a8f7b .

@traversaro
Copy link
Member

Wow, I was not aware that now you can resolve conflicts in the web UI. I think this PR is ready to be merged, what do you think @S-Dafarra @GiulioRomualdi @hu-yue ? Do you want to wait humanoids deadline to avoid changes in the robot setup?

@traversaro traversaro changed the title [WIP] Added files to add osqp, OsqpEigen, UnicyclePlanner and dcmWalking Added files to add osqp, OsqpEigen, UnicyclePlanner and walking-controllers Jul 11, 2018
@S-Dafarra
Copy link
Collaborator Author

S-Dafarra commented Jul 13, 2018

I think we have to address the compilation issues first. Also the unicyclePlanner needs to be in a specific branch for now. Do you think this is an issue?

@traversaro
Copy link
Member

Also the unicyclePlanner needs to be in a specific branch for now. Do you think this is an issue?

Yes. Until master of everything compiles with master of everything (except for the temporary YARP 2.3.72.1 situation) I would avoid putting stuff on the superbuild.

@S-Dafarra
Copy link
Collaborator Author

S-Dafarra commented Jul 13, 2018

Ok then let's merge robotology/unicycle-footstep-planner#15 so then it should be easier to implement the modifications for the walking. When it is ready we can merge devel in master (of the unicyclePlanner repo) and merge also this. Do you agree?

@traversaro
Copy link
Member

Ok, re-WIPPING for now.

@traversaro traversaro changed the title Added files to add osqp, OsqpEigen, UnicyclePlanner and walking-controllers [WIP] Added files to add osqp, OsqpEigen, UnicyclePlanner and walking-controllers Jul 13, 2018
@traversaro
Copy link
Member

I think after the latest modification in OSQP v0.4.0, the Buildosqp.cmake module needs to be updated. See osqp/osqp#82 and robotology/osqp-eigen#10 .

@S-Dafarra
Copy link
Collaborator Author

How the --recursive option can be used from within YCM, i.e., what am I supposed to add/modify? 😅

@traversaro
Copy link
Member

If this suggestion osqp/osqp#85 get accepted, I guess the proper way is to add also qdldl to the superbuild. That said, I checked the ExternalProject docs and the option is:

GIT_SUBMODULES <module>...
    Specific git submodules that should also be updated. If this option is not provided, all git submodules will be updated.

so perhaps everything already works, we just need to try.

Copy link
Member

@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.

Still a few issues pending.

@traversaro
Copy link
Member

We need to try, but I do not think that the submodules in osqp will be a problem, if anyone was considering that a blocking issue @GiulioRomualdi @S-Dafarra .

@S-Dafarra
Copy link
Collaborator Author

@traversaro
Copy link
Member

I removed in a fork the .gitattributes file of osqp, and apparently this fixed the problem on osqp. Given that we are going to drop support for Ubuntu 16.04 soonish, I am inclined to just merge this with osqp pointing to our fork, and then we can switch to osqp's upstream when we drop support for 16.04 .

Given the existing limitations of the CI, I think the last step is to test this branch on Windows and macOS at least once.

@traversaro
Copy link
Member

@DanielePucci I am afraid that until we have someone to test this once on macOS and Windows we are blocked here.

@GiulioRomualdi
Copy link
Member

For Windows, we can test the PR in the virtualizer-machine. What do you think @kouroshD?

@traversaro
Copy link
Member

It would be great @GiulioRomualdi and @kouroshD !
For macOS I hope to be able to test on the shared machine.

@lrapetti
Copy link
Member

lrapetti commented Feb 4, 2019

@traversaro I can test it on MacOS

@lrapetti
Copy link
Member

lrapetti commented Feb 4, 2019

I was able to compile the walking-controllers.

I am trying to run the controller tutorial as explained in https://github.com/robotology/walking-controllers/#computer-how-to-run-the-simulation. The preparation seems to work but it fails when running startWalking:

[INFO][updateModule] The robot is prepared. 
[INFO]IK: 0.480500 ms MPC: 0.985300 ms Total: 2.122200 ms  
[INFO]IK: 0.395200 ms MPC: 0.576200 ms Total: 1.531800 ms  
[INFO]IK: 0.377800 ms MPC: 0.608600 ms Total: 1.407900 ms  
[INFO]IK: 0.452900 ms MPC: 0.660700 ms Total: 1.975400 ms  
[INFO]IK: 0.415400 ms MPC: 0.604500 ms Total: 1.998700 ms  
[INFO]IK: 0.341000 ms MPC: 0.616200 ms Total: 1.913000 ms  
[INFO]IK: 0.462700 ms MPC: 0.673000 ms Total: 1.965600 ms  
[INFO]IK: 0.415600 ms MPC: 0.602600 ms Total: 1.879800 ms  
[INFO]IK: 0.455100 ms MPC: 0.640000 ms Total: 1.879000 ms  
[INFO]IK: 0.387200 ms MPC: 0.606400 ms Total: 2.141300 ms  
[INFO]IK: 0.507900 ms MPC: 0.636700 ms Total: 2.193500 ms  
[INFO]IK: 0.452700 ms MPC: 0.638700 ms Total: 2.284500 ms  
[INFO]IK: 0.406800 ms MPC: 0.567100 ms Total: 2.223800 ms  
[INFO]IK: 0.424200 ms MPC: 0.554700 ms Total: 2.228600 ms  
[INFO]IK: 0.441600 ms MPC: 0.622400 ms Total: 2.149900 ms  
[INFO]IK: 0.491400 ms MPC: 0.595800 ms Total: 2.310500 ms  
[INFO]IK: 0.369900 ms MPC: 0.591100 ms Total: 2.203100 ms  
[INFO]IK: 0.452900 ms MPC: 0.607800 ms Total: 2.227200 ms  
[INFO]IK: 0.405900 ms MPC: 0.632400 ms Total: 2.148500 ms  
[INFO]IK: 0.389400 ms MPC: 0.622600 ms Total: 2.152400 ms  
[INFO]IK: 0.390700 ms MPC: 0.662400 ms Total: 2.247600 ms  
[ERROR][getFeedbacks] The following readings failed: 
[ERROR]	 - Left wrench 
[ERROR]	 - Right wrench 
[ERROR][RobotHelper::getFeedbacks] Unable to get the feedback from the robot 
[ERROR][updateModule] Unable to get the feedback. 
[INFO]RFModule closing.
yarp: Removing input from /wholeBodyDynamics/right_foot/cartesianEndEffectorWrench:o to /walking-coordinator/rightFootWrench:i
yarp: Removing input from /wholeBodyDynamics/left_foot/cartesianEndEffectorWrench:o to /walking-coordinator/leftFootWrench:i
yarp: Removing output from /walking-coordinator/remoteControlBoard/icubSim/torso/rpc:o to /icubSim/torso/rpc:i
yarp: Removing output from /walking-coordinator/remoteControlBoard/icubSim/torso/command:o to /icubSim/torso/command:i
yarp: Removing input from /icubSim/torso/stateExt:o to /walking-coordinator/remoteControlBoard/icubSim/torso/stateExt:i
yarp: Removing output from /walking-coordinator/remoteControlBoard/icubSim/left_arm/rpc:o to /icubSim/left_arm/rpc:i
yarp: Removing output from /walking-coordinator/remoteControlBoard/icubSim/left_arm/command:o to /icubSim/left_arm/command:i
yarp: Removing input from /icubSim/left_arm/stateExt:o to /walking-coordinator/remoteControlBoard/icubSim/left_arm/stateExt:i
yarp: Removing output from /walking-coordinator/remoteControlBoard/icubSim/right_arm/rpc:o to /icubSim/right_arm/rpc:i
yarp: Removing output from /walking-coordinator/remoteControlBoard/icubSim/right_arm/command:o to /icubSim/right_arm/command:i
yarp: Removing input from /icubSim/right_arm/stateExt:o to /walking-coordinator/remoteControlBoard/icubSim/right_arm/stateExt:i
yarp: Removing output from /walking-coordinator/remoteControlBoard/icubSim/left_leg/rpc:o to /icubSim/left_leg/rpc:i
yarp: Removing output from /walking-coordinator/remoteControlBoard/icubSim/left_leg/command:o to /icubSim/left_leg/command:i
yarp: Removing input from /icubSim/left_leg/stateExt:o to /walking-coordinator/remoteControlBoard/icubSim/left_leg/stateExt:i
yarp: Removing output from /walking-coordinator/remoteControlBoard/icubSim/right_leg/rpc:o to /icubSim/right_leg/rpc:i
yarp: Removing output from /walking-coordinator/remoteControlBoard/icubSim/right_leg/command:o to /icubSim/right_leg/command:i
yarp: Removing input from /icubSim/right_leg/stateExt:o to /walking-coordinator/remoteControlBoard/icubSim/right_leg/stateExt:i
[INFO]RFModule finished.

@S-Dafarra
Copy link
Collaborator Author

Thanks @lrapetti! Once I have encountered a similar issue when launching the WalkingModule without specifying the YARP_CLOCK. Can you confirm this is not the case?

@lrapetti
Copy link
Member

lrapetti commented Feb 4, 2019

Thanks @lrapetti! Once I have encountered a similar issue when launching the WalkingModule without specifying the YARP_CLOCK. Can you confirm this is not the case?

My bad, I probably forgot the YARP_CLOCK. I tested it again and the walking controller is working correctly!

@traversaro
Copy link
Member

Great, we just need Windows to go (just if everything compiles correctly).

@lrapetti
Copy link
Member

lrapetti commented Feb 5, 2019

Great, we just need Windows to go (just if everything compiles correctly).

I may test Windows as well, but, if not urgent, I would prefer doing it tomorrow after demo deadline

@traversaro
Copy link
Member

Sure!

@GiulioRomualdi
Copy link
Member

I'm going to test on Windows today.

@GiulioRomualdi
Copy link
Member

GiulioRomualdi commented Feb 5, 2019

When I tried to compile osqp-eigen on Windows I retrieved the following error.

9>CMake Error at CMakeLists.txt:57 (find_package):
9>  By not providing "FindEigen3.cmake" in CMAKE_MODULE_PATH this project has
9>  asked CMake to find a package configuration file provided by "Eigen3", but
9>  CMake did not find one.
9>
9>  Could not find a package configuration file provided by "Eigen3" with any
9>  of the following names:
9>
9>    Eigen3Config.cmake
9>    eigen3-config.cmake
9>
9>  Add the installation prefix of "Eigen3" to CMAKE_PREFIX_PATH or set
9>  "Eigen3_DIR" to a directory containing one of the above files.  If "Eigen3"
9>  provides a separate development package or SDK, be sure it has been
9>  installed.

In the environment variable, there is EIGEN3_ROOT.
Probably the problem can be easily solved by coping FindEigen3.cmake inside the cmake folder of osqp-eigen.

See robotology/osqp-eigen#18

@GiulioRomualdi
Copy link
Member

By the way isn't the problem solved here? @traversaro

@GiulioRomualdi
Copy link
Member

Adding FindEigen3.cmake fixes the problem

@GiulioRomualdi
Copy link
Member

Now I had another issue. Seems that there is a problem in the linking phase in WBToolbox. Actually I don't know why it's trying to compile it. Matlab is not installed in this machine and the flag ROBOTOLOGY_USES_MATLAB is false.

17>(Link target) ->
17>SimulatorSynchronizer.obj : error LNK2019: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const blockfactory::core::BlockOptionPrioritizeOrder" (?BlockOptionPrioritizeOrder@core@blockfactory@@3V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@B) referenced in function "public: virtual class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > __cdecl wbt::block::SimulatorSynchronizer::additionalBlockOptions(void)" (?additionalBlockOptions@SimulatorSynchronizer@block@wbt@@UEAA?AV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@XZ) [C:\Users\icub\Documents\icub_ws\robotology-superbuild\build\robotology\WBToolbox\toolbox\library\WBToolbox.vcxproj]
17>C:\Users\icub\Documents\icub_ws\robotology-superbuild\build\robotology\WBToolbox\bin\Release\WBToolbox.dll : fatal error LNK1120: 1 unresolved externals [C:\Users\icub\Documents\icub_ws\robotology-superbuild\build\robotology\WBToolbox\toolbox\library\WBToolbox.vcxproj]

@diegoferigo any hint?

@diegoferigo
Copy link
Member

Actually I don't know why it's trying to compile it.

The blocks provided by WBT are not anymore Matlab-dependent. They are pure C++ classes. For this reason the toolbox is installed also if Matlab is not present.

@diegoferigo any hint?

Currently the WBT version installed from the superbuild is the former v4.1. We never had any windows user and the tests were not running in Windows at that time. If you don't need it, for the time being I would recommend to pass -DWBToolbox_TAG=master to the superbuild configuration.

@S-Dafarra
Copy link
Collaborator Author

Currently the WBT version installed from the superbuild is the former v4.1. We never had any windows user and the tests were not running in Windows at that time. If you don't need it, for the time being I would recommend to pass -DWBToolbox_TAG=master to the superbuild configuration.

Actually WBToolbox is already in master. See

@diegoferigo
Copy link
Member

set_tag(WBToolbox_TAG 368119e32955e8eed5626ddc871bba76f4cd28c1)

;)

@S-Dafarra
Copy link
Collaborator Author

S-Dafarra commented Feb 5, 2019

Oh dammit, that was hidden 😂

What about removing it?

@diegoferigo
Copy link
Member

If you mean uninstalling the toolbox, yes, you can proceed. But in this case the next time you make the superbuild it will be installed again. Instead, editing the tag is a persistent fix, as long as you do not remove the cmake cache.

@S-Dafarra
Copy link
Collaborator Author

S-Dafarra commented Feb 5, 2019

Actually that tag is in master, thus we downloading already the actual master of WBToolbox. I did not understand whether is necessary or not. If so, I have to rebase.

If you mean uninstalling the toolbox, yes, you can proceed.

I was referring to the tag.

@traversaro
Copy link
Member

By the way isn't the problem solved here? @traversaro

That FindEigen3.cmake file is not supposed to be installed, the core problem is robotology/osqp-eigen#19 .

@traversaro
Copy link
Member

The WBToolbox problem on Windows is indeed true, but independent from merging this PR actually. Feel free to disable it and verify that the rest of the superbuild works, thanks!

@GiulioRomualdi
Copy link
Member

Commenting out

find_or_build_package(BlockFactory)
find_or_build_package(WBToolbox)

and using robotology/walking-controllers#31 and robotology/osqp-eigen#19 I'm finally able to compile the superbuild on Windows10 Visual Studio 2017

@GiulioRomualdi
Copy link
Member

@diegoferigo

robotology-superbuild/cmake/ProjectsTagsMaster.cmake

Line 7 in 54b978c

set_tag(WBToolbox_TAG 368119e32955e8eed5626ddc871bba76f4cd28c1)

The issue is still there even if WBToolbox is in master.

@traversaro
Copy link
Member

As the compilation failure is not related to this PR, and robotology/walking-controllers#31 and robotology/osqp-eigen#19 are going to be merged soon, I will merge the PR so Linux and macOS user can start to benefit from the amazing walking software.

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.

None yet

5 participants