8 #error You specified 23 links but the maximum supported is 22. 12 #error You specified 23 end-effectors but the maximum supported is 22. 16 #error Please specify the NS of the robot in RobCoGen (ROBCOGEN_NS) 20 #error Please specify a target NS (TARGET_NS) 24 #error Please specify base name (CT_BASE) 28 #error Please specify the number of endeffectors (CT_N_EE) 31 #define CT_RBD_TRANSFORM_BASE_TO_ID(BASE, LINK_ID) transforms.BASE##_X_##LINK_ID 33 #define CT_RBD_JACOBIAN_BASE_TO_ID(BASE, EE_ID) jacobians.BASE##_J_##EE_ID 35 #define CT_RBD_JACOBIAN_GET_BLOCK(FIRST, LAST) jacobian.template block<6, LAST - FIRST + 1>(0, FIRST) 38 #define CT_RBD_CASE_HELPER_BASE_ID(BASE, LINK_ID, INDEX) \ 40 return CT_RBD_TRANSFORM_BASE_TO_ID(BASE, LINK_ID); \ 44 #define CT_RBD_CASE_HELPER_JAC_UPDATE(BASE, LINK_ID) CT_RBD_JACOBIAN_BASE_TO_ID(BASE, LINK_ID).update(q); 47 #define CT_RBD_CASE_HELPER_JOINT_BEGIN_BASE_ID(BASE, LINK_ID, INDEX) \ 49 return CT_RBD_TRANSFORM_BASE_TO_ID(BASE, LINK_ID).update( 51 #define CT_RBD_TRANSFORM_ID_TO_BASE(BASE, LINK_ID) transforms.LINK_ID##_X_##BASE 54 #define CT_RBD_CASE_HELPER_ID_BASE(BASE, LINK_ID, INDEX) \ 56 return CT_RBD_TRANSFORM_ID_TO_BASE(BASE, LINK_ID); \ 60 #define CT_RBD_CASE_HELPER_JOINT_BEGIN_ID_BASE(BASE, LINK_ID, INDEX) \ 62 return CT_RBD_TRANSFORM_ID_TO_BASE(BASE, LINK_ID).update( 64 #define CT_RBD_CASE_HELPER_JOINT_END \ 73 template <
typename SCALAR>
77 static const int NJOINTS = iit::ROBCOGEN_NS::tpl::Traits<SCALAR>::joints_count;
83 template <
class TRANS>
86 const Eigen::Matrix<SCALAR, NJOINTS, 1>& q)
92 typename TRANS::MatrixType identity;
94 identity.template topRightCorner<3, 3>().setIdentity();
210 <<
"getTransformByLinkID: requested joint does not exist, requested: " 213 throw std::runtime_error(
"getTransformByLinkID: requested joint does not exist");
220 template <
class TRANS>
223 const Eigen::Matrix<SCALAR, NJOINTS, 1>& q)
229 typename TRANS::MatrixType identity;
231 identity.template topRightCorner<3, 3>().setIdentity();
347 <<
"getTransformByLinkID: requested joint does not exist, requested: " 350 throw std::runtime_error(
"getTransformByLinkID: requested joint does not exist");
357 template <
class TRANS>
360 const Eigen::Matrix<SCALAR, NJOINTS, 1>& q)
465 <<
"getTransformByEEID: requested end-effector does not exist, requested: " 468 throw std::runtime_error(
"getTransformByEEID: requested end-effector does not exist");
499 return CT_EE4_IS_ON_LINK;
504 return CT_EE5_IS_ON_LINK;
509 return CT_EE6_IS_ON_LINK;
514 return CT_EE7_IS_ON_LINK;
519 return CT_EE8_IS_ON_LINK;
524 return CT_EE9_IS_ON_LINK;
529 return CT_EE10_IS_ON_LINK;
534 return CT_EE11_IS_ON_LINK;
539 return CT_EE12_IS_ON_LINK;
544 return CT_EE13_IS_ON_LINK;
549 return CT_EE14_IS_ON_LINK;
554 return CT_EE15_IS_ON_LINK;
559 return CT_EE16_IS_ON_LINK;
564 return CT_EE17_IS_ON_LINK;
569 return CT_EE18_IS_ON_LINK;
574 return CT_EE19_IS_ON_LINK;
579 return CT_EE20_IS_ON_LINK;
584 return CT_EE21_IS_ON_LINK;
589 return CT_EE22_IS_ON_LINK;
594 std::cout <<
"eeIdToLinkId: requested end-effector does not exist, requested: " << ee_id << std::endl;
595 throw std::runtime_error(
"getTransformByEEID: requested end-effector does not exist");
602 template <
class JACS>
605 const Eigen::Matrix<SCALAR, NJOINTS, 1>& q)
607 Eigen::Matrix<SCALAR, 6, NJOINTS> jacobian(Eigen::Matrix<SCALAR, 6, NJOINTS>::Zero());
751 std::cout <<
"getJacobianBaseByEEID: requested end-effector does not exist, requested: " << ee_id
753 throw std::runtime_error(
"getJacobianBaseByEEID: requested end-effector does not exist");
765 template <
typename SCALAR>
769 template <
typename SCALAR>
772 template <
typename SCALAR>
846 #undef CT_EE0_IS_ON_LINK 847 #undef CT_EE1_IS_ON_LINK 848 #undef CT_EE2_IS_ON_LINK 849 #undef CT_EE3_IS_ON_LINK 850 #undef CT_EE4_IS_ON_LINK 851 #undef CT_EE5_IS_ON_LINK 852 #undef CT_EE6_IS_ON_LINK 853 #undef CT_EE7_IS_ON_LINK 854 #undef CT_EE8_IS_ON_LINK 855 #undef CT_EE9_IS_ON_LINK 856 #undef CT_EE10_IS_ON_LINK 857 #undef CT_EE11_IS_ON_LINK 858 #undef CT_EE12_IS_ON_LINK 859 #undef CT_EE13_IS_ON_LINK 860 #undef CT_EE14_IS_ON_LINK 861 #undef CT_EE15_IS_ON_LINK 862 #undef CT_EE16_IS_ON_LINK 863 #undef CT_EE17_IS_ON_LINK 864 #undef CT_EE18_IS_ON_LINK 865 #undef CT_EE19_IS_ON_LINK 866 #undef CT_EE20_IS_ON_LINK 867 #undef CT_EE21_IS_ON_LINK 868 #undef CT_EE22_IS_ON_LINK 870 #undef CT_EE0_FIRST_JOINT 871 #undef CT_EE1_FIRST_JOINT 872 #undef CT_EE2_FIRST_JOINT 873 #undef CT_EE3_FIRST_JOINT 874 #undef CT_EE4_FIRST_JOINT 875 #undef CT_EE5_FIRST_JOINT 876 #undef CT_EE6_FIRST_JOINT 877 #undef CT_EE7_FIRST_JOINT 878 #undef CT_EE8_FIRST_JOINT 879 #undef CT_EE9_FIRST_JOINT 880 #undef CT_EE10_FIRST_JOINT 881 #undef CT_EE11_FIRST_JOINT 882 #undef CT_EE12_FIRST_JOINT 883 #undef CT_EE13_FIRST_JOINT 884 #undef CT_EE14_FIRST_JOINT 885 #undef CT_EE15_FIRST_JOINT 886 #undef CT_EE16_FIRST_JOINT 887 #undef CT_EE17_FIRST_JOINT 888 #undef CT_EE18_FIRST_JOINT 889 #undef CT_EE19_FIRST_JOINT 890 #undef CT_EE20_FIRST_JOINT 891 #undef CT_EE21_FIRST_JOINT 892 #undef CT_EE22_FIRST_JOINT 895 #undef CT_EE0_LAST_JOINT 896 #undef CT_EE1_LAST_JOINT 897 #undef CT_EE2_LAST_JOINT 898 #undef CT_EE3_LAST_JOINT 899 #undef CT_EE4_LAST_JOINT 900 #undef CT_EE5_LAST_JOINT 901 #undef CT_EE6_LAST_JOINT 902 #undef CT_EE7_LAST_JOINT 903 #undef CT_EE8_LAST_JOINT 904 #undef CT_EE9_LAST_JOINT 905 #undef CT_EE10_LAST_JOINT 906 #undef CT_EE11_LAST_JOINT 907 #undef CT_EE12_LAST_JOINT 908 #undef CT_EE13_LAST_JOINT 909 #undef CT_EE14_LAST_JOINT 910 #undef CT_EE15_LAST_JOINT 911 #undef CT_EE16_LAST_JOINT 912 #undef CT_EE17_LAST_JOINT 913 #undef CT_EE18_LAST_JOINT 914 #undef CT_EE19_LAST_JOINT 915 #undef CT_EE20_LAST_JOINT 916 #undef CT_EE21_LAST_JOINT 917 #undef CT_EE22_LAST_JOINT 920 #undef CT_RBD_TRANSFORM_BASE_TO_ID 921 #undef CT_RBD_JACOBIAN_BASE_TO_ID 922 #undef CT_RBD_JACOBIAN_GET_BLOCK 923 #undef CT_RBD_CASE_HELPER_BASE_ID 924 #undef CT_RBD_CASE_HELPER_JAC_UPDATE 925 #undef CT_RBD_CASE_HELPER_JOINT_BEGIN_BASE_ID 926 #undef CT_RBD_TRANSFORM_ID_TO_BASE 927 #undef CT_RBD_CASE_HELPER_ID_BASE 928 #undef CT_RBD_CASE_HELPER_JOINT_BEGIN_ID_BASE 929 #undef CT_RBD_CASE_HELPER_JOINT_END #define CT_EE3
Definition: RobCoGenTestHyQ.h:64
#define CT_EE0_IS_ON_LINK
Definition: RobCoGenTestHyQ.h:49
#define CT_BASE
Definition: RobCoGenTestHyQ.h:30
#define CT_EE2_FIRST_JOINT
Definition: RobCoGenTestHyQ.h:61
#define CT_EE1_IS_ON_LINK
Definition: RobCoGenTestHyQ.h:55
#define CT_EE3_LAST_JOINT
Definition: RobCoGenTestHyQ.h:67
#define CT_L7
Definition: RobCoGenTestHyQ.h:38
static Eigen::Matrix< SCALAR, 6, NJOINTS > getJacobianBaseEEbyId(JACS &jacobians, size_t ee_id, const Eigen::Matrix< SCALAR, NJOINTS, 1 > &q)
Definition: robcogenHelpers.h:603
#define CT_RBD_CASE_HELPER_JOINT_BEGIN_ID_BASE(BASE, LINK_ID, INDEX)
Definition: robcogenHelpers.h:60
static size_t eeIdToLinkId(size_t ee_id)
Definition: robcogenHelpers.h:473
static const int N_EE
Definition: robcogenHelpers.h:80
This class implements the equations of motion of a Rigid Body System.
Definition: Dynamics.h:43
#define CT_RBD_CASE_HELPER_JAC_UPDATE(BASE, LINK_ID)
Definition: robcogenHelpers.h:44
#define CT_L6
Definition: RobCoGenTestHyQ.h:37
#define CT_L10
Definition: RobCoGenTestHyQ.h:41
static TRANS::MatrixType getTransformLinkBaseById(TRANS &transforms, size_t link_id, const Eigen::Matrix< SCALAR, NJOINTS, 1 > &q)
Definition: robcogenHelpers.h:221
tpl::RobCoGenContainer< double > RobCoGenContainer
Definition: robcogenHelpers.h:779
#define CT_EE1_LAST_JOINT
Definition: RobCoGenTestHyQ.h:57
#define CT_L2
Definition: RobCoGenTestHyQ.h:33
#define CT_EE2_LAST_JOINT
Definition: RobCoGenTestHyQ.h:62
#define CT_EE3_IS_ON_LINK
Definition: RobCoGenTestHyQ.h:65
#define CT_L11
Definition: RobCoGenTestHyQ.h:42
#define CT_EE2
Definition: RobCoGenTestHyQ.h:59
static TRANS::MatrixType getTransformBaseEEById(TRANS &transforms, size_t ee_id, const Eigen::Matrix< SCALAR, NJOINTS, 1 > &q)
Definition: robcogenHelpers.h:358
#define CT_EE0
Definition: RobCoGenTestHyQ.h:48
Dynamics< RobCoGenContainer, Kinematics::NUM_EE > Dynamics
Definition: robcogenHelpers.h:781
#define CT_EE0_FIRST_JOINT
Definition: RobCoGenTestHyQ.h:50
#define CT_EE1
Definition: RobCoGenTestHyQ.h:54
#define CT_RBD_CASE_HELPER_JOINT_BEGIN_BASE_ID(BASE, LINK_ID, INDEX)
Definition: robcogenHelpers.h:47
#define CT_L0
Definition: RobCoGenTestHyQ.h:31
#define CT_RBD_JACOBIAN_GET_BLOCK(FIRST, LAST)
Definition: robcogenHelpers.h:35
#define CT_EE2_IS_ON_LINK
Definition: RobCoGenTestHyQ.h:60
#define CT_L9
Definition: RobCoGenTestHyQ.h:40
Container class containing all robcogen classes.
Definition: RobCoGenContainer.h:23
static TRANS::MatrixType getTransformBaseLinkById(TRANS &transforms, size_t link_id, const Eigen::Matrix< SCALAR, NJOINTS, 1 > &q)
Definition: robcogenHelpers.h:84
#define CT_EE3_FIRST_JOINT
Definition: RobCoGenTestHyQ.h:66
#define CT_RBD_CASE_HELPER_JOINT_END
Definition: robcogenHelpers.h:64
A general class for computing Kinematic properties.
Definition: Kinematics.h:27
#define CT_L5
Definition: RobCoGenTestHyQ.h:36
#define CT_N_EE
Definition: RobCoGenTestHyQ.h:45
#define CT_L1
Definition: RobCoGenTestHyQ.h:32
tpl::Kinematics< double > Kinematics
Definition: robcogenHelpers.h:780
#define CT_L3
Definition: RobCoGenTestHyQ.h:34
#define CT_EE0_LAST_JOINT
Definition: RobCoGenTestHyQ.h:51
#define CT_L8
Definition: RobCoGenTestHyQ.h:39
Definition: robcogenHelpers.h:74
#define TARGET_NS
Definition: RobCoGenTestHyQ.h:26
#define CT_EE1_FIRST_JOINT
Definition: RobCoGenTestHyQ.h:56
#define CT_L4
Definition: RobCoGenTestHyQ.h:35