kinematics_dynamics.h
Go to the documentation of this file.
1 /*******************************************************************************
2 * Copyright 2018 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 /*
18  * kinematcis_dynamics.h
19  *
20  * Created on: June 7, 2016
21  * Author: SCH
22  */
23 
24 #ifndef THORMANG3_KINEMATICS_DYNAMICS_KINEMATICS_DYNAMICS_H_
25 #define THORMANG3_KINEMATICS_DYNAMICS_KINEMATICS_DYNAMICS_H_
26 
27 #define EIGEN_NO_DEBUG
28 #define EIGEN_NO_STATIC_ASSERT
29 
30 #include <vector>
31 #include <eigen3/Eigen/Eigen>
32 
34 #include "link_data.h"
35 
36 namespace thormang3
37 {
38 
39 enum TreeSelect {
43 };
44 
46 {
47 
48 public:
52 
53  std::vector<int> findRoute(int to);
54  std::vector<int> findRoute(int from, int to);
55 
56  double calcTotalMass(int joint_id);
57  Eigen::MatrixXd calcMassCenter(int joint_id);
58  Eigen::MatrixXd calcCenterOfMass(Eigen::MatrixXd mc);
59 
60  void calcJointsCenterOfMass(int joint_id);
61 
62  void calcForwardKinematics(int joint_ID);
63 
64  Eigen::MatrixXd calcJacobian(std::vector<int> idx);
65  Eigen::MatrixXd calcJacobianCOM(std::vector<int> idx);
66  Eigen::MatrixXd calcVWerr(Eigen::MatrixXd tar_position, Eigen::MatrixXd curr_position, Eigen::MatrixXd tar_orientation, Eigen::MatrixXd curr_orientation);
67 
68  bool calcInverseKinematics(int to, Eigen::MatrixXd tar_position, Eigen::MatrixXd tar_orientation , int max_iter, double ik_err);
69  bool calcInverseKinematics(int from, int to, Eigen::MatrixXd tar_position, Eigen::MatrixXd tar_orientation, int max_iter, double ik_err);
70 
71  // with weight
72  bool calcInverseKinematics(int to, Eigen::MatrixXd tar_position, Eigen::MatrixXd tar_orientation, int max_iter, double ik_err , Eigen::MatrixXd weight);
73  bool calcInverseKinematics(int from, int to, Eigen::MatrixXd tar_position, Eigen::MatrixXd tar_orientation, int max_iter, double ik_err, Eigen::MatrixXd weight);
74 
75  bool calcInverseKinematicsForLeg(double *out, double x, double y, double z, double roll, double pitch, double yaw);
76  bool calcInverseKinematicsForRightLeg(double *out, double x, double y, double z, double roll, double pitch, double yaw);
77  bool calcInverseKinematicsForLeftLeg(double *out, double x, double y, double z, double roll, double pitch, double yaw);
78 
80 
85 };
86 
87 }
88 
89 #endif /* THORMANG3_KINEMATICS_DYNAMICS_KINEMATICS_DYNAMICS_H_ */
std::vector< int > findRoute(int to)
Eigen::MatrixXd calcJacobian(std::vector< int > idx)
Eigen::MatrixXd calcMassCenter(int joint_id)
Eigen::MatrixXd calcJacobianCOM(std::vector< int > idx)
bool calcInverseKinematicsForLeg(double *out, double x, double y, double z, double roll, double pitch, double yaw)
LinkData * thormang3_link_data_[ALL_JOINT_ID+1]
bool calcInverseKinematicsForRightLeg(double *out, double x, double y, double z, double roll, double pitch, double yaw)
Eigen::MatrixXd calcVWerr(Eigen::MatrixXd tar_position, Eigen::MatrixXd curr_position, Eigen::MatrixXd tar_orientation, Eigen::MatrixXd curr_orientation)
Eigen::MatrixXd calcCenterOfMass(Eigen::MatrixXd mc)
#define ALL_JOINT_ID
bool calcInverseKinematicsForLeftLeg(double *out, double x, double y, double z, double roll, double pitch, double yaw)
bool calcInverseKinematics(int to, Eigen::MatrixXd tar_position, Eigen::MatrixXd tar_orientation, int max_iter, double ik_err)


thormang3_kinematics_dynamics
Author(s): SCH
autogenerated on Mon Jun 10 2019 15:37:49