g2opy
g2opy copied to clipboard
Fixes Eigen quaternion member access
Ubuntu 20.04 - Eigen 3.3.7
I encountered the same problem on Ubuntu 20.04. In my case, I could build the library by changing:
.def("x", (double (Eigen::Quaterniond::*) () const) &Eigen::Quaterniond::x)
.def("y", (double (Eigen::Quaterniond::*) () const) &Eigen::Quaterniond::y)
.def("z", (double (Eigen::Quaterniond::*) () const) &Eigen::Quaterniond::z)
.def("w", (double (Eigen::Quaterniond::*) () const) &Eigen::Quaterniond::w)
in g2opy/python/core/eigen_types.h
to:
.def("x", [](const Eigen::Quaterniond& q) { return q.x(); })
.def("y", [](const Eigen::Quaterniond& q) { return q.y(); })
.def("z", [](const Eigen::Quaterniond& q) { return q.z(); })
.def("w", [](const Eigen::Quaterniond& q) { return q.w(); })
Originally posted by @koide3 in https://github.com/uoip/g2opy/issues/46#issuecomment-704190419
Hello @codegrafix,
I just tried your solution to build the library on Ubuntu 20.04 - Eigen 3.3.7. I got the steps till 99%, but it still doesn't work! Do you have any idea how to solve it?
thanks
This solution works on Ubuntu 20.04 in WSL2 with stock Eigen 3.3.7