custom_trajectory.h
Go to the documentation of this file.
1 /*******************************************************************************
2 * Copyright 2019 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 CUSTOM_TRAJECTORY_H_
20 #define CUSTOM_TRAJECTORY_H_
21 
22 #if defined(__OPENCR__)
23  #include <RobotisManipulator.h>
24 #else
26 #endif
27 
28 using namespace robotis_manipulator;
29 using namespace Eigen;
30 
32 {
33 
34 enum AXIS{
38 };
39 
40 
41 /*****************************************************************************
42 ** Line
43 *****************************************************************************/
45 {
46 private:
49 
50  double acc_dec_time_;
51  double move_time_;
52  std::vector<double> vel_max_;
53 
54 public:
55  Line() {}
56  virtual ~Line() {}
57 
58  void initLine(double move_time, TaskWaypoint start, TaskWaypoint delta);
59  TaskWaypoint drawLine(double time_var);
60 
61  virtual void setOption(const void *arg);
62  virtual void makeTaskTrajectory(double move_time, TaskWaypoint start, const void *arg);
63  virtual TaskWaypoint getTaskWaypoint(double tick);
64 };
65 
66 
67 /*****************************************************************************
68 ** Circle
69 *****************************************************************************/
71 {
72 private:
74  VectorXd coefficient_;
75 
78 
79  double radius_;
81  double revolution_;
82 
83 public:
84  Circle() {}
85  virtual ~Circle() {}
86 
87  void initCircle(double move_time, TaskWaypoint start, double radius, double revolution, double start_angular_position);
88  TaskWaypoint drawCircle(double time_var);
89 
90  virtual void setOption(const void *arg);
91  virtual void makeTaskTrajectory(double move_time, TaskWaypoint start, const void *arg);
92  virtual TaskWaypoint getTaskWaypoint(double tick);
93 };
94 
95 
96 /*****************************************************************************
97 ** Rhombus
98 *****************************************************************************/
100 {
101 private:
103  VectorXd coefficient_;
104 
107 
108  double radius_;
110  double revolution_;
111 
112 public:
113  Rhombus() {}
114  virtual ~Rhombus() {}
115 
116  void initRhombus(double move_time, TaskWaypoint start, double radius, double revolution, double start_angular_position);
117  TaskWaypoint drawRhombus(double time_var);
118 
119  virtual void setOption(const void *arg);
120  virtual void makeTaskTrajectory(double move_time, TaskWaypoint start, const void *arg);
121  virtual TaskWaypoint getTaskWaypoint(double tick);
122 };
123 
124 
125 /*****************************************************************************
126 ** Heart
127 *****************************************************************************/
129 {
130 private:
132  VectorXd coefficient_;
133 
136 
137  double radius_;
139  double revolution_;
140 
141 public:
142  Heart() {}
143  virtual ~Heart() {}
144 
145  void initHeart(double move_time, TaskWaypoint start, double radius, double revolution, double start_angular_position);
146  TaskWaypoint drawHeart(double tick);
147 
148  virtual void setOption(const void *arg);
149  virtual void makeTaskTrajectory(double move_time, TaskWaypoint start, const void *arg);
150  virtual TaskWaypoint getTaskWaypoint(double tick);
151 };
152 
153 
154 } // namespace CUSTOM_TRAJECTORY
155 #endif // CUSTOM_TRAJECTORY_H_
156 
157 
158 
159 
robotis_manipulator::MinimumJerk path_generator_
ROSCPP_DECL void start()
#define Z_AXIS
#define Y_AXIS
robotis_manipulator::MinimumJerk path_generator_
robotis_manipulator::MinimumJerk path_generator_
std::vector< double > vel_max_
#define X_AXIS


open_manipulator_p_libs
Author(s): Ryan Shim , Yong-Ho Na , Hye-Jong KIM
autogenerated on Thu Oct 22 2020 03:16:37