From 70460ae30549e3e19cefe23388cc620cd85b78e5 Mon Sep 17 00:00:00 2001 From: shrimo Date: Thu, 8 Dec 2022 00:48:58 +0200 Subject: [PATCH 1/2] fix issues 48 --- README.md | 2 +- python/core/eigen_types.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4c749d7..14493aa 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ make -j8 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) From 416ed64aa8ea65667ae468347d99231cb141fb8a Mon Sep 17 00:00:00 2001 From: shrimo Date: Thu, 8 Dec 2022 02:28:21 +0200 Subject: [PATCH 2/2] edit README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 14493aa..0ef29d4 100644 --- a/README.md +++ b/README.md @@ -18,12 +18,12 @@ 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 ```