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

Enable compilation of Python bindings of manif and bipedal-locomotion-framework also on Windows #838

Merged
merged 2 commits into from
Aug 25, 2021

Conversation

traversaro
Copy link
Member

@traversaro traversaro commented Jul 27, 2021

Fix #802 .

@traversaro traversaro changed the title Enable compilation of Python bindings of bipedal-locomotion-framework also on Windows Enable compilation of Python bindings of manif and bipedal-locomotion-framework also on Windows Jul 27, 2021
@traversaro
Copy link
Member Author

manif 0.0.4 python bindings compilation fails on VS2019 with:

2021-07-27T08:18:53.7636960Z C:\Miniconda\envs\test\Library\include\pybind11/pybind11.h(1340,24): error C2661: 'pybind11::cpp_function::cpp_function': no overloaded function takes 8 arguments (compiling source file D:\a\robotology-superbuild\robotology-superbuild\src\manif\python\bindings_rn.cpp) [D:\a\robotology-superbuild\robotology-superbuild\build\src\manif\python\manifpy.vcxproj] [D:\a\robotology-superbuild\robotology-superbuild\build\manif.vcxproj]
2021-07-27T08:18:53.7658630Z   D:\a\robotology-superbuild\robotology-superbuild\src\manif\python\bindings_lie_group_base.h(122): message : see reference to function template instantiation 'pybind11::class_<manif::R1d,manif::LieGroupBase<manif::R1d>> &pybind11::class_<manif::R1d,manif::LieGroupBase<manif::R1d>>::def<manif::Rn<double,1>(__cdecl manif::Rn<double,1>::* )(const manif::LieGroupBase<manif::R1d> &,tl::optional<Eigen::Ref<Eigen::Matrix<double,1,1,1,1,1>,0,Eigen::InnerStride<1>>>,tl::optional<Eigen::Ref<Eigen::Matrix<double,1,1,1,1,1>,0,Eigen::InnerStride<1>>>) const,pybind11::arg,pybind11::arg_v,pybind11::arg_v,char[358]>(const char *,Func &&,const pybind11::arg &,const pybind11::arg_v &,const pybind11::arg_v &,const char (&)[358])' being compiled [D:\a\robotology-superbuild\robotology-superbuild\build\src\manif\python\manifpy.vcxproj]

Before opening an issue in manif I want to check if this problem occurs also in the latest master branch. In conda-forge/manif-feedstock#13 the issue was solved compiling with clang-cl, but in the context of the superbuild compiling from source this may not be viable. For the time being, probably the easiest option is just to disable manifpy compilation on Windows. This may create problems if one compiles the robotology-superbuild from source and try to use the blf bindings, but I think that Python users are much more likely to just install conda binaries.

@traversaro
Copy link
Member Author

blf windows build is failing with:

