Go to the documentation of this file.
5 #ifndef __pinocchio_python_lie_group_hpp__
6 #define __pinocchio_python_lie_group_hpp__
21 template<
class LieGroupType>
26 typedef Eigen::Matrix<context::Scalar, Eigen::Dynamic, Eigen::Dynamic>
JacobianMatrix_t;
31 return lg.integrate(
q,
v);
35 const LieGroupType & lg,
40 return lg.interpolate(
q0,
q1,
u);
46 return lg.difference(
q0,
q1);
50 const LieGroupType & lg,
56 lg.dDifference(
q0,
q1,
J, arg);
61 const LieGroupType & lg,
72 lg.template dDifference<ARG0>(
q0,
q1, Jin,
self,
J,
SETTO);
75 lg.template dDifference<ARG1>(
q0,
q1, Jin,
self,
J,
SETTO);
78 throw std::invalid_argument(
"arg must be either ARG0 or ARG1");
84 const LieGroupType & lg,
95 lg.template dDifference<ARG0>(
q0,
q1,
self, Jin,
J,
SETTO);
98 lg.template dDifference<ARG1>(
q0,
q1,
self, Jin,
J,
SETTO);
101 throw std::invalid_argument(
"arg must be either ARG0 or ARG1");
107 const LieGroupType & lg,
113 lg.dIntegrate(
q,
v,
J, arg);
121 lg.dIntegrate_dq(
q,
v,
J);
126 const LieGroupType & lg,
133 lg.dIntegrate_dq(
q,
v, Jin,
self,
J,
SETTO);
138 const LieGroupType & lg,
145 lg.dIntegrate_dq(
q,
v,
self, Jin,
J,
SETTO);
153 lg.dIntegrate_dv(
q,
v,
J);
158 const LieGroupType & lg,
165 lg.dIntegrate_dv(
q,
v, Jin,
self,
J,
SETTO);
170 const LieGroupType & lg,
177 lg.dIntegrate_dv(
q,
v,
self, Jin,
J,
SETTO);
182 const LieGroupType & lg,
189 lg.dIntegrateTransport(
q,
v,
J, Jout, arg);
194 template<
class LieGroupType>
196 :
public boost::python::def_visitor<LieGroupPythonVisitor<LieGroupType>>
200 template<
class PyClass>
203 typedef Eigen::Matrix<context::Scalar, Eigen::Dynamic, 1> ConfigVector_t;
206 cl.def(bp::init<>(
"Default constructor"))
209 .def(
"dIntegrate_dq", LieGroupWrapper::dIntegrate_dq1)
210 .def(
"dIntegrate_dq", LieGroupWrapper::dIntegrate_dq2)
211 .def(
"dIntegrate_dq", LieGroupWrapper::dIntegrate_dq3)
212 .def(
"dIntegrate_dv", LieGroupWrapper::dIntegrate_dv1)
213 .def(
"dIntegrate_dv", LieGroupWrapper::dIntegrate_dv2)
214 .def(
"dIntegrate_dv", LieGroupWrapper::dIntegrate_dv3)
217 .def(
"dDifference", LieGroupWrapper::dDifference1)
218 .def(
"dDifference", LieGroupWrapper::dDifference2)
219 .def(
"dDifference", LieGroupWrapper::dDifference3)
224 "random",
static_cast<typename LieGroupType::ConfigVector_t (LieGroupType::*)() const
>(
227 "randomConfiguration",
228 &LieGroupType::template randomConfiguration<ConfigVector_t, ConfigVector_t>)
229 .def(
"distance", &LieGroupType::template distance<ConfigVector_t, ConfigVector_t>)
232 &LieGroupType::template squaredDistance<ConfigVector_t, ConfigVector_t>)
233 .def(
"normalize", &LieGroupType::template normalize<ConfigVector_t>)
240 .def(bp::self * bp::self)
241 .def(bp::self *= bp::self)
242 #ifndef PINOCCHIO_PYTHON_SKIP_COMPARISON_OPERATIONS
243 .def(bp::self == bp::self)
256 #endif // ifndef __pinocchio_python_geometry_model_hpp__
static ConfigVector_t integrate(const LieGroupType &lg, const ConfigVector_t &q, const TangentVector_t &v)
static JacobianMatrix_t dIntegrate_dq1(const LieGroupType &lg, const ConfigVector_t &q, const TangentVector_t &v)
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorIn1 > const Eigen::MatrixBase< ConfigVectorIn2 > const Scalar & u
void dIntegrate(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< TangentVectorType > &v, const Eigen::MatrixBase< JacobianMatrixType > &J, const ArgumentPosition arg, const AssignmentOperatorType op=SETTO)
Computes the Jacobian of a small variation of the configuration vector or the tangent vector into the...
std::string name(const LieGroupGenericTpl< LieGroupCollection > &lg)
Visit a LieGroupVariant to get the name of it.
static JacobianMatrix_t dDifference3(const LieGroupType &lg, const ConfigVector_t &q0, const ConfigVector_t &q1, const ArgumentPosition arg, int self, const JacobianMatrix_t &Jin)
static JacobianMatrix_t dIntegrate_dv3(const LieGroupType &lg, const ConfigVector_t &q, const TangentVector_t &v, int self, const JacobianMatrix_t &Jin)
Eigen::Matrix< context::Scalar, Eigen::Dynamic, 1 > TangentVector_t
ArgumentPosition
Argument position. Used as template parameter to refer to an argument.
void difference(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorIn1 > &q0, const Eigen::MatrixBase< ConfigVectorIn2 > &q1, const Eigen::MatrixBase< ReturnType > &dvout)
Compute the tangent vector that must be integrated during one unit time to go from q0 to q1.
void interpolate(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorIn1 > &q0, const Eigen::MatrixBase< ConfigVectorIn2 > &q1, const Scalar &u, const Eigen::MatrixBase< ReturnType > &qout)
Interpolate two configurations for a given model.
Eigen::Matrix< context::Scalar, Eigen::Dynamic, 1 > ConfigVector_t
void random(const LieGroupGenericTpl< LieGroupCollection > &lg, const Eigen::MatrixBase< Config_t > &qout)
static JacobianMatrix_t dIntegrate_dv2(const LieGroupType &lg, const ConfigVector_t &q, const TangentVector_t &v, const JacobianMatrix_t &Jin, int self)
static JacobianMatrix_t dDifference1(const LieGroupType &lg, const ConfigVector_t &q0, const ConfigVector_t &q1, const ArgumentPosition arg)
void integrate(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< TangentVectorType > &v, const Eigen::MatrixBase< ReturnType > &qout)
Integrate a configuration vector for the specified model for a tangent vector during one unit time.
static JacobianMatrix_t dDifference2(const LieGroupType &lg, const ConfigVector_t &q0, const ConfigVector_t &q1, const ArgumentPosition arg, const JacobianMatrix_t &Jin, int self)
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorIn1 > & q0
Eigen::Matrix< context::Scalar, Eigen::Dynamic, Eigen::Dynamic > JacobianMatrix_t
static TangentVector_t difference(const LieGroupType &lg, const ConfigVector_t &q0, const ConfigVector_t &q1)
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > & q
static JacobianMatrix_t dIntegrate_dv1(const LieGroupType &lg, const ConfigVector_t &q, const TangentVector_t &v)
context::MatrixXs dIntegrateTransport_proxy(const context::Model &model, const context::VectorXs &q, const context::VectorXs &v, const context::MatrixXs &Jin, const ArgumentPosition arg)
static JacobianMatrix_t dIntegrate_dq3(const LieGroupType &lg, const ConfigVector_t &q, const TangentVector_t &v, int self, const JacobianMatrix_t &Jin)
void visit(PyClass &cl) const
static JacobianMatrix_t dIntegrateTransport_proxy(const LieGroupType &lg, const ConfigVector_t &q, const TangentVector_t &v, const JacobianMatrix_t &J, const ArgumentPosition arg)
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorIn1 > const Eigen::MatrixBase< ConfigVectorIn2 > & q1
static ConfigVector_t interpolate(const LieGroupType &lg, const ConfigVector_t &q0, const ConfigVector_t &q1, const context::Scalar &u)
void neutral(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ReturnType > &qout)
Return the neutral configuration element related to the model configuration space.
static JacobianMatrix_t dIntegrate_dq2(const LieGroupType &lg, const ConfigVector_t &q, const TangentVector_t &v, const JacobianMatrix_t &Jin, int self)
static JacobianMatrix_t dIntegrate(const LieGroupType &lg, const ConfigVector_t &q, const TangentVector_t &v, const ArgumentPosition arg)
static void expose(const char *name)
PINOCCHIO_PYTHON_SCALAR_TYPE Scalar
Main pinocchio namespace.
pinocchio
Author(s):
autogenerated on Thu Dec 19 2024 03:41:31