16 #include "pinocchio/macros.hpp"
17 #include "pinocchio/eigen-common.hpp"
18 #include "pinocchio/fwd.hpp"
19 #include "pinocchio/context.hpp"
21 #include "pinocchio/utils/check.hpp"
23 #include "pinocchio/math.hpp"
25 #include "pinocchio/multibody.hpp"
26 #include "pinocchio/multibody/liegroup.hpp"
33 template<
typename T,
typename =
void>
41 struct is_lie_group_map<T, std::void_t<typename T::template operation<void> *>> : std::true_type
46 inline constexpr
bool is_lie_group_map_v = is_lie_group_map<T>::value;
71 template<
typename,
int>
class JointCollectionTpl,
72 typename ConfigVectorType,
73 typename TangentVectorType,
75 std::enable_if_t<is_lie_group_map_v<LieGroup_t>,
int> = 0>
77 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
78 const Eigen::MatrixBase<ConfigVectorType> & q,
79 const Eigen::MatrixBase<TangentVectorType> & v,
80 const Eigen::MatrixBase<ReturnType> & qout);
101 template<
typename,
int>
class JointCollectionTpl,
102 typename ConfigVectorType,
103 typename TangentVectorType,
106 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
107 const Eigen::MatrixBase<ConfigVectorType> & q,
108 const Eigen::MatrixBase<TangentVectorType> & v,
109 const Eigen::MatrixBase<ReturnType> & qout)
112 LieGroupMap, Scalar, Options, JointCollectionTpl, ConfigVectorType, TangentVectorType,
113 ReturnType>(model, q.derived(), v.derived(), qout.derived());
132 template<
typename,
int>
class JointCollectionTpl,
133 typename ConfigVectorIn1,
134 typename ConfigVectorIn2,
136 std::enable_if_t<is_lie_group_map_v<LieGroup_t>,
int> = 0>
138 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
139 const Eigen::MatrixBase<ConfigVectorIn1> & q0,
140 const Eigen::MatrixBase<ConfigVectorIn2> & q1,
142 const Eigen::MatrixBase<ReturnType> & qout);
159 template<
typename,
int>
class JointCollectionTpl,
160 typename ConfigVectorIn1,
161 typename ConfigVectorIn2,
164 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
165 const Eigen::MatrixBase<ConfigVectorIn1> & q0,
166 const Eigen::MatrixBase<ConfigVectorIn2> & q1,
168 const Eigen::MatrixBase<ReturnType> & qout)
171 LieGroupMap, Scalar, Options, JointCollectionTpl, ConfigVectorIn1, ConfigVectorIn2,
173 model, q0.derived(), q1.derived(), u, PINOCCHIO_EIGEN_CONST_CAST(ReturnType, qout));
196 template<
typename,
int>
class JointCollectionTpl,
197 typename ConfigVectorIn1,
198 typename ConfigVectorIn2,
200 std::enable_if_t<is_lie_group_map_v<LieGroup_t>,
int> = 0>
202 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
203 const Eigen::MatrixBase<ConfigVectorIn1> & q0,
204 const Eigen::MatrixBase<ConfigVectorIn2> & q1,
205 const Eigen::MatrixBase<ReturnType> & dvout);
226 template<
typename,
int>
class JointCollectionTpl,
227 typename ConfigVectorIn1,
228 typename ConfigVectorIn2,
231 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
232 const Eigen::MatrixBase<ConfigVectorIn1> & q0,
233 const Eigen::MatrixBase<ConfigVectorIn2> & q1,
234 const Eigen::MatrixBase<ReturnType> & dvout)
237 LieGroupMap, Scalar, Options, JointCollectionTpl, ConfigVectorIn1, ConfigVectorIn2,
238 ReturnType>(model, q0.derived(), q1.derived(), PINOCCHIO_EIGEN_CONST_CAST(ReturnType, dvout));
257 template<
typename,
int>
class JointCollectionTpl,
258 typename ConfigVectorIn1,
259 typename ConfigVectorIn2,
261 std::enable_if_t<is_lie_group_map_v<LieGroup_t>,
int> = 0>
263 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
264 const Eigen::MatrixBase<ConfigVectorIn1> & q0,
265 const Eigen::MatrixBase<ConfigVectorIn2> & q1,
266 const Eigen::MatrixBase<ReturnType> & out);
283 template<
typename,
int>
class JointCollectionTpl,
284 typename ConfigVectorIn1,
285 typename ConfigVectorIn2,
288 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
289 const Eigen::MatrixBase<ConfigVectorIn1> & q0,
290 const Eigen::MatrixBase<ConfigVectorIn2> & q1,
291 const Eigen::MatrixBase<ReturnType> & out)
294 LieGroupMap, Scalar, Options, JointCollectionTpl, ConfigVectorIn1, ConfigVectorIn2,
295 ReturnType>(model, q0.derived(), q1.derived(), PINOCCHIO_EIGEN_CONST_CAST(ReturnType, out));
319 template<
typename,
int>
class JointCollectionTpl,
320 typename ConfigVectorIn1,
321 typename ConfigVectorIn2,
323 std::enable_if_t<is_lie_group_map_v<LieGroup_t>,
int> = 0>
325 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
326 const Eigen::MatrixBase<ConfigVectorIn1> & lowerLimits,
327 const Eigen::MatrixBase<ConfigVectorIn2> & upperLimits,
328 const Eigen::MatrixBase<ReturnType> & qout);
350 template<
typename,
int>
class JointCollectionTpl,
351 typename ConfigVectorIn1,
352 typename ConfigVectorIn2,
355 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
356 const Eigen::MatrixBase<ConfigVectorIn1> & lowerLimits,
357 const Eigen::MatrixBase<ConfigVectorIn2> & upperLimits,
358 const Eigen::MatrixBase<ReturnType> & qout)
361 LieGroupMap, Scalar, Options, JointCollectionTpl, ConfigVectorIn1, ConfigVectorIn2,
363 model, lowerLimits.derived(), upperLimits.derived(),
364 PINOCCHIO_EIGEN_CONST_CAST(ReturnType, qout));
381 template<
typename,
int>
class JointCollectionTpl,
383 std::enable_if_t<is_lie_group_map_v<LieGroup_t>,
int> = 0>
385 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
386 const Eigen::MatrixBase<ReturnType> & qout);
401 template<
typename,
int>
class JointCollectionTpl,
404 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
405 const Eigen::MatrixBase<ReturnType> & qout)
407 neutral<LieGroupMap, Scalar, Options, JointCollectionTpl, ReturnType>(
408 model, PINOCCHIO_EIGEN_CONST_CAST(ReturnType, qout));
440 template<
typename,
int>
class JointCollectionTpl,
441 typename ConfigVectorType,
442 typename TangentVectorType,
443 typename JacobianMatrixType,
444 std::enable_if_t<is_lie_group_map_v<LieGroup_t>,
int> = 0>
446 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
447 const Eigen::MatrixBase<ConfigVectorType> & q,
448 const Eigen::MatrixBase<TangentVectorType> & v,
449 const Eigen::MatrixBase<JacobianMatrixType> & J,
450 const ArgumentPosition arg,
451 const AssignmentOperatorType op = SETTO);
480 template<
typename,
int>
class JointCollectionTpl,
481 typename ConfigVectorType,
482 typename TangentVectorType,
483 typename JacobianMatrixType>
485 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
486 const Eigen::MatrixBase<ConfigVectorType> & q,
487 const Eigen::MatrixBase<TangentVectorType> & v,
488 const Eigen::MatrixBase<JacobianMatrixType> & J,
489 const ArgumentPosition arg)
492 LieGroupMap, Scalar, Options, JointCollectionTpl, ConfigVectorType, TangentVectorType,
494 model, q.derived(), v.derived(), PINOCCHIO_EIGEN_CONST_CAST(JacobianMatrixType, J), arg,
526 template<
typename,
int>
class JointCollectionTpl,
527 typename ConfigVectorType,
528 typename TangentVectorType,
529 typename JacobianMatrixType>
531 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
532 const Eigen::MatrixBase<ConfigVectorType> & q,
533 const Eigen::MatrixBase<TangentVectorType> & v,
534 const Eigen::MatrixBase<JacobianMatrixType> & J,
535 const ArgumentPosition arg,
536 const AssignmentOperatorType op)
539 LieGroupMap, Scalar, Options, JointCollectionTpl, ConfigVectorType, TangentVectorType,
541 model, q.derived(), v.derived(), PINOCCHIO_EIGEN_CONST_CAST(JacobianMatrixType, J), arg, op);
566 template<
typename,
int>
class JointCollectionTpl,
567 typename ConfigVectorType,
568 typename TangentMapMatrixType,
569 std::enable_if_t<is_lie_group_map_v<LieGroup_t>,
int> = 0>
571 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
572 const Eigen::MatrixBase<ConfigVectorType> & q,
573 const Eigen::MatrixBase<TangentMapMatrixType> & TM,
574 const AssignmentOperatorType op = SETTO);
597 template<
typename,
int>
class JointCollectionTpl,
598 typename ConfigVectorType,
599 typename TangentMapMatrixType>
601 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
602 const Eigen::MatrixBase<ConfigVectorType> & q,
603 const Eigen::MatrixBase<TangentMapMatrixType> & TM,
604 const AssignmentOperatorType op = SETTO)
607 LieGroupMap, Scalar, Options, JointCollectionTpl, ConfigVectorType, TangentMapMatrixType>(
608 model, q.derived(), TM.const_cast_derived(), op);
627 template<
typename,
int>
class JointCollectionTpl,
628 typename ConfigVectorType,
629 typename TangentMapMatrixType>
631 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
632 const std::vector<JointIndex> & joint_ids,
633 const Eigen::MatrixBase<ConfigVectorType> & q,
634 const Eigen::MatrixBase<TangentMapMatrixType> & TMc);
651 template<
typename,
int>
class JointCollectionTpl,
652 typename ConfigVectorType,
653 typename TangentMapMatrixType>
655 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
656 const std::vector<JointIndex> & joint_ids,
657 const Eigen::MatrixBase<ConfigVectorType> & q,
658 const Eigen::MatrixBase<TangentMapMatrixType> & TMc)
661 LieGroupMap, Scalar, Options, JointCollectionTpl, ConfigVectorType, TangentMapMatrixType>(
662 model, joint_ids, q.derived(), PINOCCHIO_EIGEN_CONST_CAST(TangentMapMatrixType, TMc));
683 template<
typename,
int>
class JointCollectionTpl,
684 typename ConfigVectorType,
685 typename MatrixInType,
686 typename MatrixOutType,
687 std::enable_if_t<is_lie_group_map_v<LieGroup_t>,
int> = 0>
689 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
690 const Eigen::MatrixBase<ConfigVectorType> & q,
691 const Eigen::MatrixBase<MatrixInType> & mat_in,
692 const Eigen::MatrixBase<MatrixOutType> & mat_out,
693 const AssignmentOperatorType op = SETTO);
712 template<
typename,
int>
class JointCollectionTpl,
713 typename ConfigVectorType,
714 typename MatrixInType,
715 typename MatrixOutType>
717 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
718 const Eigen::MatrixBase<ConfigVectorType> & q,
719 const Eigen::MatrixBase<MatrixInType> & mat_in,
720 const Eigen::MatrixBase<MatrixOutType> & mat_out,
721 const AssignmentOperatorType op = SETTO)
724 LieGroupMap, Scalar, Options, JointCollectionTpl, ConfigVectorType, MatrixInType,
726 model, q.derived(), mat_in.derived(), PINOCCHIO_EIGEN_CONST_CAST(MatrixOutType, mat_out), op);
747 template<
typename,
int>
class JointCollectionTpl,
748 typename ConfigVectorType,
749 typename MatrixInType,
750 typename MatrixOutType,
751 std::enable_if_t<is_lie_group_map_v<LieGroup_t>,
int> = 0>
753 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
754 const Eigen::MatrixBase<ConfigVectorType> & q,
755 const Eigen::MatrixBase<MatrixInType> & mat_in,
756 const Eigen::MatrixBase<MatrixOutType> & mat_out,
757 const AssignmentOperatorType op = SETTO);
776 template<
typename,
int>
class JointCollectionTpl,
777 typename ConfigVectorType,
778 typename MatrixInType,
779 typename MatrixOutType>
781 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
782 const Eigen::MatrixBase<ConfigVectorType> & q,
783 const Eigen::MatrixBase<MatrixInType> & mat_in,
784 const Eigen::MatrixBase<MatrixOutType> & mat_out,
785 const AssignmentOperatorType op = SETTO)
788 LieGroupMap, Scalar, Options, JointCollectionTpl, ConfigVectorType, MatrixInType,
790 model, q.derived(), mat_in.derived(), PINOCCHIO_EIGEN_CONST_CAST(MatrixOutType, mat_out), op);
822 template<
typename,
int>
class JointCollectionTpl,
823 typename ConfigVectorType,
824 typename TangentVectorType,
825 typename JacobianMatrixType1,
826 typename JacobianMatrixType2,
827 std::enable_if_t<is_lie_group_map_v<LieGroup_t>,
int> = 0>
829 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
830 const Eigen::MatrixBase<ConfigVectorType> & q,
831 const Eigen::MatrixBase<TangentVectorType> & v,
832 const Eigen::MatrixBase<JacobianMatrixType1> & Jin,
833 const Eigen::MatrixBase<JacobianMatrixType2> & Jout,
834 const ArgumentPosition arg);
864 template<
typename,
int>
class JointCollectionTpl,
865 typename ConfigVectorType,
866 typename TangentVectorType,
867 typename JacobianMatrixType1,
868 typename JacobianMatrixType2>
870 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
871 const Eigen::MatrixBase<ConfigVectorType> & q,
872 const Eigen::MatrixBase<TangentVectorType> & v,
873 const Eigen::MatrixBase<JacobianMatrixType1> & Jin,
874 const Eigen::MatrixBase<JacobianMatrixType2> & Jout,
875 const ArgumentPosition arg)
878 LieGroupMap, Scalar, Options, JointCollectionTpl, ConfigVectorType, TangentVectorType,
879 JacobianMatrixType1, JacobianMatrixType2>(
880 model, q.derived(), v.derived(), Jin.derived(),
881 PINOCCHIO_EIGEN_CONST_CAST(JacobianMatrixType2, Jout), arg);
912 template<
typename,
int>
class JointCollectionTpl,
913 typename ConfigVectorType,
914 typename TangentVectorType,
915 typename JacobianMatrixType,
916 std::enable_if_t<is_lie_group_map_v<LieGroup_t>,
int> = 0>
918 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
919 const Eigen::MatrixBase<ConfigVectorType> & q,
920 const Eigen::MatrixBase<TangentVectorType> & v,
921 const Eigen::MatrixBase<JacobianMatrixType> & J,
922 const ArgumentPosition arg);
951 template<
typename,
int>
class JointCollectionTpl,
952 typename ConfigVectorType,
953 typename TangentVectorType,
954 typename JacobianMatrixType>
956 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
957 const Eigen::MatrixBase<ConfigVectorType> & q,
958 const Eigen::MatrixBase<TangentVectorType> & v,
959 const Eigen::MatrixBase<JacobianMatrixType> & J,
960 const ArgumentPosition arg)
963 LieGroupMap, Scalar, Options, JointCollectionTpl, ConfigVectorType, TangentVectorType,
965 model, q.derived(), v.derived(), PINOCCHIO_EIGEN_CONST_CAST(JacobianMatrixType, J), arg);
995 template<
typename,
int>
class JointCollectionTpl,
996 typename ConfigVector1,
997 typename ConfigVector2,
998 typename JacobianMatrix,
999 std::enable_if_t<is_lie_group_map_v<LieGroup_t>,
int> = 0>
1001 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
1002 const Eigen::MatrixBase<ConfigVector1> & q0,
1003 const Eigen::MatrixBase<ConfigVector2> & q1,
1004 const Eigen::MatrixBase<JacobianMatrix> & J,
1005 const ArgumentPosition arg);
1033 template<
typename,
int>
class JointCollectionTpl,
1034 typename ConfigVector1,
1035 typename ConfigVector2,
1036 typename JacobianMatrix>
1038 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
1039 const Eigen::MatrixBase<ConfigVector1> & q0,
1040 const Eigen::MatrixBase<ConfigVector2> & q1,
1041 const Eigen::MatrixBase<JacobianMatrix> & J,
1042 const ArgumentPosition arg)
1045 LieGroupMap, Scalar, Options, JointCollectionTpl, ConfigVector1, ConfigVector2,
1047 model, q0.derived(), q1.derived(), PINOCCHIO_EIGEN_CONST_CAST(JacobianMatrix, J), arg);
1061 typename LieGroup_t,
1064 template<
typename,
int>
class JointCollectionTpl,
1065 typename ConfigVectorIn1,
1066 typename ConfigVectorIn2>
1068 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
1069 const Eigen::MatrixBase<ConfigVectorIn1> & q0,
1070 const Eigen::MatrixBase<ConfigVectorIn2> & q1);
1087 template<
typename,
int>
class JointCollectionTpl,
1088 typename ConfigVectorIn1,
1089 typename ConfigVectorIn2>
1091 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
1092 const Eigen::MatrixBase<ConfigVectorIn1> & q0,
1093 const Eigen::MatrixBase<ConfigVectorIn2> & q1)
1096 LieGroupMap, Scalar, Options, JointCollectionTpl, ConfigVectorIn1, ConfigVectorIn2>(
1097 model, q0.derived(), q1.derived());
1113 typename LieGroup_t,
1116 template<
typename,
int>
class JointCollectionTpl,
1117 typename ConfigVectorIn1,
1118 typename ConfigVectorIn2,
1119 std::enable_if_t<is_lie_group_map_v<LieGroup_t>,
int> = 0>
1121 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
1122 const Eigen::MatrixBase<ConfigVectorIn1> & q0,
1123 const Eigen::MatrixBase<ConfigVectorIn2> & q1);
1139 template<
typename,
int>
class JointCollectionTpl,
1140 typename ConfigVectorIn1,
1141 typename ConfigVectorIn2>
1143 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
1144 const Eigen::MatrixBase<ConfigVectorIn1> & q0,
1145 const Eigen::MatrixBase<ConfigVectorIn2> & q1)
1148 LieGroupMap, Scalar, Options, JointCollectionTpl, ConfigVectorIn1, ConfigVectorIn2>(
1149 model, q0.derived(), q1.derived());
1161 typename LieGroup_t,
1164 template<
typename,
int>
class JointCollectionTpl,
1165 typename ConfigVectorType,
1166 std::enable_if_t<is_lie_group_map_v<LieGroup_t>,
int> = 0>
1168 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
1169 const Eigen::MatrixBase<ConfigVectorType> & qout);
1182 template<
typename,
int>
class JointCollectionTpl,
1183 typename ConfigVectorType>
1185 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
1186 const Eigen::MatrixBase<ConfigVectorType> & qout)
1188 normalize<LieGroupMap, Scalar, Options, JointCollectionTpl, ConfigVectorType>(
1189 model, PINOCCHIO_EIGEN_CONST_CAST(ConfigVectorType, qout));
1204 typename LieGroup_t,
1207 template<
typename,
int>
class JointCollectionTpl,
1208 typename ConfigVectorType,
1209 std::enable_if_t<is_lie_group_map_v<LieGroup_t>,
int> = 0>
1211 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
1212 const Eigen::MatrixBase<ConfigVectorType> & q,
1213 const Scalar & prec = Eigen::NumTraits<Scalar>::dummy_precision());
1229 template<
typename,
int>
class JointCollectionTpl,
1230 typename ConfigVectorType>
1232 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
1233 const Eigen::MatrixBase<ConfigVectorType> & q,
1234 const Scalar & prec = Eigen::NumTraits<Scalar>::dummy_precision())
1236 return isNormalized<LieGroupMap, Scalar, Options, JointCollectionTpl, ConfigVectorType>(
1258 typename LieGroup_t,
1261 template<
typename,
int>
class JointCollectionTpl,
1262 typename ConfigVectorIn1,
1263 typename ConfigVectorIn2,
1264 std::enable_if_t<is_lie_group_map_v<LieGroup_t>,
int> = 0>
1266 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
1267 const Eigen::MatrixBase<ConfigVectorIn1> & q1,
1268 const Eigen::MatrixBase<ConfigVectorIn2> & q2,
1269 const Scalar & prec = Eigen::NumTraits<Scalar>::dummy_precision());
1290 template<
typename,
int>
class JointCollectionTpl,
1291 typename ConfigVectorIn1,
1292 typename ConfigVectorIn2>
1294 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
1295 const Eigen::MatrixBase<ConfigVectorIn1> & q1,
1296 const Eigen::MatrixBase<ConfigVectorIn2> & q2,
1297 const Scalar & prec = Eigen::NumTraits<Scalar>::dummy_precision())
1300 LieGroupMap, Scalar, Options, JointCollectionTpl, ConfigVectorIn1, ConfigVectorIn2>(
1301 model, q1.derived(), q2.derived(), prec);
1318 typename LieGroup_t,
1321 template<
typename,
int>
class JointCollectionTpl,
1322 typename ConfigVector,
1323 typename JacobianMatrix>
1325 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
1326 const Eigen::MatrixBase<ConfigVector> & q,
1327 const Eigen::MatrixBase<JacobianMatrix> & jacobian);
1345 template<
typename,
int>
class JointCollectionTpl,
1346 typename ConfigVector,
1347 typename JacobianMatrix>
1349 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
1350 const Eigen::MatrixBase<ConfigVector> & q,
1351 const Eigen::MatrixBase<JacobianMatrix> & jacobian)
1354 LieGroupMap, Scalar, Options, JointCollectionTpl, ConfigVector, JacobianMatrix>(
1355 model, q.derived(), PINOCCHIO_EIGEN_CONST_CAST(JacobianMatrix, jacobian));
1368 typename LieGroup_t,
1371 template<
typename,
int>
class JointCollectionTpl>
1373 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
1374 typename LieGroup_t::template operationProduct<Scalar, Options>::type & lgo);
1385 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
1387 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
1388 typename LieGroupMap::template operationProduct<Scalar, Options>::type & lgo)
1390 lieGroup<LieGroupMap, Scalar, Options, JointCollectionTpl>(model, lgo);
1407 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
1409 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
1410 const std::vector<JointIndex> & joint_ids,
1411 std::vector<int> & nvs,
1412 std::vector<int> & idx_vs);
1433 typename LieGroup_t,
1436 template<
typename,
int>
class JointCollectionTpl,
1437 typename ConfigVectorType,
1438 typename TangentVectorType,
1439 std::enable_if_t<is_lie_group_map_v<LieGroup_t>,
int> = 0>
1440 typename PINOCCHIO_EIGEN_PLAIN_TYPE(ConfigVectorType)
integrate(
1441 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
1442 const Eigen::MatrixBase<ConfigVectorType> & q,
1443 const Eigen::MatrixBase<TangentVectorType> & v);
1461 template<
typename,
int>
class JointCollectionTpl,
1462 typename ConfigVectorType,
1463 typename TangentVectorType>
1464 typename PINOCCHIO_EIGEN_PLAIN_TYPE(ConfigVectorType)
integrate(
1465 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
1466 const Eigen::MatrixBase<ConfigVectorType> & q,
1467 const Eigen::MatrixBase<TangentVectorType> & v)
1470 LieGroupMap, Scalar, Options, JointCollectionTpl, ConfigVectorType, TangentVectorType>(
1471 model, q.derived(), v.derived());
1488 typename LieGroup_t,
1491 template<
typename,
int>
class JointCollectionTpl,
1492 typename ConfigVectorIn1,
1493 typename ConfigVectorIn2,
1494 std::enable_if_t<is_lie_group_map_v<LieGroup_t>,
int> = 0>
1495 typename PINOCCHIO_EIGEN_PLAIN_TYPE(ConfigVectorIn1)
interpolate(
1496 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
1497 const Eigen::MatrixBase<ConfigVectorIn1> & q0,
1498 const Eigen::MatrixBase<ConfigVectorIn2> & q1,
1517 template<
typename,
int>
class JointCollectionTpl,
1518 typename ConfigVectorIn1,
1519 typename ConfigVectorIn2>
1521 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
1522 const Eigen::MatrixBase<ConfigVectorIn1> & q0,
1523 const Eigen::MatrixBase<ConfigVectorIn2> & q1,
1527 LieGroupMap, Scalar, Options, JointCollectionTpl, ConfigVectorIn1, ConfigVectorIn2>(
1528 model, q0.derived(), q1.derived(), u);
1544 typename LieGroup_t,
1547 template<
typename,
int>
class JointCollectionTpl,
1548 typename ConfigVectorIn1,
1549 typename ConfigVectorIn2,
1550 std::enable_if_t<is_lie_group_map_v<LieGroup_t>,
int> = 0>
1551 typename PINOCCHIO_EIGEN_PLAIN_TYPE(ConfigVectorIn1)
difference(
1552 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
1553 const Eigen::MatrixBase<ConfigVectorIn1> & q0,
1554 const Eigen::MatrixBase<ConfigVectorIn2> & q1);
1571 template<
typename,
int>
class JointCollectionTpl,
1572 typename ConfigVectorIn1,
1573 typename ConfigVectorIn2>
1575 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
1576 const Eigen::MatrixBase<ConfigVectorIn1> & q0,
1577 const Eigen::MatrixBase<ConfigVectorIn2> & q1)
1580 LieGroupMap, Scalar, Options, JointCollectionTpl, ConfigVectorIn1, ConfigVectorIn2>(
1581 model, q0.derived(), q1.derived());
1598 typename LieGroup_t,
1601 template<
typename,
int>
class JointCollectionTpl,
1602 typename ConfigVectorIn1,
1603 typename ConfigVectorIn2,
1604 std::enable_if_t<is_lie_group_map_v<LieGroup_t>,
int> = 0>
1606 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
1607 const Eigen::MatrixBase<ConfigVectorIn1> & q0,
1608 const Eigen::MatrixBase<ConfigVectorIn2> & q1);
1626 template<
typename,
int>
class JointCollectionTpl,
1627 typename ConfigVectorIn1,
1628 typename ConfigVectorIn2>
1630 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
1631 const Eigen::MatrixBase<ConfigVectorIn1> & q0,
1632 const Eigen::MatrixBase<ConfigVectorIn2> & q1)
1635 LieGroupMap, Scalar, Options, JointCollectionTpl, ConfigVectorIn1, ConfigVectorIn2>(
1636 model, q0.derived(), q1.derived());
1658 typename LieGroup_t,
1661 template<
typename,
int>
class JointCollectionTpl,
1662 typename ConfigVectorIn1,
1663 typename ConfigVectorIn2,
1664 std::enable_if_t<is_lie_group_map_v<LieGroup_t>,
int> = 0>
1666 (
typename ModelTpl<Scalar, Options, JointCollectionTpl>::ConfigVectorType))
1668 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
1669 const Eigen::MatrixBase<ConfigVectorIn1> & lowerLimits,
1670 const Eigen::MatrixBase<ConfigVectorIn2> & upperLimits);
1693 template<
typename,
int>
class JointCollectionTpl,
1694 typename ConfigVectorIn1,
1695 typename ConfigVectorIn2>
1697 (
typename ModelTpl<Scalar, Options, JointCollectionTpl>::ConfigVectorType))
1699 const ModelTpl<Scalar, Options, JointCollectionTpl> & model,
1700 const Eigen::MatrixBase<ConfigVectorIn1> & lowerLimits,
1701 const Eigen::MatrixBase<ConfigVectorIn2> & upperLimits)
1704 LieGroupMap, Scalar, Options, JointCollectionTpl, ConfigVectorIn1, ConfigVectorIn2>(
1705 model, lowerLimits.derived(), upperLimits.derived());
1727 typename LieGroup_t,
1730 template<
typename,
int>
class JointCollectionTpl,
1731 std::enable_if_t<is_lie_group_map_v<LieGroup_t>,
int> = 0>
1733 (
typename ModelTpl<Scalar, Options, JointCollectionTpl>::ConfigVectorType))
1754 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
1756 (
typename ModelTpl<Scalar, Options, JointCollectionTpl>::ConfigVectorType))
1759 return randomConfiguration<LieGroupMap, Scalar, Options, JointCollectionTpl>(model);
1773 typename LieGroup_t,
1776 template<
typename,
int>
class JointCollectionTpl,
1777 std::enable_if_t<is_lie_group_map_v<LieGroup_t>,
int> = 0>
1778 Eigen::Matrix<Scalar, Eigen::Dynamic, 1, Options>
1779 neutral(
const ModelTpl<Scalar, Options, JointCollectionTpl> & model);
1789 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
1790 Eigen::Matrix<Scalar, Eigen::Dynamic, 1, Options>
1791 neutral(
const ModelTpl<Scalar, Options, JointCollectionTpl> & model)
1793 return neutral<LieGroupMap, Scalar, Options, JointCollectionTpl>(model);
1806 typename LieGroup_t,
1809 template<
typename,
int>
class JointCollectionTpl>
1810 typename LieGroup_t::template operationProduct<Scalar, Options>::type
1811 lieGroup(
const ModelTpl<Scalar, Options, JointCollectionTpl> & model);
1822 template<
typename Scalar,
int Options,
template<
typename,
int>
class JointCollectionTpl>
1823 typename LieGroupMap::template operationProduct<Scalar, Options>::type
1824 lieGroup(
const ModelTpl<Scalar, Options, JointCollectionTpl> & model)
1826 return lieGroup<LieGroupMap, Scalar, Options, JointCollectionTpl>(model);
1834 #include "pinocchio/src/algorithm/joint-configuration.hxx"
Main pinocchio namespace.
void tangentMapProduct(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< MatrixInType > &mat_in, const Eigen::MatrixBase< MatrixOutType > &mat_out, const AssignmentOperatorType op=SETTO)
Compose the tangentMap with a matrix, e.g., a Lie group Jacobian in order to recover a vector space J...
void squaredDistance(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorIn1 > &q0, const Eigen::MatrixBase< ConfigVectorIn2 > &q1, const Eigen::MatrixBase< ReturnType > &out)
Squared distance between two configuration vectors.
bool isNormalized(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorType > &q, const Scalar &prec=Eigen::NumTraits< Scalar >::dummy_precision())
Check whether a configuration vector is normalized within the given precision provided by prec.
void dIntegrateTransport(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< TangentVectorType > &v, const Eigen::MatrixBase< JacobianMatrixType1 > &Jin, const Eigen::MatrixBase< JacobianMatrixType2 > &Jout, const ArgumentPosition arg)
Transport a matrix from the terminal to the initial tangent space of the integrate operation,...
void compactTangentMap(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const std::vector< JointIndex > &joint_ids, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< TangentMapMatrixType > &TMc)
Set the tangentMap in a compact manner in matric of size nq x MAX_JOINT_NV.
bool isSameConfiguration(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorIn1 > &q1, const Eigen::MatrixBase< ConfigVectorIn2 > &q2, const Scalar &prec=Eigen::NumTraits< Scalar >::dummy_precision())
Return true if the given configurations are equivalents, within the given precision.
void lieGroup(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, typename LieGroup_t::template operationProduct< Scalar, Options >::type &lgo)
Returns the Lie group associated to the model. It is the cartesian product of the lie groups of all i...
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.
void tangentMap(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< TangentMapMatrixType > &TM, const AssignmentOperatorType op=SETTO)
Computes the tangentMap that map a small variation of the configuration express in the Lie algebra (a...
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.
PINOCCHIO_EIGEN_PLAIN_TYPE_NO_PARENS((typename ModelTpl< Scalar, Options, JointCollectionTpl >::ConfigVectorType)) randomConfiguration(const ModelTpl< Scalar
Generate a configuration vector uniformly sampled among given limits.
Scalar squaredDistanceSum(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorIn1 > &q0, const Eigen::MatrixBase< ConfigVectorIn2 > &q1)
Overall squared distance between two configuration vectors.
void dDifference(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVector1 > &q0, const Eigen::MatrixBase< ConfigVector2 > &q1, const Eigen::MatrixBase< JacobianMatrix > &J, const ArgumentPosition arg)
Computes the Jacobian of a small variation of the configuration vector into the tangent space at iden...
void integrateCoeffWiseJacobian(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVector > &q, const Eigen::MatrixBase< JacobianMatrix > &jacobian)
Return the Jacobian of the integrate function for the components of the config vector.
void neutral(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ReturnType > &qout)
Return the neutral configuration element related to the model configuration space.
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.
Scalar distance(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorIn1 > &q0, const Eigen::MatrixBase< ConfigVectorIn2 > &q1)
Distance between two configuration vectors, namely .
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...
void getTangentToConfigurationSparsitySegment(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const std::vector< JointIndex > &joint_ids, std::vector< int > &nvs, std::vector< int > &idx_vs)
Return two vector where for each, the idx_v and v associated to the same atomic joint is given.
void normalize(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorType > &qout)
Normalize a configuration vector.
void tangentMapTransposeProduct(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorType > &q, const Eigen::MatrixBase< MatrixInType > &mat_in, const Eigen::MatrixBase< MatrixOutType > &mat_out, const AssignmentOperatorType op=SETTO)
Compose the tangentMap with a matrix, e.g., a Lie group Jacobian in order to recover a vector space J...
void randomConfiguration(const ModelTpl< Scalar, Options, JointCollectionTpl > &model, const Eigen::MatrixBase< ConfigVectorIn1 > &lowerLimits, const Eigen::MatrixBase< ConfigVectorIn2 > &upperLimits, const Eigen::MatrixBase< ReturnType > &qout)
Generate a configuration vector uniformly sampled among provided limits.
Helpers to use SFINAE for safe candidate selection compare to liegroup-variant-visitors....