2021-07-27T10:56:10.0369477Z D:\a\robotology-superbuild\robotology-superbuild\src\bipedal-locomotion-framework\bindings\python\FloatingBaseEstimators\src\LeggedOdometry.cpp(61,18): error C2672: 'operator __surrogate_func': no matching overloaded function found [D:\a\robotology-superbuild\robotology-superbuild\build\src\bipedal-locomotion-framework\bindings\python\pybind11_blf.vcxproj] [D:\a\robotology-superbuild\robotology-superbuild\build\bipedal-locomotion-framework.vcxproj]
2021-07-27T10:56:10.0389401Z D:\a\robotology-superbuild\robotology-superbuild\src\bipedal-locomotion-framework\bindings\python\FloatingBaseEstimators\src\LeggedOdometry.cpp(34,54): error C2784: 'unknown-type pybind11::detail::overload_cast_impl<const BipedalLocomotion::Estimators::FloatingBaseEstimators::InternalState &>::operator ()(Return (__cdecl *)(const BipedalLocomotion::Estimators::FloatingBaseEstimators::InternalState &)) noexcept const': could not deduce template argument for 'Return (__cdecl *)(const BipedalLocomotion::Estimators::FloatingBaseEstimators::InternalState &)' from 'overloaded-function' [D:\a\robotology-superbuild\robotology-superbuild\build\src\bipedal-locomotion-framework\bindings\python\pybind11_blf.vcxproj] [D:\a\robotology-superbuild\robotology-superbuild\build\bipedal-locomotion-framework.vcxproj]
2021-07-27T10:56:10.0420413Z   C:\Miniconda\envs\test\Library\include\pybind11\detail/common.h(812): message : see declaration of 'pybind11::detail::overload_cast_impl<const BipedalLocomotion::Estimators::FloatingBaseEstimators::InternalState &>::operator ()' [D:\a\robotology-superbuild\robotology-superbuild\build\src\bipedal-locomotion-framework\bindings\python\pybind11_blf.vcxproj]
2021-07-27T10:56:10.0888919Z D:\a\robotology-superbuild\robotology-superbuild\src\bipedal-locomotion-framework\bindings\python\FloatingBaseEstimators\src\LeggedOdometry.cpp(34,54): error C2782: 'unknown-type pybind11::detail::overload_cast_impl<const BipedalLocomotion::Estimators::FloatingBaseEstimators::InternalState &>::operator ()(Return (__cdecl Class::* )(const BipedalLocomotion::Estimators::FloatingBaseEstimators::InternalState &),std::false_type) noexcept const': template parameter 'Class' is ambiguous [D:\a\robotology-superbuild\robotology-superbuild\build\src\bipedal-locomotion-framework\bindings\python\pybind11_blf.vcxproj] [D:\a\robotology-superbuild\robotology-superbuild\build\bipedal-locomotion-framework.vcxproj]
2021-07-27T10:56:10.2794861Z   C:\Miniconda\envs\test\Library\include\pybind11\detail/common.h(816): message : see declaration of 'pybind11::detail::overload_cast_impl<const BipedalLocomotion::Estimators::FloatingBaseEstimators::InternalState &>::operator ()' [D:\a\robotology-superbuild\robotology-superbuild\build\src\bipedal-locomotion-framework\bindings\python\pybind11_blf.vcxproj]
2021-07-27T10:56:10.4183954Z   D:\a\robotology-superbuild\robotology-superbuild\src\bipedal-locomotion-framework\bindings\python\FloatingBaseEstimators\src\LeggedOdometry.cpp(34,54): message : could be 'BipedalLocomotion::Estimators::FloatingBaseEstimator' [D:\a\robotology-superbuild\robotology-superbuild\build\src\bipedal-locomotion-framework\bindings\python\pybind11_blf.vcxproj]
2021-07-27T10:56:10.4757418Z   D:\a\robotology-superbuild\robotology-superbuild\src\bipedal-locomotion-framework\bindings\python\FloatingBaseEstimators\src\LeggedOdometry.cpp(34,54): message : or       'BipedalLocomotion::Estimators::LeggedOdometry' [D:\a\robotology-superbuild\robotology-superbuild\build\src\bipedal-locomotion-framework\bindings\python\pybind11_blf.vcxproj]
2021-07-27T10:56:10.6090346Z D:\a\robotology-superbuild\robotology-superbuild\src\bipedal-locomotion-framework\bindings\python\FloatingBaseEstimators\src\LeggedOdometry.cpp(34,54): error C2784: 'unknown-type pybind11::detail::overload_cast_impl<const BipedalLocomotion::Estimators::FloatingBaseEstimators::InternalState &>::operator ()(Return (__cdecl Class::* )(const BipedalLocomotion::Estimators::FloatingBaseEstimators::InternalState &),std::false_type) noexcept const': could not deduce template argument for 'Return (__cdecl Class::* )(const BipedalLocomotion::Estimators::FloatingBaseEstimators::InternalState &)' from 'bool (__cdecl BipedalLocomotion::Estimators::LeggedOdometry::* )(const BipedalLocomotion::Estimators::FloatingBaseEstimators::InternalState &)' [D:\a\robotology-superbuild\robotology-superbuild\build\src\bipedal-locomotion-framework\bindings\python\pybind11_blf.vcxproj] [D:\a\robotology-superbuild\robotology-superbuild\build\bipedal-locomotion-framework.vcxproj]
2021-07-27T10:56:10.6660779Z   C:\Miniconda\envs\test\Library\include\pybind11\detail/common.h(816): message : see declaration of 'pybind11::detail::overload_cast_impl<const BipedalLocomotion::Estimators::FloatingBaseEstimators::InternalState &>::operator ()' [D:\a\robotology-superbuild\robotology-superbuild\build\src\bipedal-locomotion-framework\bindings\python\pybind11_blf.vcxproj]
2021-07-27T10:56:10.7996114Z D:\a\robotology-superbuild\robotology-superbuild\src\bipedal-locomotion-framework\bindings\python\FloatingBaseEstimators\src\LeggedOdometry.cpp(34,54): error C2780: 'unknown-type pybind11::detail::overload_cast_impl<const BipedalLocomotion::Estimators::FloatingBaseEstimators::InternalState &>::operator ()(Return (__cdecl Class::* )(const BipedalLocomotion::Estimators::FloatingBaseEstimators::InternalState &) const,std::true_type) noexcept const': expects 2 arguments - 1 provided [D:\a\robotology-superbuild\robotology-superbuild\build\src\bipedal-locomotion-framework\bindings\python\pybind11_blf.vcxproj] [D:\a\robotology-superbuild\robotology-superbuild\build\bipedal-locomotion-framework.vcxproj]
2021-07-27T10:56:10.8564171Z   C:\Miniconda\envs\test\Library\include\pybind11\detail/common.h(820): message : see declaration of 'pybind11::detail::overload_cast_impl<const BipedalLocomotion::Estimators::FloatingBaseEstimators::InternalState &>::operator ()' [D:\a\robotology-superbuild\robotology-superbuild\build\src\bipedal-locomotion-framework\bindings\python\pybind11_blf.vcxproj]
2021-07-27T10:56:10.9905282Z D:\a\robotology-superbuild\robotology-superbuild\src\bipedal-locomotion-framework\bindings\python\FloatingBaseEstimators\src\LeggedOdometry.cpp(64,18): error C2672: 'operator __surrogate_func': no matching overloaded function found [D:\a\robotology-superbuild\robotology-superbuild\build\src\bipedal-locomotion-framework\bindings\python\pybind11_blf.vcxproj] [D:\a\robotology-superbuild\robotology-superbuild\build\bipedal-locomotion-framework.vcxproj]
2021-07-27T10:56:11.0465811Z D:\a\robotology-superbuild\robotology-superbuild\src\bipedal-locomotion-framework\bindings\python\FloatingBaseEstimators\src\LeggedOdometry.cpp(34,54): error C2784: 'unknown-type pybind11::detail::overload_cast_impl<const Eigen::Quaterniond &,const Eigen::Vector3d &>::operator ()(Return (__cdecl *)(const Eigen::Quaterniond &,const Eigen::Vector3d &)) noexcept const': could not deduce template argument for 'Return (__cdecl *)(const Eigen::Quaterniond &,const Eigen::Vector3d &)' from 'overloaded-function' [D:\a\robotology-superbuild\robotology-superbuild\build\src\bipedal-locomotion-framework\bindings\python\pybind11_blf.vcxproj] [D:\a\robotology-superbuild\robotology-superbuild\build\bipedal-locomotion-framework.vcxproj]
2021-07-27T10:56:11.1843894Z   C:\Miniconda\envs\test\Library\include\pybind11\detail/common.h(812): message : see declaration of 'pybind11::detail::overload_cast_impl<const Eigen::Quaterniond &,const Eigen::Vector3d &>::operator ()' [D:\a\robotology-superbuild\robotology-superbuild\build\src\bipedal-locomotion-framework\bindings\python\pybind11_blf.vcxproj]
2021-07-27T10:56:11.2365792Z D:\a\robotology-superbuild\robotology-superbuild\src\bipedal-locomotion-framework\bindings\python\FloatingBaseEstimators\src\LeggedOdometry.cpp(34,54): error C2782: 'unknown-type pybind11::detail::overload_cast_impl<const Eigen::Quaterniond &,const Eigen::Vector3d &>::operator ()(Return (__cdecl Class::* )(const Eigen::Quaterniond &,const Eigen::Vector3d &),std::false_type) noexcept const': template parameter 'Class' is ambiguous [D:\a\robotology-superbuild\robotology-superbuild\build\src\bipedal-locomotion-framework\bindings\python\pybind11_blf.vcxproj] [D:\a\robotology-superbuild\robotology-superbuild\build\bipedal-locomotion-framework.vcxproj]
2021-07-27T10:56:11.3733984Z   C:\Miniconda\envs\test\Library\include\pybind11\detail/common.h(816): message : see declaration of 'pybind11::detail::overload_cast_impl<const Eigen::Quaterniond &,const Eigen::Vector3d &>::operator ()' [D:\a\robotology-superbuild\robotology-superbuild\build\src\bipedal-locomotion-framework\bindings\python\pybind11_blf.vcxproj]
2021-07-27T10:56:11.4265181Z   D:\a\robotology-superbuild\robotology-superbuild\src\bipedal-locomotion-framework\bindings\python\FloatingBaseEstimators\src\LeggedOdometry.cpp(34,54): message : could be 'BipedalLocomotion::Estimators::FloatingBaseEstimator' [D:\a\robotology-superbuild\robotology-superbuild\build\src\bipedal-locomotion-framework\bindings\python\pybind11_blf.vcxproj]
2021-07-27T10:56:11.5650824Z   D:\a\robotology-superbuild\robotology-superbuild\src\bipedal-locomotion-framework\bindings\python\FloatingBaseEstimators\src\LeggedOdometry.cpp(34,54): message : or       'BipedalLocomotion::Estimators::LeggedOdometry' [D:\a\robotology-superbuild\robotology-superbuild\build\src\bipedal-locomotion-framework\bindings\python\pybind11_blf.vcxproj]
2021-07-27T10:56:11.6166274Z D:\a\robotology-superbuild\robotology-superbuild\src\bipedal-locomotion-framework\bindings\python\FloatingBaseEstimators\src\LeggedOdometry.cpp(34,54): error C2784: 'unknown-type pybind11::detail::overload_cast_impl<const Eigen::Quaterniond &,const Eigen::Vector3d &>::operator ()(Return (__cdecl Class::* )(const Eigen::Quaterniond &,const Eigen::Vector3d &),std::false_type) noexcept const': could not deduce template argument for 'Return (__cdecl Class::* )(const Eigen::Quaterniond &,const Eigen::Vector3d &)' from 'bool (__cdecl BipedalLocomotion::Estimators::LeggedOdometry::* )(const Eigen::Quaterniond &,const Eigen::Vector3d &)' [D:\a\robotology-superbuild\robotology-superbuild\build\src\bipedal-locomotion-framework\bindings\python\pybind11_blf.vcxproj] [D:\a\robotology-superbuild\robotology-superbuild\build\bipedal-locomotion-framework.vcxproj]
2021-07-27T10:56:11.7603992Z   C:\Miniconda\envs\test\Library\include\pybind11\detail/common.h(816): message : see declaration of 'pybind11::detail::overload_cast_impl<const Eigen::Quaterniond &,const Eigen::Vector3d &>::operator ()' [D:\a\robotology-superbuild\robotology-superbuild\build\src\bipedal-locomotion-framework\bindings\python\pybind11_blf.vcxproj]
2021-07-27T10:56:11.8105631Z D:\a\robotology-superbuild\robotology-superbuild\src\bipedal-locomotion-framework\bindings\python\FloatingBaseEstimators\src\LeggedOdometry.cpp(34,54): error C2780: 'unknown-type pybind11::detail::overload_cast_impl<const Eigen::Quaterniond &,const Eigen::Vector3d &>::operator ()(Return (__cdecl Class::* )(const Eigen::Quaterniond &,const Eigen::Vector3d &) const,std::true_type) noexcept const': expects 2 arguments - 1 provided [D:\a\robotology-superbuild\robotology-superbuild\build\src\bipedal-locomotion-framework\bindings\python\pybind11_blf.vcxproj] [D:\a\robotology-superbuild\robotology-superbuild\build\bipedal-locomotion-framework.vcxproj]
2021-07-27T10:56:11.9504067Z   C:\Miniconda\envs\test\Library\include\pybind11\detail/common.h(820): message : see declaration of 'pybind11::detail::overload_cast_impl<const Eigen::Quaterniond &,const Eigen::Vector3d &>::operator ()' [D:\a\robotology-superbuild\robotology-superbuild\build\src\bipedal-locomotion-framework\bindings\python\pybind11_blf.vcxproj]

