trajectory_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 /* Authors: Darby Lim, Hye-Jong KIM, Ryan Shim, Yong-Ho Na */
18 
19 #ifndef TRAJECTORY_GENERATOR_H_
20 #define TRAJECTORY_GENERATOR_H_
21 
22 #include <math.h>
23 #include <vector>
24 
25 #include <eigen3/Eigen/Eigen>
26 #include <eigen3/Eigen/LU>
27 #include <eigen3/Eigen/QR>
28 
29 typedef struct _Point
30 {
31  double position;
32  double velocity;
33  double acceleration;
34 } WayPoint;
35 
37 {
38 private:
39  Eigen::VectorXd coefficient_;
40 
41 public:
42  MinimumJerk();
43  virtual ~MinimumJerk();
44 
46  WayPoint goal,
47  double move_time,
48  double control_time);
49 
50  Eigen::VectorXd getCoefficient();
51 };
52 
54 {
55 private:
57 
58  uint8_t joint_num_;
59  Eigen::MatrixXd coefficient_;
60  std::vector<WayPoint> joint_way_point_;
61 
62 public:
64  virtual ~JointTrajectory();
65 
66  void setJointNum(uint8_t joint_num);
67  void init(double move_time,
68  double control_time,
69  std::vector<WayPoint> start,
70  std::vector<WayPoint> goal
71  );
72 
73  std::vector<WayPoint> getJointWayPoint(double tick);
74 
75  Eigen::MatrixXd getCoefficient();
76 };
77 
78 #endif // TRAJECTORY_GENERATOR_H_
_Point::velocity
double velocity
Definition: trajectory_generator.h:46
JointTrajectory::getJointWayPoint
std::vector< WayPoint > getJointWayPoint(double tick)
Definition: trajectory_generator.cpp:93
WayPoint
struct _Point WayPoint
_Point::position
double position
Definition: trajectory_generator.h:45
_Point
Definition: trajectory_generator.h:29
JointTrajectory
Definition: trajectory_generator.h:53
MinimumJerk::~MinimumJerk
virtual ~MinimumJerk()
Definition: trajectory_generator.cpp:26
MinimumJerk::getCoefficient
Eigen::VectorXd getCoefficient()
Definition: trajectory_generator.cpp:60
JointTrajectory::setJointNum
void setJointNum(uint8_t joint_num)
Definition: trajectory_generator.cpp:87
JointTrajectory::coefficient_
Eigen::MatrixXd coefficient_
Definition: trajectory_generator.h:59
JointTrajectory::getCoefficient
Eigen::MatrixXd getCoefficient()
Definition: trajectory_generator.cpp:127
MinimumJerk::MinimumJerk
MinimumJerk()
Definition: trajectory_generator.cpp:21
JointTrajectory::~JointTrajectory
virtual ~JointTrajectory()
Definition: trajectory_generator.cpp:69
MinimumJerk
Definition: trajectory_generator.h:36
JointTrajectory::init
void init(double move_time, double control_time, std::vector< WayPoint > start, std::vector< WayPoint > goal)
Definition: trajectory_generator.cpp:71
MinimumJerk::coefficient_
Eigen::VectorXd coefficient_
Definition: trajectory_generator.h:39
JointTrajectory::trajectory_generator_
MinimumJerk trajectory_generator_
Definition: trajectory_generator.h:56
MinimumJerk::calcCoefficient
void calcCoefficient(WayPoint start, WayPoint goal, double move_time, double control_time)
Definition: trajectory_generator.cpp:28
JointTrajectory::JointTrajectory
JointTrajectory()
Definition: trajectory_generator.cpp:67
JointTrajectory::joint_way_point_
std::vector< WayPoint > joint_way_point_
Definition: trajectory_generator.h:60
_Point::acceleration
double acceleration
Definition: trajectory_generator.h:47
JointTrajectory::joint_num_
uint8_t joint_num_
Definition: trajectory_generator.h:58


dynamixel_workbench_controllers
Author(s): Darby Lim , Ryan Shim
autogenerated on Wed Mar 2 2022 00:13:20