fifth_order_polynomial_trajectory.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  * fifth_order_polynomial_trajectory.h
19  *
20  * Created on: 2016. 8. 24.
21  * Author: Jay Song
22  */
23 
24 #ifndef ROBOTIS_MATH_FIFTH_ORDER_POLYNOMIAL_TRAJECTORY_H_
25 #define ROBOTIS_MATH_FIFTH_ORDER_POLYNOMIAL_TRAJECTORY_H_
26 
27 #define EIGEN_NO_DEBUG
28 #define EIGEN_NO_STATIC_ASSERT
29 
30 #include "robotis_linear_algebra.h"
31 #include "robotis_math_base.h"
32 
33 namespace robotis_framework
34 {
36 {
37 public:
38  FifthOrderPolynomialTrajectory(double initial_time, double initial_pos, double initial_vel, double initial_acc,
39  double final_time, double final_pos, double final_vel, double final_acc);
42 
43  bool changeTrajectory(double final_pos, double final_vel, double final_acc);
44  bool changeTrajectory(double final_time, double final_pos, double final_vel, double final_acc);
45  bool changeTrajectory(double initial_time, double initial_pos, double initial_vel, double initial_acc,
46  double final_time, double final_pos, double final_vel, double final_acc);
47 
48  double getPosition(double time);
49  double getVelocity(double time);
50  double getAcceleration(double time);
51 
52  void setTime(double time);
53  double getPosition();
54  double getVelocity();
55  double getAcceleration();
56 
57  double initial_time_;
58  double initial_pos_;
59  double initial_vel_;
60  double initial_acc_;
61 
62  double current_time_;
63  double current_pos_;
64  double current_vel_;
65  double current_acc_;
66 
67  double final_time_;
68  double final_pos_;
69  double final_vel_;
70  double final_acc_;
71 
72  Eigen::MatrixXd position_coeff_;
73  Eigen::MatrixXd velocity_coeff_;
74  Eigen::MatrixXd acceleration_coeff_;
75  Eigen::MatrixXd time_variables_;
76 };
77 }
78 
79 #endif /* ROBOTIS_MATH_FIFTH_ORDER_POLYNOMIAL_TRAJECTORY_H_ */
bool changeTrajectory(double final_pos, double final_vel, double final_acc)


robotis_math
Author(s): SCH , Kayman , Jay Song
autogenerated on Fri Jul 17 2020 03:17:50