operator_pybind.cpp
Go to the documentation of this file.
1 
2 
3 #include <pybind11/eigen.h>
4 #include <pybind11/stl_bind.h>
5 #include <pybind11/pybind11.h>
6 #include <pybind11/operators.h>
7 #include "gtsam/nonlinear/utilities.h" // for RedirectCout.
8 
9 #include "gtsam/geometry/Pose3.h"
10 
11 #include "wrap/serialization.h"
12 #include <boost/serialization/export.hpp>
13 
14 
15 
16 
17 
18 using namespace std;
19 
20 namespace py = pybind11;
21 
22 PYBIND11_MODULE(operator_py, m_) {
23  m_.doc() = "pybind11 wrapper of operator_py";
24 
25  pybind11::module m_gtsam = m_.def_submodule("gtsam", "gtsam submodule");
26 
27  py::class_<gtsam::Pose3, std::shared_ptr<gtsam::Pose3>>(m_gtsam, "Pose3")
28  .def(py::init<>())
29  .def(py::init<gtsam::Rot3, gtsam::Point3>(), py::arg("R"), py::arg("t"))
30  .def(py::self * py::self);
31 
32  py::class_<gtsam::Container<gtsam::Matrix>, std::shared_ptr<gtsam::Container<gtsam::Matrix>>>(m_gtsam, "ContainerMatrix")
33  .def("__call__", &gtsam::Container<gtsam::Matrix>::operator())
34  .def("__getitem__", &gtsam::Container<gtsam::Matrix>::operator[]);
35 
36 
37 #include "python/specializations.h"
38 
39 }
40 
module_ module
Definition: pybind11.h:943
module_ def_submodule(const char *name, const char *doc=nullptr)
Definition: pybind11.h:903
static const self_t self
Definition: operators.h:41
Definition: Half.h:150
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ArgReturnType arg() const
PYBIND11_MODULE(operator_py, m_)
3D Pose


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:43:05