diff --git a/README.md b/README.md index 4c749d7..0ef29d4 100644 --- a/README.md +++ b/README.md @@ -18,16 +18,16 @@ In the contrib folder, I collected some useful 3rd-party C++ code related to g2o ## Installation ``` -git clone https://github.com/uoip/g2opy.git +git clone https://github.com/shrimo/g2opy.git cd g2opy mkdir build cd build cmake .. -make -j8 +make -j4 cd .. python setup.py install ``` -Tested under Ubuntu 16.04, Python 3.6+. +Tested under Fedora Linux 36, Python 3.10.7 ## Get Started diff --git a/python/core/eigen_types.h b/python/core/eigen_types.h index b58d529..505d438 100644 --- a/python/core/eigen_types.h +++ b/python/core/eigen_types.h @@ -182,10 +182,10 @@ void declareEigenTypes(py::module & m) { return Eigen::Quaterniond::FromTwoVectors(a, b); }) - .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) + .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(); }) .def("vec", (const Eigen::VectorBlock (Eigen::Quaterniond::*) () const) &Eigen::Quaterniond::vec)