Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
bindings
python
multibody
expose-liegroups.cpp
Go to the documentation of this file.
1
//
2
// Copyright (c) 2015-2020 CNRS INRIA
3
//
4
5
#include "
pinocchio/bindings/python/fwd.hpp
"
6
#include "
pinocchio/bindings/python/multibody/liegroups.hpp
"
7
#include "
pinocchio/bindings/python/utils/namespace.hpp
"
8
9
#include <
eigenpy/memory.hpp
>
10
11
namespace
pinocchio
12
{
13
namespace
python
14
{
15
16
namespace
bp
=
boost::python
;
17
18
template
<
typename
LgType>
19
CartesianProductOperationVariantTpl<double,0,LieGroupCollectionDefaultTpl>
20
makeLieGroup
()
21
{
22
return
CartesianProductOperationVariantTpl<double,0,LieGroupCollectionDefaultTpl>
(LgType());
23
}
24
25
CartesianProductOperationVariantTpl<double,0,LieGroupCollectionDefaultTpl>
26
makeRn
(
int
n)
27
{
28
return
CartesianProductOperationVariantTpl<double,0,LieGroupCollectionDefaultTpl>
(
29
VectorSpaceOperationTpl<Eigen::Dynamic,double,0>
(n));
30
}
31
32
33
/* --- Expose --------------------------------------------------------- */
34
void
exposeLieGroups
()
35
{
36
LieGroupPythonVisitor
<
37
CartesianProductOperationVariantTpl<double,0,LieGroupCollectionDefaultTpl>
38
>::expose(
"LieGroup"
);
39
40
{
41
// Switch the scope to the submodule, add methods and classes.
42
bp::scope submoduleScope =
getOrCreatePythonNamespace
(
"liegroups"
);
43
44
bp::def(
"R1"
,
makeLieGroup
<
VectorSpaceOperationTpl<1,double,0>
>);
45
bp::def(
"R2"
,
makeLieGroup
<
VectorSpaceOperationTpl<2,double,0>
>);
46
bp::def(
"R3"
,
makeLieGroup
<
VectorSpaceOperationTpl<3,double,0>
>);
47
bp::def(
"Rn"
,
makeRn
);
48
bp::def(
"SO2"
,
makeLieGroup
<
SpecialOrthogonalOperationTpl<2,double,0>
>);
49
bp::def(
"SO3"
,
makeLieGroup
<
SpecialOrthogonalOperationTpl<3,double,0>
>);
50
bp::def(
"SE2"
,
makeLieGroup
<
SpecialEuclideanOperationTpl<2,double,0>
>);
51
bp::def(
"SE3"
,
makeLieGroup
<
SpecialEuclideanOperationTpl<3,double,0>
>);
52
}
53
}
54
}
// namespace python
55
}
// namespace pinocchio
pinocchio::SpecialEuclideanOperationTpl
Definition:
special-euclidean.hpp:24
liegroups.hpp
pinocchio::python::makeLieGroup
CartesianProductOperationVariantTpl< double, 0, LieGroupCollectionDefaultTpl > makeLieGroup()
Definition:
expose-liegroups.cpp:20
namespace.hpp
pinocchio::VectorSpaceOperationTpl
Definition:
vector-space.hpp:15
fwd.hpp
pinocchio::CartesianProductOperationVariantTpl
Dynamic Cartesian product composed of elementary Lie groups defined in LieGroupVariant.
Definition:
cartesian-product-variant.hpp:18
pinocchio::python::makeRn
CartesianProductOperationVariantTpl< double, 0, LieGroupCollectionDefaultTpl > makeRn(int n)
Definition:
expose-liegroups.cpp:26
pinocchio::python::getOrCreatePythonNamespace
boost::python::object getOrCreatePythonNamespace(const std::string &submodule_name)
Helper to create or simply return an existing namespace in Python.
Definition:
namespace.hpp:22
pinocchio::SpecialOrthogonalOperationTpl
Definition:
special-orthogonal.hpp:18
pinocchio
Main pinocchio namespace.
Definition:
timings.cpp:30
boost::python
pinocchio::python::exposeLieGroups
void exposeLieGroups()
Definition:
expose-liegroups.cpp:34
pinocchio::python::LieGroupPythonVisitor
Definition:
liegroups.hpp:172
memory.hpp
python
Definition:
cmake/_unittests/python/jrl_cmakemodule/python.py:1
pinocchio
Author(s):
autogenerated on Tue Jun 1 2021 02:45:02