kinematics.h
Go to the documentation of this file.
1 /*******************************************************************************
2 * Copyright 2019 ROBOTIS CO., LTD.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *******************************************************************************/
16 
17 /* Authors: Darby Lim, Hye-Jong KIM, Ryan Shim, Yong-Ho Na */
18 
19 #ifndef KINEMATICS_H_
20 #define KINEMATICS_H_
21 
22 #if defined(__OPENCR__)
23  #include <RobotisManipulator.h>
24 #else
26 #endif
27 
28 //#define KINEMATICS_DEBUG
29 
30 using namespace Eigen;
31 using namespace robotis_manipulator;
32 
33 namespace kinematics
34 {
35 
36 /*****************************************************************************
37 ** Kinematics Solver Using Chain Rule and Jacobian
38 *****************************************************************************/
40 {
41 private:
42 
43  void forwardSolverUsingChainRule(Manipulator *manipulator, Name component_name);
44  bool inverseSolverUsingJacobian(Manipulator *manipulator, Name tool_name, Pose target_pose, std::vector<JointValue>* goal_joint_value);
45 
46 public:
49 
50  virtual void setOption(const void *arg);
51  virtual MatrixXd jacobian(Manipulator *manipulator, Name tool_name);
52  virtual void solveForwardKinematics(Manipulator *manipulator);
53  virtual bool solveInverseKinematics(Manipulator *manipulator, Name tool_name, Pose target_pose, std::vector<JointValue>* goal_joint_value);
54 };
55 
56 
57 /*****************************************************************************
58 ** Kinematics Solver Using Chain Rule and Singularity Robust Jacobian
59 *****************************************************************************/
61 {
62 private:
63  void forwardSolverUsingChainRule(Manipulator *manipulator, Name component_name);
64  bool inverseSolverUsingSRJacobian(Manipulator *manipulator, Name tool_name, Pose target_pose, std::vector<JointValue>* goal_joint_value);
65 
66 public:
69 
70  virtual void setOption(const void *arg);
71  virtual MatrixXd jacobian(Manipulator *manipulator, Name tool_name);
72  virtual void solveForwardKinematics(Manipulator *manipulator);
73  virtual bool solveInverseKinematics(Manipulator *manipulator, Name tool_name, Pose target_pose, std::vector<JointValue>* goal_joint_value);
74 };
75 
76 
77 /*****************************************************************************
78 ** Kinematics Solver Using Chain Rule and Singularity Robust Position Only Jacobian
79 *****************************************************************************/
81 {
82 private:
83  void forwardSolverUsingChainRule(Manipulator *manipulator, Name component_name);
84  bool inverseSolverUsingPositionOnlySRJacobian(Manipulator *manipulator, Name tool_name, Pose target_pose, std::vector<JointValue>* goal_joint_value);
85 
86 public:
89 
90  virtual void setOption(const void *arg);
91  virtual MatrixXd jacobian(Manipulator *manipulator, Name tool_name);
92  virtual void solveForwardKinematics(Manipulator *manipulator);
93  virtual bool solveInverseKinematics(Manipulator *manipulator, Name tool_name, Pose target_pose, std::vector<JointValue>* goal_joint_value);
94 };
95 
96 
97 /*****************************************************************************
98 ** Kinematics Solver Customized for OpenManipulator Chain
99 *****************************************************************************/
101 {
102 private:
103  void forwardSolverUsingChainRule(Manipulator *manipulator, Name component_name);
104  bool chainCustomInverseKinematics(Manipulator *manipulator, Name tool_name, Pose target_pose, std::vector<JointValue>* goal_joint_value);
105 
106 public:
109 
110  virtual void setOption(const void *arg);
111  virtual MatrixXd jacobian(Manipulator *manipulator, Name tool_name);
112  virtual void solveForwardKinematics(Manipulator *manipulator);
113  virtual bool solveInverseKinematics(Manipulator *manipulator, Name tool_name, Pose target_pose, std::vector<JointValue>* goal_joint_value);
114 };
115 
116 
117 /*****************************************************************************
118 ** Kinematics Solver Using Geometry Approach
119 *****************************************************************************/
121 {
122 private:
123  bool with_gripper_ = false;
124 
125  void forwardSolverUsingChainRule(Manipulator *manipulator, Name component_name);
126  bool inverseSolverUsingGeometry(Manipulator *manipulator, Name tool_name, Pose target_pose, std::vector<JointValue>* goal_joint_value);
127 
128 public:
131 
132  virtual void setOption(const void *arg);
133  virtual MatrixXd jacobian(Manipulator *manipulator, Name tool_name);
134  virtual void solveForwardKinematics(Manipulator *manipulator);
135  virtual bool solveInverseKinematics(Manipulator *manipulator, Name tool_name, Pose target_pose, std::vector<JointValue>* goal_joint_value);
136 };
137 
138 
139 } // namespace KINEMATICS
140 
141 
142 #endif // KINEMATICS_H_
STRING Name


open_manipulator_p_libs
Author(s): Ryan Shim , Yong-Ho Na , Hye-Jong KIM
autogenerated on Thu Oct 22 2020 03:16:37