8#include <eigenpy/std-vector.hpp>
11using context::ConstVectorRef;
13using context::MatrixRef;
14using context::MatrixXs;
16using context::VectorRef;
18using context::VectorXs;
27 using BinaryFunTypeRet = VectorXs (
Manifold::*)(
const ConstVectorRef &,
28 const ConstVectorRef &)
const;
29 using BinaryFunType = void (
Manifold::*)(
30 const ConstVectorRef &,
const ConstVectorRef &, VectorRef)
const;
31 using JacobianFunType = void (
Manifold::*)(
32 const ConstVectorRef &,
const ConstVectorRef &, MatrixRef, int)
const;
34 bp::class_<Manifold, boost::noncopyable>(
35 "ManifoldAbstract",
"Manifold abstract class.", bp::no_init)
36 .add_property(
"nx", &
Manifold::nx,
"Manifold representation dimension.")
37 .add_property(
"ndx", &
Manifold::ndx,
"Tangent space dimension.")
40 "Get the neutral point from the manifold (if a Lie group).")
42 "rand", +[](
const Manifold &m) {
return m.
rand(); },
"self"_a,
43 "Sample a random point from the manifold.")
45 "Check if the input vector :math:`x` is a viable element of the "
48 (
"self"_a,
"x",
"v",
"out"))
50 (
"self"_a,
"x0",
"x1",
"out"))
54 (
"self"_a,
"x0",
"x1"))
56 (
void (
Manifold::*)(
const ConstVectorRef &,
const ConstVectorRef &,
59 (
"self"_a,
"x0",
"x1",
"u",
"out"))
61 (VectorXs (
Manifold::*)(
const ConstVectorRef &,
62 const ConstVectorRef &,
const Scalar &)
64 (
"self"_a,
"x0",
"x1",
"u"),
65 "Interpolate between two points on the manifold. Allocated version.")
67 (
"self"_a,
"x",
"v",
"Jout",
"arg"),
68 "Compute the Jacobian of the exp operator.")
70 (
"self"_a,
"x0",
"x1",
"Jout",
"arg"),
71 "Compute the Jacobian of the log operator.")
74 +[](
const Manifold &m,
const ConstVectorRef x,
75 const ConstVectorRef &v,
int arg) {
76 MatrixXs Jout(m.
ndx(), m.
ndx());
80 (
"self"_a,
"x",
"v",
"arg"),
81 "Compute and return the Jacobian of the exp.")
83 (
"self"_a,
"x",
"v",
"J",
"arg"),
84 "Perform parallel transport of matrix J expressed at point x+v to "
88 +[](
const Manifold &m,
const ConstVectorRef x0,
89 const ConstVectorRef &x1,
int arg) {
90 MatrixXs Jout(m.
ndx(), m.
ndx());
94 (
"self"_a,
"x0",
"x1",
"arg"),
95 "Compute and return the Jacobian of the log.")
97 "Returns an object representing the tangent space to this manifold.")
109 StdVectorPythonVisitor<std::vector<PolyManifold>>::expose(
111 eigenpy::details::overload_base_get_item_for_std_vector<
112 std::vector<PolyManifold>>());
115 bp::class_<VectorSpace, bp::bases<Manifold>>(
116 "VectorSpace",
"Basic Euclidean vector space.", bp::no_init)
117 .def(bp::init<const int>((
"self"_a,
"dim")))
119 .enable_pickling_(
true);
ManifoldAbstractTpl< Scalar > Manifold
VectorSpaceTpl< Scalar, Eigen::Dynamic > VectorSpace
xyz::polymorphic< Manifold > PolyManifold
CartesianProductTpl< Scalar > CartesianProduct
void exposeCartesianProduct()
void exposeManifolds()
Expose manifolds.
void register_polymorphic_to_python()
Expose a polymorphic value type, e.g. xyz::polymorphic<T, A>.
The cartesian product of two or more manifolds.
VectorXs rand() const
Sample a random point on the manifold.
void difference(const ConstVectorRef &x0, const ConstVectorRef &x1, VectorRef out) const
void Jintegrate(const ConstVectorRef &x, const ConstVectorRef &v, MatrixRef Jout, int arg) const
void interpolate(const ConstVectorRef &x0, const ConstVectorRef &x1, const Scalar &u, VectorRef out) const
void integrate(const ConstVectorRef &x, const ConstVectorRef &v, VectorRef out) const
VectorXs neutral() const
Get the neutral element from the manifold (if this makes sense).
void JintegrateTransport(const ConstVectorRef &x, const ConstVectorRef &v, MatrixRef Jout, int arg) const
TangentSpaceType tangentSpace() const
void Jdifference(const ConstVectorRef &x0, const ConstVectorRef &x1, MatrixRef Jout, int arg) const
virtual int ndx() const=0
virtual bool isNormalized(const ConstVectorRef &) const