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

Walking teleoperation fails to compile when HumanDynamicsEstimation is compiled without Xsens #39

Open
S-Dafarra opened this issue Sep 2, 2020 · 14 comments

Comments

@S-Dafarra
Copy link
Collaborator

I tried to compile the robotology-superbuild with both the options ROBOTOLOGY_ENABLE_HUMAN_DYNAMICS and ROBOTOLOGY_ENABLE_TELEOPERATION selected, walking-teleoperation fails to compile on Windows with the error:

1>------ Skipped Build: Project: UNINSTALL, Configuration: Release x64 ------
1>Project not selected to build for this solution configuration 
2>------ Build started: Project: XsensRetargetingModule, Configuration: Release x64 ------
2>LINK : fatal error LNK1104: cannot open file 'HumanDynamicsEstimation::HumanStateMsg-NOTFOUND.obj'
2>Done building project "XsensRetargetingModule.vcxproj" -- FAILED.
3>------ Skipped Build: Project: INSTALL, Configuration: Release x64 ------
3>Project not selected to build for this solution configuration 
========== Build: 0 succeeded, 1 failed, 6 up-to-date, 2 skipped ==========

Note that we did not enable the ROBOTOLOGY_USES_XSENS_MVN_SDK option.

cc @kouroshD @GiulioRomualdi

@traversaro
Copy link
Member

Sorry, I just realized that this is not tested in the superbuild. I added it in robotology/robotology-superbuild#460 .

@traversaro
Copy link
Member

@GiulioRomualdi just to understand, this was solved for running the Oculus demo or it was not necessary?

@traversaro
Copy link
Member

traversaro commented Sep 18, 2020

Friendly ping @S-Dafarra @kouroshD @GiulioRomualdi , "we did not used this for the demo and we are not working on this now" is also an acceptable answer. : )

@S-Dafarra
Copy link
Collaborator Author

@GiulioRomualdi just to understand, this was solved for running the Oculus demo or it was not necessary?

We simply disabled ROBOTOLOGY_ENABLE_HUMAN_DYNAMICS and tested without it. Nonetheless, the problem remains. @kouroshD any hint?

@GiulioRomualdi
Copy link
Member

I completely miss the comments I'm sorry. As far as I understood we disable the compilation of the repo in the windows laptop. Right now I'm not working on this. I don't know about the others

@traversaro
Copy link
Member

Ok, thanks!

@traversaro
Copy link
Member

Just to understand, how did the recent demos work if this is still unsolved?

@S-Dafarra
Copy link
Collaborator Author

S-Dafarra commented Nov 18, 2020

Just to understand, how did the recent demos work if this is still unsolved?

We were keeping the ROBOTOLOGY_ENABLE_HUMAN_DYNAMICS option to OFF and we enable it as soon as we had the XSens SDK available.

@kouroshD
Copy link
Collaborator

kouroshD commented Jun 8, 2021

When I try the Generate the solution for that, I see the following error as well on CMake Gui application:

CMake Warning (dev) in CMakeLists.txt:
  Policy CMP0111 is not set: An imported target missing its location property
  fails during generation.  Run "cmake --help-policy CMP0111" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  IMPORTED_IMPLIB not set for imported target
  "HumanDynamicsEstimation::HumanStateMsg" configuration "Debug".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in CMakeLists.txt:
  Policy CMP0111 is not set: An imported target missing its location property
  fails during generation.  Run "cmake --help-policy CMP0111" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  IMPORTED_IMPLIB not set for imported target
  "HumanDynamicsEstimation::HumanStateMsg" configuration "Release".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in CMakeLists.txt:
  Policy CMP0111 is not set: An imported target missing its location property
  fails during generation.  Run "cmake --help-policy CMP0111" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  IMPORTED_IMPLIB not set for imported target
  "HumanDynamicsEstimation::HumanStateMsg" configuration "MinSizeRel".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in CMakeLists.txt:
  Policy CMP0111 is not set: An imported target missing its location property
  fails during generation.  Run "cmake --help-policy CMP0111" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  IMPORTED_IMPLIB not set for imported target
  "HumanDynamicsEstimation::HumanStateMsg" configuration "RelWithDebInfo".
This warning is for project developers.  Use -Wno-dev to suppress it.

Moreover, as you mentioned before, when building we have the following linking problem:

Severity	Code	Description	Project	File	Line	Suppression State
Error	LNK1104	cannot open file 'HumanDynamicsEstimation::HumanStateMsg-NOTFOUND.obj'	XsensRetargetingModule	C:\Users\kdarvish\robotology-superbuild\build\src\walking-teleoperation\modules\Xsens_module\LINK	1	

So, What I thought to check as the first step was if the target for the HumanDynamicsEstimation::HumanStateMsg is built or not. To do so, I checked the installed folders, and this is the result:

  • on the install/lib we do not have it.
  • we have install/bin/HumanStateMsg.dll

Also, talking with @S-Dafarra, I have deleted the SHARED option in https://github.com/robotology/human-dynamics-estimation/blob/a55ee0d28373a1632f29667435fdd1f770eefce0/msgs/yarp/thrift/CMakeLists.txt#L18 and https://github.com/robotology/human-dynamics-estimation/blob/a55ee0d28373a1632f29667435fdd1f770eefce0/msgs/yarp/thrift/CMakeLists.txt#L56. By deleting them, we allow the CMake to build the library with the default value of BUILD_SHARED_LIBS.
So, that as now, we have install/bin/HumanStateMsg.lib file and the Walking teleoperation can build successfully when the XsensRetargeting module is enabled. It tried to build HDE and Walking teleoperation, and they are built successfully.

@traversaro
Copy link
Member

Probably the reason is that HumanStateMsg did not exported windows symbols. The alternative is to build it as static as you did, or set to on in hde https://cmake.org/cmake/help/v3.4/variable/CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS.html .

@kouroshD
Copy link
Collaborator

kouroshD commented Jun 8, 2021

Probably with this fix, we can add the github actions of the walking teleoperation to the superbuild, also enabling the related module option.

@traversaro
Copy link
Member

Probably with this fix, we can add the github actions of the walking teleoperation to the superbuild, also enabling the related module option.

For reference, you need to modify the if in https://github.com/robotology/robotology-superbuild/blob/master/.ci/initial-cache.gh.cmake#L23 . Related issue: robotology/robotology-superbuild#472 .

@S-Dafarra
Copy link
Collaborator Author

Probably the reason is that HumanStateMsg did not exported windows symbols. The alternative is to build it as static as you did, or set to on in hde https://cmake.org/cmake/help/v3.4/variable/CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS.html .

Example of usage https://github.com/robotology/how-to-export-cpp-library/blob/master/CMakeLists.txt#L45-L48

@traversaro
Copy link
Member

Not sure what changed, but I re-enabled the compilation of walking-teleoperation on Windows in robotology/robotology-superbuild#1115 and it is working fine.

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

No branches or pull requests

4 participants