00001 /* 00002 * Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA) 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00017 00018 #ifndef COB_TWIST_CONTROLLER_DAMPING_METHODS_DAMPING_H 00019 #define COB_TWIST_CONTROLLER_DAMPING_METHODS_DAMPING_H 00020 00021 #include "cob_twist_controller/damping_methods/damping_base.h" 00022 00023 /* BEGIN DampingBuilder *****************************************************************************************/ 00025 class DampingBuilder 00026 { 00027 public: 00028 static DampingBase* createDamping(const TwistControllerParams& params); 00029 00030 private: 00031 DampingBuilder() {} 00032 ~DampingBuilder() {} 00033 }; 00034 /* END DampingBuilder *******************************************************************************************/ 00035 00036 /* BEGIN DampingNone ****************************************************************************************/ 00038 class DampingNone : public DampingBase 00039 { 00040 public: 00041 explicit DampingNone(const TwistControllerParams& params) 00042 : DampingBase(params) 00043 {} 00044 00045 ~DampingNone() {} 00046 00047 virtual Eigen::MatrixXd getDampingFactor(const Eigen::VectorXd& sorted_singular_values, 00048 const Eigen::MatrixXd& jacobian_data) const; 00049 }; 00050 /* END DampingNone **********************************************************************************************/ 00051 00052 /* BEGIN DampingConstant ****************************************************************************************/ 00054 class DampingConstant : public DampingBase 00055 { 00056 public: 00057 explicit DampingConstant(const TwistControllerParams& params) 00058 : DampingBase(params) 00059 {} 00060 00061 ~DampingConstant() {} 00062 00063 virtual Eigen::MatrixXd getDampingFactor(const Eigen::VectorXd& sorted_singular_values, 00064 const Eigen::MatrixXd& jacobian_data) const; 00065 }; 00066 /* END DampingConstant ******************************************************************************************/ 00067 00068 /* BEGIN DampingManipulability **********************************************************************************/ 00070 class DampingManipulability : public DampingBase 00071 { 00072 public: 00073 explicit DampingManipulability(const TwistControllerParams& params) 00074 : DampingBase(params) 00075 {} 00076 00077 ~DampingManipulability() {} 00078 00079 virtual Eigen::MatrixXd getDampingFactor(const Eigen::VectorXd& sorted_singular_values, 00080 const Eigen::MatrixXd& jacobian_data) const; 00081 }; 00082 /* END DampingManipulability ************************************************************************************/ 00083 00084 /* BEGIN DampingLeastSingularValues **********************************************************************************/ 00086 class DampingLeastSingularValues : public DampingBase 00087 { 00088 public: 00089 explicit DampingLeastSingularValues(const TwistControllerParams& params) 00090 : DampingBase(params) 00091 {} 00092 00093 ~DampingLeastSingularValues() {} 00094 00095 virtual Eigen::MatrixXd getDampingFactor(const Eigen::VectorXd& sorted_singular_values, 00096 const Eigen::MatrixXd& jacobian_data) const; 00097 }; 00098 /* END DampingLeastSingularValues ************************************************************************************/ 00099 00100 /* BEGIN DampingSigmoid **********************************************************************************/ 00102 class DampingSigmoid : public DampingBase 00103 { 00104 public: 00105 explicit DampingSigmoid(const TwistControllerParams& params) 00106 : DampingBase(params) 00107 {} 00108 00109 ~DampingSigmoid() {} 00110 00111 virtual Eigen::MatrixXd getDampingFactor(const Eigen::VectorXd& sorted_singular_values, 00112 const Eigen::MatrixXd& jacobian_data) const; 00113 }; 00114 /* END DampingSigmoid ************************************************************************************/ 00115 00116 #endif // COB_TWIST_CONTROLLER_DAMPING_METHODS_DAMPING_H