fix geometry modules
parent
394bb82dba
commit
19287ad5c8
|
@ -29,38 +29,6 @@ class Point2 {
|
||||||
void serialize() const;
|
void serialize() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Point2Pairs {
|
|
||||||
Point2Pairs();
|
|
||||||
size_t size() const;
|
|
||||||
bool empty() const;
|
|
||||||
gtsam::Point2Pair at(size_t n) const;
|
|
||||||
void push_back(const gtsam::Point2Pair& point_pair);
|
|
||||||
};
|
|
||||||
|
|
||||||
// std::vector<gtsam::Point2>
|
|
||||||
class Point2Vector {
|
|
||||||
// Constructors
|
|
||||||
Point2Vector();
|
|
||||||
Point2Vector(const gtsam::Point2Vector& v);
|
|
||||||
|
|
||||||
// Capacity
|
|
||||||
size_t size() const;
|
|
||||||
size_t max_size() const;
|
|
||||||
void resize(size_t sz);
|
|
||||||
size_t capacity() const;
|
|
||||||
bool empty() const;
|
|
||||||
void reserve(size_t n);
|
|
||||||
|
|
||||||
// Element access
|
|
||||||
gtsam::Point2 at(size_t n) const;
|
|
||||||
gtsam::Point2 front() const;
|
|
||||||
gtsam::Point2 back() const;
|
|
||||||
|
|
||||||
// Modifiers
|
|
||||||
void assign(size_t n, const gtsam::Point2& u);
|
|
||||||
void push_back(const gtsam::Point2& x);
|
|
||||||
void pop_back();
|
|
||||||
};
|
|
||||||
|
|
||||||
#include <gtsam/geometry/StereoPoint2.h>
|
#include <gtsam/geometry/StereoPoint2.h>
|
||||||
class StereoPoint2 {
|
class StereoPoint2 {
|
||||||
|
@ -127,13 +95,6 @@ class Point3 {
|
||||||
void serialize() const;
|
void serialize() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Point3Pairs {
|
|
||||||
Point3Pairs();
|
|
||||||
size_t size() const;
|
|
||||||
bool empty() const;
|
|
||||||
gtsam::Point3Pair at(size_t n) const;
|
|
||||||
void push_back(const gtsam::Point3Pair& point_pair);
|
|
||||||
};
|
|
||||||
|
|
||||||
#include <gtsam/geometry/Rot2.h>
|
#include <gtsam/geometry/Rot2.h>
|
||||||
class Rot2 {
|
class Rot2 {
|
||||||
|
@ -486,21 +447,6 @@ class Pose3 {
|
||||||
void serialize() const;
|
void serialize() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Pose3Pairs {
|
|
||||||
Pose3Pairs();
|
|
||||||
size_t size() const;
|
|
||||||
bool empty() const;
|
|
||||||
gtsam::Pose3Pair at(size_t n) const;
|
|
||||||
void push_back(const gtsam::Pose3Pair& pose_pair);
|
|
||||||
};
|
|
||||||
|
|
||||||
class Pose3Vector {
|
|
||||||
Pose3Vector();
|
|
||||||
size_t size() const;
|
|
||||||
bool empty() const;
|
|
||||||
gtsam::Pose3 at(size_t n) const;
|
|
||||||
void push_back(const gtsam::Pose3& pose);
|
|
||||||
};
|
|
||||||
|
|
||||||
#include <gtsam/geometry/Unit3.h>
|
#include <gtsam/geometry/Unit3.h>
|
||||||
class Unit3 {
|
class Unit3 {
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
* Without this they will be automatically converted to a Python object, and all
|
* Without this they will be automatically converted to a Python object, and all
|
||||||
* mutations on Python side will not be reflected on C++.
|
* mutations on Python side will not be reflected on C++.
|
||||||
*/
|
*/
|
||||||
#include <pybind11/stl.h>
|
|
||||||
|
|
||||||
// Support for binding boost::optional types in C++11.
|
// Support for binding boost::optional types in C++11.
|
||||||
// https://pybind11.readthedocs.io/en/stable/advanced/cast/stl.html
|
// https://pybind11.readthedocs.io/en/stable/advanced/cast/stl.html
|
||||||
|
@ -19,12 +18,7 @@ namespace pybind11 { namespace detail {
|
||||||
struct type_caster<boost::optional<T>> : optional_caster<boost::optional<T>> {};
|
struct type_caster<boost::optional<T>> : optional_caster<boost::optional<T>> {};
|
||||||
}}
|
}}
|
||||||
|
|
||||||
PYBIND11_MAKE_OPAQUE(
|
|
||||||
std::vector<gtsam::Point2, Eigen::aligned_allocator<gtsam::Point2>>);
|
|
||||||
PYBIND11_MAKE_OPAQUE(gtsam::Point2Pairs);
|
|
||||||
PYBIND11_MAKE_OPAQUE(gtsam::Point3Pairs);
|
|
||||||
PYBIND11_MAKE_OPAQUE(gtsam::Pose3Pairs);
|
|
||||||
PYBIND11_MAKE_OPAQUE(std::vector<gtsam::Pose3>);
|
|
||||||
PYBIND11_MAKE_OPAQUE(
|
|
||||||
gtsam::CameraSet<gtsam::PinholeCamera<gtsam::Cal3Bundler>>);
|
|
||||||
PYBIND11_MAKE_OPAQUE(gtsam::CameraSet<gtsam::PinholeCamera<gtsam::Cal3_S2>>);
|
PYBIND11_MAKE_OPAQUE(gtsam::CameraSet<gtsam::PinholeCamera<gtsam::Cal3_S2>>);
|
||||||
|
PYBIND11_MAKE_OPAQUE(gtsam::CameraSet<gtsam::PinholeCamera<gtsam::Cal3Bundler>>);
|
||||||
|
PYBIND11_MAKE_OPAQUE(gtsam::CameraSet<gtsam::PinholeCamera<gtsam::Cal3Unified>>);
|
||||||
|
PYBIND11_MAKE_OPAQUE(gtsam::CameraSet<gtsam::PinholeCamera<gtsam::Cal3Fisheye>>);
|
||||||
|
|
|
@ -11,13 +11,6 @@
|
||||||
* and saves one copy operation.
|
* and saves one copy operation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
py::bind_vector<
|
|
||||||
std::vector<gtsam::Point2, Eigen::aligned_allocator<gtsam::Point2>>>(
|
|
||||||
m_, "Point2Vector");
|
|
||||||
py::bind_vector<std::vector<gtsam::Point2Pair>>(m_, "Point2Pairs");
|
|
||||||
py::bind_vector<std::vector<gtsam::Point3Pair>>(m_, "Point3Pairs");
|
|
||||||
py::bind_vector<std::vector<gtsam::Pose3Pair>>(m_, "Pose3Pairs");
|
|
||||||
py::bind_vector<std::vector<gtsam::Pose3>>(m_, "Pose3Vector");
|
|
||||||
py::bind_vector<gtsam::CameraSet<gtsam::PinholeCamera<gtsam::Cal3_S2>>>(
|
py::bind_vector<gtsam::CameraSet<gtsam::PinholeCamera<gtsam::Cal3_S2>>>(
|
||||||
m_, "CameraSetCal3_S2");
|
m_, "CameraSetCal3_S2");
|
||||||
py::bind_vector<gtsam::CameraSet<gtsam::PinholeCamera<gtsam::Cal3Bundler>>>(
|
py::bind_vector<gtsam::CameraSet<gtsam::PinholeCamera<gtsam::Cal3Bundler>>>(
|
||||||
|
|
Loading…
Reference in New Issue