robotis_foot_step_generator.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  * robotis_foot_step_generator.h
19  *
20  * Created on: 2016. 6. 10.
21  * Author: Jay Song
22  */
23 
24 #ifndef THORMANG3_FOOT_STEP_GENERATOR_ROBOTIS_FOOT_STEP_GENERATOR_H_
25 #define THORMANG3_FOOT_STEP_GENERATOR_ROBOTIS_FOOT_STEP_GENERATOR_H_
26 
27 #include <ros/ros.h>
28 #include <eigen3/Eigen/Eigen>
29 #include "thormang3_walking_module_msgs/AddStepDataArray.h"
30 #include "thormang3_foot_step_generator/Step2DArray.h"
31 
32 #define STOP_WALKING (0)
33 #define FORWARD_WALKING (1)
34 #define BACKWARD_WALKING (2)
35 #define RIGHTWARD_WALKING (3)
36 #define LEFTWARD_WALKING (4)
37 #define LEFT_ROTATING_WALKING (5)
38 #define RIGHT_ROTATING_WALKING (6)
39 
40 #define MINIMUM_STEP_TIME_SEC (0.4)
41 
42 namespace thormang3
43 {
44 
46 {
47 public:
50 
51  void initialize();
52 
53  void calcRightKickStep(thormang3_walking_module_msgs::AddStepDataArray::Request::_step_data_array_type* step_data_array,
54  const thormang3_walking_module_msgs::StepData& ref_step_data);
55  void calcLeftKickStep(thormang3_walking_module_msgs::AddStepDataArray::Request::_step_data_array_type* step_data_array,
56  const thormang3_walking_module_msgs::StepData& ref_step_data);
57 
58  void getStepData(thormang3_walking_module_msgs::AddStepDataArray::Request::_step_data_array_type* step_data_array,
59  const thormang3_walking_module_msgs::StepData& ref_step_data,
60  int desired_step_type);
61 
62  void getStepDataFromStepData2DArray(thormang3_walking_module_msgs::AddStepDataArray::Request::_step_data_array_type* step_data_array,
63  const thormang3_walking_module_msgs::StepData& ref_step_data,
64  const thormang3_foot_step_generator::Step2DArray::ConstPtr& request_step_2d);
65 
70 
73  double dsp_ratio_;
74 
77 
79 
80 private:
81  bool calcStep(const thormang3_walking_module_msgs::StepData& ref_step_data, int previous_step_type, int desired_step_type);
82 
83  void calcFBStep(const thormang3_walking_module_msgs::StepData& ref_step_data, int direction);
84  void calcRLStep(const thormang3_walking_module_msgs::StepData& ref_step_data, int direction);
85  void calcRoStep(const thormang3_walking_module_msgs::StepData& ref_step_data, int direction);
86  void calcStopStep(const thormang3_walking_module_msgs::StepData& ref_step_data, int direction);
87 
88  Eigen::MatrixXd getTransformationXYZRPY(double position_x, double position_y, double position_z, double roll, double pitch, double yaw);
89  void getPosefromTransformMatrix(const Eigen::MatrixXd &matTransform, double *position_x, double *position_y, double *position_z, double *roll, double *pitch, double *yaw);
90  thormang3_walking_module_msgs::PoseXYZRPY getPosefromTransformMatrix(const Eigen::MatrixXd &matTransform);
91  Eigen::MatrixXd getInverseTransformation(Eigen::MatrixXd transform);
92 
93  thormang3_walking_module_msgs::AddStepDataArray::Request::_step_data_array_type step_data_array_;
94 
96 
97 };
98 
99 
100 }
101 
102 
103 
104 #endif /* THORMANG3_FOOT_STEP_GENERATOR_ROBOTIS_FOOT_STEP_GENERATOR_H_ */
void calcRoStep(const thormang3_walking_module_msgs::StepData &ref_step_data, int direction)
Eigen::MatrixXd getTransformationXYZRPY(double position_x, double position_y, double position_z, double roll, double pitch, double yaw)
Eigen::MatrixXd getInverseTransformation(Eigen::MatrixXd transform)
void calcFBStep(const thormang3_walking_module_msgs::StepData &ref_step_data, int direction)
void calcStopStep(const thormang3_walking_module_msgs::StepData &ref_step_data, int direction)
void getStepData(thormang3_walking_module_msgs::AddStepDataArray::Request::_step_data_array_type *step_data_array, const thormang3_walking_module_msgs::StepData &ref_step_data, int desired_step_type)
void calcRightKickStep(thormang3_walking_module_msgs::AddStepDataArray::Request::_step_data_array_type *step_data_array, const thormang3_walking_module_msgs::StepData &ref_step_data)
void calcLeftKickStep(thormang3_walking_module_msgs::AddStepDataArray::Request::_step_data_array_type *step_data_array, const thormang3_walking_module_msgs::StepData &ref_step_data)
bool calcStep(const thormang3_walking_module_msgs::StepData &ref_step_data, int previous_step_type, int desired_step_type)
thormang3_walking_module_msgs::AddStepDataArray::Request::_step_data_array_type step_data_array_
void getStepDataFromStepData2DArray(thormang3_walking_module_msgs::AddStepDataArray::Request::_step_data_array_type *step_data_array, const thormang3_walking_module_msgs::StepData &ref_step_data, const thormang3_foot_step_generator::Step2DArray::ConstPtr &request_step_2d)
void calcRLStep(const thormang3_walking_module_msgs::StepData &ref_step_data, int direction)
void getPosefromTransformMatrix(const Eigen::MatrixXd &matTransform, double *position_x, double *position_y, double *position_z, double *roll, double *pitch, double *yaw)


thormang3_foot_step_generator
Author(s): Kayman , Jay Song
autogenerated on Mon Jun 10 2019 15:38:28