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 
utilities.h
Contains generic global functions designed particularly for the matlab interface.
module
module_ module
Definition: pybind11.h:1282
arg
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE ArgReturnType arg() const
Definition: ArrayCwiseUnaryOps.h:66
pybind11.h
module_::def_submodule
module_ def_submodule(const char *name, const char *doc=nullptr)
Definition: pybind11.h:1192
std
Definition: BFloat16.h:88
self
static const self_t self
Definition: operators.h:72
pybind11
Definition: wrap/pybind11/pybind11/__init__.py:1
eigen.h
operators.h
stl_bind.h
Pose3.h
3D Pose
PYBIND11_MODULE
PYBIND11_MODULE(operator_py, m_)
Definition: operator_pybind.cpp:16


gtsam
Author(s):
autogenerated on Mon Jul 1 2024 03:02:19