special_cases_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 
8 
9 
10 
11 
12 using namespace std;
13 
14 namespace py = pybind11;
15 
16 PYBIND11_MODULE(special_cases_py, m_) {
17  m_.doc() = "pybind11 wrapper of special_cases_py";
18 
19  pybind11::module m_gtsam = m_.def_submodule("gtsam", "gtsam submodule");
20 
21  py::class_<gtsam::NonlinearFactorGraph, std::shared_ptr<gtsam::NonlinearFactorGraph>>(m_gtsam, "NonlinearFactorGraph")
22  .def("addPriorPinholeCameraCal3Bundler",[](gtsam::NonlinearFactorGraph* self, size_t key, const gtsam::PinholeCamera<gtsam::Cal3Bundler>& prior, const std::shared_ptr<gtsam::noiseModel::Base> noiseModel){ self->addPrior<gtsam::PinholeCamera<gtsam::Cal3Bundler>>(key, prior, noiseModel);}, py::arg("key"), py::arg("prior"), py::arg("noiseModel"));
23 
24  py::class_<gtsam::SfmTrack, std::shared_ptr<gtsam::SfmTrack>>(m_gtsam, "SfmTrack")
25  .def_readwrite("measurements", &gtsam::SfmTrack::measurements);
26 
27  py::class_<gtsam::PinholeCamera<gtsam::Cal3Bundler>, std::shared_ptr<gtsam::PinholeCamera<gtsam::Cal3Bundler>>>(m_gtsam, "PinholeCameraCal3Bundler");
28 
29  py::class_<gtsam::GeneralSFMFactor<gtsam::PinholeCamera<gtsam::Cal3Bundler>, gtsam::Point3>, std::shared_ptr<gtsam::GeneralSFMFactor<gtsam::PinholeCamera<gtsam::Cal3Bundler>, gtsam::Point3>>> generalsfmfactorcal3bundler(m_gtsam, "GeneralSFMFactorCal3Bundler");
30  generalsfmfactorcal3bundler
31  .def_readwrite("verbosity", &gtsam::GeneralSFMFactor<gtsam::PinholeCamera<gtsam::Cal3Bundler>, gtsam::Point3>::verbosity);
32 
33  py::enum_<gtsam::GeneralSFMFactor<gtsam::PinholeCamera<gtsam::Cal3Bundler>, gtsam::Point3>::Verbosity>(generalsfmfactorcal3bundler, "Verbosity", py::arithmetic())
37 
38 
39 
40 #include "python/specializations.h"
41 
42 }
43 
utilities.h
Contains generic global functions designed particularly for the matlab interface.
gtsam::SfmTrack2d::measurements
std::vector< SfmMeasurement > measurements
The 2D image projections (id,(u,v))
Definition: SfmTrack.h:44
PYBIND11_MODULE
PYBIND11_MODULE(special_cases_py, m_)
Definition: special_cases_pybind.cpp:16
module
module_ module
Definition: pybind11.h:1367
gtsam::PinholeCamera
Definition: PinholeCamera.h:33
gtsam::NonlinearFactorGraph
Definition: NonlinearFactorGraph.h:55
arg
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE ArgReturnType arg() const
Definition: ArrayCwiseUnaryOps.h:66
key
const gtsam::Symbol key('X', 0)
pybind11.h
module_::def_submodule
module_ def_submodule(const char *name, const char *doc=nullptr)
Definition: pybind11.h:1259
std
Definition: BFloat16.h:88
gtsam::GeneralSFMFactor
Definition: GeneralSFMFactor.h:59
gtsam::Point3
Vector3 Point3
Definition: Point3.h:38
pybind11
Definition: wrap/pybind11/pybind11/__init__.py:1
different_sigmas::prior
const auto prior
Definition: testHybridBayesNet.cpp:238
eigen.h
operators.h
Cal3Bundler.h
Calibration used by Bundler.
stl_bind.h
test_callbacks.value
value
Definition: test_callbacks.py:160


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:14:01