minimum_jerk_trajectory_with_via_point.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 #ifndef ROBOTIS_MATH_MINIMUM_JERK_TRAJECTORY_WITH_VIA_POINT_H_
18 #define ROBOTIS_MATH_MINIMUM_JERK_TRAJECTORY_WITH_VIA_POINT_H_
19 
20 #define EIGEN_NO_DEBUG
21 #define EIGEN_NO_STATIC_ASSERT
22 
23 #include "robotis_linear_algebra.h"
24 #include "robotis_math_base.h"
25 
26 #include <ros/ros.h>
27 #include <stdint.h>
28 #include <vector>
29 
30 namespace robotis_framework
31 {
32 
34 {
35 public:
36  MinimumJerkViaPoint(double ini_time, double fin_time, double via_time, double ratio,
37  std::vector<double_t> ini_pos, std::vector<double_t> ini_vel, std::vector<double_t> ini_acc,
38  std::vector<double_t> fin_pos, std::vector<double_t> fin_vel, std::vector<double_t> fin_acc,
39  std::vector<double_t> via_pos, std::vector<double_t> via_vel, std::vector<double_t> via_acc);
40  virtual ~MinimumJerkViaPoint();
41 
42  std::vector<double_t> getPosition(double time);
43  std::vector<double_t> getVelocity(double time);
44  std::vector<double_t> getAcceleration(double time);
45 
46  double cur_time_;
47  std::vector<double_t> cur_pos_;
48  std::vector<double_t> cur_vel_;
49  std::vector<double_t> cur_acc_;
50 
51  Eigen::MatrixXd position_coeff_;
52  Eigen::MatrixXd velocity_coeff_;
53  Eigen::MatrixXd acceleration_coeff_;
54  Eigen::MatrixXd time_variables_;
55 
56 private:
58  double ratio_;
61  std::vector<double_t> ini_pos_, ini_vel_, ini_acc_;
62  std::vector<double_t> fin_pos_, fin_vel_, fin_acc_;
63  std::vector<double_t> via_pos_, via_vel_, via_acc_;
64 };
65 
66 }
67 
68 #endif /* ROBOTIS_MATH_MINIMUM_JERK_TRAJECTORY_WITH_VIA_POINT_H_ */
MinimumJerkViaPoint(double ini_time, double fin_time, double via_time, double ratio, std::vector< double_t > ini_pos, std::vector< double_t > ini_vel, std::vector< double_t > ini_acc, std::vector< double_t > fin_pos, std::vector< double_t > fin_vel, std::vector< double_t > fin_acc, std::vector< double_t > via_pos, std::vector< double_t > via_vel, std::vector< double_t > via_acc)


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