Better to try to fix this at the blf level first.

@traversaro
Copy link
Member Author

@GiulioRomualdi there is any plan for a blf release that includes ami-iit/bipedal-locomotion-framework#380 ? It would be quite useful to unblock this.

@GiulioRomualdi
Copy link
Member

@GiulioRomualdi there is any plan for a blf release that includes dic-iit/bipedal-locomotion-framework#380 ? It would be quite useful to unblock this.

Hi @traversaro, blf 0.3.0 has been released today https://github.com/dic-iit/bipedal-locomotion-framework/releases/tag/v0.3.0

@traversaro
Copy link
Member Author

@GiulioRomualdi there is any plan for a blf release that includes dic-iit/bipedal-locomotion-framework#380 ? It would be quite useful to unblock this.

Hi @traversaro, blf 0.3.0 has been released today https://github.com/dic-iit/bipedal-locomotion-framework/releases/tag/v0.3.0

Thanks!

@traversaro
Copy link
Member Author

@GiulioRomualdi there is any plan for a blf release that includes dic-iit/bipedal-locomotion-framework#380 ? It would be quite useful to unblock this.

Hi @traversaro, blf 0.3.0 has been released today https://github.com/dic-iit/bipedal-locomotion-framework/releases/tag/v0.3.0

blf will be updated to 0.3.0 in #853 .

@traversaro
Copy link
Member Author

I rebased on the top of #853 and now everything is working as expected. I also re-generated the conda packages and they build fine, see https://github.com/robotology/robotology-superbuild/actions/runs/1166017858 . The PR is ready for review, the only CI failures are unrelated and already fixed in master by #855 .

@traversaro traversaro merged commit 7729f7e into master Aug 25, 2021
@traversaro traversaro deleted the fix/802 branch August 25, 2021 13:58
Nicogene pushed a commit to Nicogene/robotology-superbuild that referenced this pull request Feb 14, 2022
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.

Enable manifpy and blf Python compilation when ROBOTOLOGY_USES_PYTHON is enabled on Windows
3 participants