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


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:34:58