pinocchio  3.7.0
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
 
Loading...
Searching...
No Matches
joint-basic-visitors.hpp
1//
2// Copyright (c) 2016-2020 CNRS INRIA
3//
4
5#ifndef __pinocchio_multibody_joint_basic_visitors_hpp__
6#define __pinocchio_multibody_joint_basic_visitors_hpp__
7
8#include "pinocchio/multibody/joint/fwd.hpp"
9
10namespace pinocchio
11{
12
22 template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
23 inline JointDataTpl<Scalar, Options, JointCollectionTpl>
25
38 template<
39 typename Scalar,
40 int Options,
41 template<typename S, int O> class JointCollectionTpl,
42 typename ConfigVectorType>
43 inline void calc_zero_order(
46 const Eigen::MatrixBase<ConfigVectorType> & q);
47
62 template<
63 typename Scalar,
64 int Options,
65 template<typename S, int O> class JointCollectionTpl,
66 typename ConfigVectorType,
67 typename TangentVectorType>
68 inline void calc_first_order(
71 const Eigen::MatrixBase<ConfigVectorType> & q,
72 const Eigen::MatrixBase<TangentVectorType> & v);
73
86 template<
87 typename Scalar,
88 int Options,
89 template<typename S, int O> class JointCollectionTpl,
90 typename TangentVectorType>
91 inline void calc_first_order(
94 const Blank blank,
95 const Eigen::MatrixBase<TangentVectorType> & v);
96
112 template<
113 typename Scalar,
114 int Options,
115 template<typename S, int O> class JointCollectionTpl,
116 typename VectorLike,
117 typename Matrix6Type>
118 inline void calc_aba(
121 const Eigen::MatrixBase<VectorLike> & armature,
122 const Eigen::MatrixBase<Matrix6Type> & I,
123 const bool update_I);
124
133 template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
135
144 template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
146
155 template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
157
166 template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
167 inline const std::vector<bool>
169
178 template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
179 inline const std::vector<bool>
181
191 template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
193
203 template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
205
215 template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
217
226 template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
228
244 template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
245 inline void setIndexes(
247 JointIndex id,
248 int q,
249 int v,
250 int vExtended);
251
265 template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
266 inline void setIndexes(
267 JointModelTpl<Scalar, Options, JointCollectionTpl> & jmodel, JointIndex id, int q, int v);
268
275 template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
277
287 template<
288 typename NewScalar,
289 typename Scalar,
290 int Options,
291 template<typename S, int O> class JointCollectionTpl>
294
303 template<
304 typename Scalar,
305 int Options,
306 template<typename S, int O> class JointCollectionTpl,
307 typename JointModelDerived>
308 bool isEqual(
310 const JointModelBase<JointModelDerived> & jmodel);
311
321 template<
322 typename NewScalar,
323 typename Scalar,
324 int Options,
325 template<typename S, int O> class JointCollectionTpl,
326 typename JointModelDerived>
329 const JointModelBase<JointModelDerived> & jmodel);
330
331 //
332 // Visitors on JointDatas
333 //
334
343 template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
346
355 template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
358
367 template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
370
379 template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
382
391 template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
394
403 template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
406
415 template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
416 inline Eigen::Matrix<Scalar, 6, Eigen::Dynamic, Options>
418
427 template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
428 inline Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic, Options>
430
439 template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
440 inline Eigen::Matrix<Scalar, 6, Eigen::Dynamic, Options>
442
451 template<typename Scalar, int Options, template<typename S, int O> class JointCollectionTpl>
452 inline Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic, Options>
454
463 template<
464 typename Scalar,
465 int Options,
466 template<typename S, int O> class JointCollectionTpl,
467 typename JointDataDerived>
468 bool isEqual(
470 const JointDataBase<JointDataDerived> & jmodel);
471
487 template<
488 typename Scalar,
489 int Options,
490 template<typename S, int O> class JointCollectionTpl,
491 typename ConfigVectorIn,
492 typename ConfigVectorOut>
495 const Eigen::MatrixBase<ConfigVectorIn> & qIn,
496 const Scalar & scaling,
497 const Scalar & offset,
498 const Eigen::MatrixBase<ConfigVectorOut> & qOut);
499
512 template<
513 int Op,
514 typename Scalar,
515 int Options,
516 template<typename S, int O> class JointCollectionTpl,
517 typename ForceType,
518 typename ExpressionType>
519 void applyConstraintOnForceVisitor(
521
522} // namespace pinocchio
523
524/* --- Details -------------------------------------------------------------------- */
525// Included later
526// #include "pinocchio/multibody/joint/joint-basic-visitors.hxx"
527
528#endif // ifndef __pinocchio_multibody_joint_basic_visitors_hpp__
Main pinocchio namespace.
Definition treeview.dox:11
int nv(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointNvVisitor to get the dimension of the joint tangent space.
std::string shortname(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointShortnameVisitor to get the shortname of the derived joint model.
SE3Tpl< Scalar, Options > joint_transform(const JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata)
Visit a JointDataTpl through JointTransformVisitor to get the joint internal transform (transform bet...
MotionTpl< Scalar, Options > bias(const JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata)
Visit a JointDataTpl through JointBiasVisitor to get the joint bias as a dense motion.
int nq(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointNqVisitor to get the dimension of the joint configuration space.
JointMotionSubspaceTpl< Eigen::Dynamic, Scalar, Options > joint_motin_subspace_xd(const JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata)
Visit a JointDataVariant through JointConstraintVisitor to get the joint constraint as a dense constr...
JointDataTpl< Scalar, Options, JointCollectionTpl >::TangentVector_t joint_v(const JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata)
Visit a JointDataVariant through JointConfigVisitor to get the joint velocity vector.
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic, Options > dinv_inertia(const JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata)
Visit a JointDataTpl through JointDInvInertiaVisitor to get the D^{-1} matrix of the inertia matrix d...
MotionTpl< Scalar, Options > motion(const JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata)
Visit a JointDataTpl through JointMotionVisitor to get the joint internal motion as a dense motion.
void calc_zero_order(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel, JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata, const Eigen::MatrixBase< ConfigVectorType > &q)
Visit a JointModelTpl and the corresponding JointDataTpl through JointCalcZeroOrderVisitor to compute...
CastType< NewScalar, JointModelTpl< Scalar, Options, JointCollectionTpl > >::type cast_joint(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl<Scalar,...> to cast it into JointModelTpl<NewScalar,...>
const std::vector< bool > hasConfigurationLimitInTangent(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointConfigurationLimitInTangentVisitor to get the configurations limit...
void calc_aba(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel, JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata, const Eigen::MatrixBase< VectorLike > &armature, const Eigen::MatrixBase< Matrix6Type > &I, const bool update_I)
Visit a JointModelTpl and the corresponding JointDataTpl through JointCalcAbaVisitor to.
bool hasSameIndexes(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel_generic, const JointModelBase< JointModelDerived > &jmodel)
Check whether JointModelTpl<Scalar,...> has the indexes than another JointModelDerived.
void setIndexes(JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel, JointIndex id, int q, int v, int vExtended)
Visit a JointModelTpl through JointSetIndexesVisitor to set the indexes of the joint in the kinematic...
const std::vector< bool > hasConfigurationLimit(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointConfigurationLimitVisitor to get the configurations limits.
int idx_v(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointIdxVVisitor to get the index in the model tangent space correspond...
Eigen::Matrix< Scalar, 6, Eigen::Dynamic, Options > udinv_inertia(const JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata)
Visit a JointDataTpl through JointUDInvInertiaVisitor to get U*D^{-1} matrix of the inertia matrix de...
JointDataTpl< Scalar, Options, JointCollectionTpl >::ConfigVector_t joint_q(const JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata)
Visit a JointDataVariant through JointConfigVisitor to get the joint configuration vector.
int idx_q(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointIdxQVisitor to get the index in the full model configuration space...
JointIndex id(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointIdVisitor to get the index of the joint in the kinematic chain.
Eigen::Matrix< Scalar, 6, Eigen::Dynamic, Options > u_inertia(const JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata)
Visit a JointDataTpl through JointUInertiaVisitor to get the U matrix of the inertia matrix decomposi...
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic, Options > stu_inertia(const JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata)
Visit a JointDataTpl through JointStUInertiaVisitor to get St*I*S matrix of the inertia matrix decomp...
void configVectorAffineTransform(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel, const Eigen::MatrixBase< ConfigVectorIn > &qIn, const Scalar &scaling, const Scalar &offset, const Eigen::MatrixBase< ConfigVectorOut > &qOut)
Apply the correct affine transform, on a joint configuration, depending on the joint type.
void calc_first_order(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel, JointDataTpl< Scalar, Options, JointCollectionTpl > &jdata, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< TangentVectorType > &v)
Visit a JointModelTpl and the corresponding JointDataTpl through JointCalcFirstOrderVisitor to comput...
int nvExtended(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointNvExtendVisitor to get the dimension of the joint extended tangent...
int idx_vExtended(const JointModelTpl< Scalar, Options, JointCollectionTpl > &jmodel)
Visit a JointModelTpl through JointIdvExtendedVisitor to get the index in the model extended tangent ...
Blank type.
Definition fwd.hpp:77