5 #ifndef __pinocchio_cartesian_product_variant_hpp__ 6 #define __pinocchio_cartesian_product_variant_hpp__ 8 #include "pinocchio/multibody/liegroup/liegroup-base.hpp" 9 #include "pinocchio/multibody/liegroup/liegroup-collection.hpp" 11 #include "pinocchio/container/aligned-vector.hpp" 17 template<
typename,
int>
class LieGroupCollectionTpl = LieGroupCollectionDefaultTpl>
21 template<
typename _Scalar,
int _Options,
template<
typename,
int>
class LieGroupCollectionTpl>
35 template<
typename _Scalar,
int _Options,
template<
typename,
int>
class LieGroupCollectionTpl>
37 :
public LieGroupBase<CartesianProductOperationVariantTpl<_Scalar, _Options, LieGroupCollectionTpl> >
39 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
50 , lg_nqs(0), lg_nvs(0)
61 , lg_nqs(0), lg_nvs(0)
74 const LieGroupGeneric & lg2)
76 , lg_nqs(0), lg_nvs(0)
87 void append(
const LieGroupGeneric & lg);
94 template<
typename LieGroupDerived>
97 LieGroupGeneric lgGeneric (lg);
133 template<
typename LieGroupDerived>
136 append<LieGroupDerived>(lg);
140 int nq()
const {
return m_nq; }
141 int nv()
const {
return m_nv; }
143 std::string
name()
const {
return m_name; }
147 template <
class ConfigL_t,
class ConfigR_t,
class Tangent_t>
148 void difference_impl(
const Eigen::MatrixBase<ConfigL_t> &
q0,
149 const Eigen::MatrixBase<ConfigR_t> &
q1,
150 const Eigen::MatrixBase<Tangent_t> &
d)
const;
152 template <ArgumentPosition arg,
class ConfigL_t,
class ConfigR_t,
class JacobianOut_t>
153 void dDifference_impl(
const Eigen::MatrixBase<ConfigL_t> & q0,
154 const Eigen::MatrixBase<ConfigR_t> & q1,
155 const Eigen::MatrixBase<JacobianOut_t> &
J)
const;
157 template <ArgumentPosition arg,
class ConfigL_t,
class ConfigR_t,
class JacobianIn_t,
class JacobianOut_t>
158 void dDifference_product_impl(
const ConfigL_t & q0,
159 const ConfigR_t & q1,
160 const JacobianIn_t & Jin,
161 JacobianOut_t & Jout,
162 bool dDifferenceOnTheLeft,
165 template <
class ConfigIn_t,
class Velocity_t,
class ConfigOut_t>
166 void integrate_impl(
const Eigen::MatrixBase<ConfigIn_t> &
q,
167 const Eigen::MatrixBase<Velocity_t> &
v,
168 const Eigen::MatrixBase<ConfigOut_t> & qout)
const;
170 template <
class Config_t,
class Jacobian_t>
171 void integrateCoeffWiseJacobian_impl(
const Eigen::MatrixBase<Config_t> & q,
172 const Eigen::MatrixBase<Jacobian_t> & J)
const;
174 template <
class Config_t,
class Tangent_t,
class JacobianOut_t>
175 void dIntegrate_dq_impl(
const Eigen::MatrixBase<Config_t > & q,
176 const Eigen::MatrixBase<Tangent_t> & v,
177 const Eigen::MatrixBase<JacobianOut_t> & J,
180 template <
class Config_t,
class Tangent_t,
class JacobianOut_t>
181 void dIntegrate_dv_impl(
const Eigen::MatrixBase<Config_t > & q,
182 const Eigen::MatrixBase<Tangent_t> & v,
183 const Eigen::MatrixBase<JacobianOut_t> & J,
186 template <
class Config_t,
class Tangent_t,
class JacobianIn_t,
class JacobianOut_t>
187 void dIntegrate_product_impl(
const Config_t & q,
189 const JacobianIn_t & Jin,
190 JacobianOut_t & Jout,
191 bool dIntegrateOnTheLeft,
195 template <
class Config_t,
class Tangent_t,
class JacobianIn_t,
class JacobianOut_t>
196 void dIntegrateTransport_dq_impl(
const Eigen::MatrixBase<Config_t > & q,
197 const Eigen::MatrixBase<Tangent_t> & v,
198 const Eigen::MatrixBase<JacobianIn_t> & J_in,
199 const Eigen::MatrixBase<JacobianOut_t> & J_out)
const;
201 template <
class Config_t,
class Tangent_t,
class JacobianIn_t,
class JacobianOut_t>
202 void dIntegrateTransport_dv_impl(
const Eigen::MatrixBase<Config_t > & q,
203 const Eigen::MatrixBase<Tangent_t> & v,
204 const Eigen::MatrixBase<JacobianIn_t> & J_in,
205 const Eigen::MatrixBase<JacobianOut_t> & J_out)
const;
207 template <
class Config_t,
class Tangent_t,
class JacobianOut_t>
208 void dIntegrateTransport_dq_impl(
const Eigen::MatrixBase<Config_t > & q,
209 const Eigen::MatrixBase<Tangent_t> & v,
210 const Eigen::MatrixBase<JacobianOut_t> & J)
const;
212 template <
class Config_t,
class Tangent_t,
class JacobianOut_t>
213 void dIntegrateTransport_dv_impl(
const Eigen::MatrixBase<Config_t > & q,
214 const Eigen::MatrixBase<Tangent_t> & v,
215 const Eigen::MatrixBase<JacobianOut_t> & J)
const;
217 template <
class ConfigL_t,
class ConfigR_t>
218 Scalar squaredDistance_impl(
const Eigen::MatrixBase<ConfigL_t> & q0,
219 const Eigen::MatrixBase<ConfigR_t> & q1)
const;
221 template <
class Config_t>
222 void normalize_impl (
const Eigen::MatrixBase<Config_t>& qout)
const;
224 template <
class Config_t>
225 bool isNormalized_impl (
const Eigen::MatrixBase<Config_t>& qout,
226 const Scalar& prec)
const;
228 template <
class Config_t>
229 void random_impl (
const Eigen::MatrixBase<Config_t>& qout)
const;
231 template <
class ConfigL_t,
class ConfigR_t,
class ConfigOut_t>
232 void randomConfiguration_impl(
const Eigen::MatrixBase<ConfigL_t> & lower,
233 const Eigen::MatrixBase<ConfigR_t> & upper,
234 const Eigen::MatrixBase<ConfigOut_t> & qout)
const;
236 template <
class ConfigL_t,
class ConfigR_t>
237 bool isSameConfiguration_impl(
const Eigen::MatrixBase<ConfigL_t> & q0,
238 const Eigen::MatrixBase<ConfigR_t> & q1,
239 const Scalar & prec)
const;
243 template <
typename LieGroup1,
typename LieGroup2>
259 #include <pinocchio/multibody/liegroup/cartesian-product-variant.hxx> 261 #endif // ifndef __pinocchio_cartesian_product_variant_hpp__ JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > const Eigen::MatrixBase< TangentVectorType > & v
LieGroupCollection::LieGroupVariant LieGroupVariant
result_of::push_front< V const, T >::type append(T const &t, V const &v)
Append the element T at the front of boost fusion vector V.
Eigen::Matrix< Scalar, NQ, 1, Options > ConfigVector_t
typedef PINOCCHIO_ALIGNED_STD_VECTOR(JointData) JointDataVector
ArgumentPosition
Argument position. Used as template parameter to refer to an argument.
LieGroupGenericTpl< LieGroupCollection > LieGroupGeneric
#define PINOCCHIO_LIE_GROUP_TPL_PUBLIC_INTERFACE(Derived)
LieGroupCollectionTpl< Scalar, Options > LieGroupCollection
Dynamic Cartesian product composed of elementary Lie groups defined in LieGroupVariant.
CartesianProductOperationVariantTpl< double, 0, LieGroupCollectionDefaultTpl > CartesianProductOperationVariant
bool isEqual(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel_generic, const JointModelBase< JointModelDerived > &jmodel)
Visit a JointModelTpl<Scalar,...> to compare it to JointModelDerived.
traits< LieGroupDerived >::Scalar Scalar
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorType > & q
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorIn1 > const Eigen::MatrixBase< ConfigVectorIn2 > & q1
void append(const LieGroupBase< LieGroupDerived > &lg)
Append a Lie group to the Cartesian product.
CartesianProductOperationVariantTpl(const LieGroupGeneric &lg)
Constructor with one single Lie group.
Main pinocchio namespace.
JointCollectionTpl const Eigen::MatrixBase< ConfigVectorIn1 > & q0
Common traits structure to fully define base classes for CRTP.
std::vector< Index > lg_nvs
CartesianProductOperationVariantTpl(const LieGroupGeneric &lg1, const LieGroupGeneric &lg2)
Constructor with two Lie groups.
CartesianProductOperationVariantTpl()
Default constructor.
ConfigVector_t neutral() const
MultiplicationOp< InertiaTpl< Scalar, Options >, ConstraintDerived >::ReturnType operator*(const InertiaTpl< Scalar, Options > &Y, const ConstraintBase< ConstraintDerived > &constraint)
.