AUBO SDK  0.26.0
Loading...
Searching...
No Matches
axis_interface.h
Go to the documentation of this file.
1/** @file axes.h
2 * @brief 外部轴接口
3 */
4#ifndef AUBO_SDK_AXIS_INTERFACE_H
5#define AUBO_SDK_AXIS_INTERFACE_H
6
7#include <aubo/sync_move.h>
8#include <aubo/trace.h>
9
10namespace arcs {
11namespace common_interface {
12
13/**
14 * \~chinese 外部轴API接口
15 * \~english External axis API interface
16 */
17class ARCS_ABI_EXPORT AxisInterface
18{
19public:
21 virtual ~AxisInterface();
22
23 /**
24 * \~chinese 通电
25 * \~english Power on
26 * @return
27 */
29
30 /**
31 * \~chinese 断电
32 * \~english Power off
33 * @return
34 */
36
37 /**
38 * \~chinese 使能
39 * \~english Enable
40 * @return
41 */
43
44 /**
45 * \~chinese 设置外部轴的安装位姿(相对于世界坐标系)
46 * \~chinese @param pose
47 * \~english Set mounting pose of external axis (wrt world frame)
48 * \~english @param pose
49
50 * @return
51 */
52 int setExtAxisMountingPose(const std::vector<double> &pose);
53
54 /**
55 * \chinese 运动到指定点, 旋转或者平移
56 *
57 * @param pos
58 * @param v
59 * @param a
60 * @param duration
61 * @return
62 * \endchinese
63 *
64 * \english move to pos, rotation or linear
65 *
66 * @param pos
67 * @param v
68 * @param a
69 * @param duration
70 * @return
71 * \endenglish
72 */
73 int moveExtJoint(double pos, double v, double a, double duration);
74
75 /**
76 * \chinese
77 * 制定目标运动速度
78 *
79 * @param v
80 * @param a
81 * @param duration
82 * @return
83 * \endchinese
84 *
85 * \english
86 * Set target speed, acceleration and duration
87 * @param v
88 * @param a
89 * @param duration
90 * @return
91 * \endenglish
92 */
93 int speedExtJoint(double v, double a, double duration);
94
95 int stopExtJoint(double a);
96
97 /**
98 * \~chinese 获取外部轴的类型 0代表是旋转 1代表平移
99 * \~english Get external axis type: 0 for rotation, 1 for linear
100 * @return
101 */
103
104 /**
105 * \chinese
106 * 获取当前外部轴的状态
107 *
108 * @return 当前外部轴的状态
109 * \endchinese
110 *
111 * \english
112 * Get external axis status
113 *
114 * @return Current exteral axis status
115 * \endenglish
116 */
118
119 /**
120 * \chinese
121 * 获取外部轴安装位姿
122 *
123 * @return 外部轴安装位姿
124 * \endchinese
125 *
126 * \english
127 * Get external axis mounting pose
128 *
129 * @return External axis pose
130 * \endenglish
131 */
132 std::vector<double> getExtAxisMountingPose();
133
134 /**
135 * \chinese
136 * 获取相对于安装坐标系的位姿,外部轴可能为变位机或者导轨
137 *
138 * @return 相对于安装坐标系的位姿
139 * \endchinese
140 *
141 * \english
142 * Get pose wrt mounting coordinate system, axis can be positioner or linear rail
143 *
144 * @return Pose wrt mounting coordinate system
145 * \endenglish
146 */
147 std::vector<double> getExtAxisPose();
148
149 /**
150 * \chinese
151 * 获取外部轴位置
152 *
153 * @return 外部轴位置
154 * \endchinese
155 *
156 * \english
157 * Get external axis position
158 *
159 * @return External axis position
160 * \endenglish
161 */
163
164 /**
165 * \chinese
166 * 获取外部轴运行速度
167 *
168 * @return 外部轴运行速度
169 * \endchinese
170 *
171 * \english
172 * Get external axis speed
173 *
174 * @return External axis speed
175 * \endenglish
176 */
178
179 /**
180 * \chinese
181 * 获取外部轴运行加速度
182 *
183 * @return 外部轴运行加速度
184 * \endchinese
185 *
186 * \english
187 * Get external axis acceleration
188 *
189 * @return External axis acceleration
190 * \endenglish
191 */
193
194 /**
195 * \chinese
196 * 获取外部轴电流
197 *
198 * @return 外部轴电流
199 * \endchinese
200 *
201 * \english
202 * Get external axis current
203 *
204 * @return External axis current
205 * \endenglish
206 */
208
209 /**
210 * \chinese
211 * 获取外部轴温度
212 *
213 * @return 外部轴温度
214 * \endchinese
215 *
216 * \english
217 * Get external axis temperature
218 *
219 * @return External axis temperature
220 * \endenglish
221 */
223
224 /**
225 * \chinese
226 * 获取外部轴电压
227 *
228 * @return 外部轴电压
229 * \endchinese
230 *
231 * \english
232 * Get external axis voltage
233 *
234 * @return External axis voltage
235 * \endenglish
236 */
238
239 /**
240 * \chinese
241 * 获取外部轴电流
242 *
243 * @return 外部轴电流
244 * \endchinese
245 *
246 * \english
247 * Get external axis current
248 *
249 * @return external axis current
250 * \endenglish
251 */
253
254 /**
255 * \chinese
256 * 获取外部轴最大位置
257 *
258 * @return 外部轴最大位置
259 * \endchinese
260 *
261 * \english
262 * Get external axis max position
263 *
264 * @return External axis max position
265 * \endenglish
266 */
268
269 /**
270 * \chinese
271 * 获取外部轴最小位置
272 *
273 * @return 外部轴最小位置
274 * \endchinese
275 *
276 * \english
277 * Get external axis min position
278 *
279 * @return External axis min position
280 * \endenglish
281 */
283
284 /**
285 * \chinese
286 * 获取外部轴最大速度
287 *
288 * @return 外部轴最大速度
289 * \endchinese
290 *
291 * \english
292 * Get external axis max speed
293 *
294 * @return External axis max speed
295 * \endenglish
296 */
298
299 /**
300 * \chinese
301 * 获取外部轴最大加速度
302 *
303 * @return 外部轴最大加速度
304 * \endchinese
305 *
306 * \english
307 * Get external axis max acceleration
308 *
309 * @return External axis max acceleration
310 * \endenglish
311 */
313
314 /**
315 * \chinese
316 * 跟踪另一个外部轴的运动(禁止运动过程中使用)
317 *
318 * @param target_name 目标的外部轴名字
319 * @param phase 相位差
320 * @param err 跟踪运行的最大误差
321 * @return
322 * \endchinese
323 *
324 * \english
325 * Follow motion of another external axis (not to be used during motion)
326 *
327 * @param target_name name of target axis
328 * @param phase phase difference
329 * @param err max error when following motion
330 * @return
331 * \endenglish
332 */
333 int followAnotherAxis(const std::string &target_name, double phase,
334 double err);
335
336 /**
337 * \~chinese @brief stopFollowAnotherAxis(禁止运动过程中使用)
338 * \~english @brief stopFollowAnotherAxis(not to be used during motion)
339 * @return
340 */
342
343 /**
344 * \chinese
345 * 获取外部轴错误码
346 *
347 * @return 外部轴错误码
348 * \endchinese
349 *
350 * \english
351 * Get external axis error code
352 *
353 * @return External axis error code
354 * \endenglish
355 */
357
358 /**
359 * \chinese
360 * 重置外部轴错误
361 *
362 * @return
363 * \endchinese
364 *
365 * \english
366 * Reset axis error
367 *
368 * @return
369 * \endenglish
370 */
372
373protected:
374 void *d_;
375};
376using AxisInterfacePtr = std::shared_ptr<AxisInterface>;
377
378} // namespace common_interface
379} // namespace arcs
380
381#endif // AUBO_SDK_AXIS_INTERFACE_H
External axis API interface.
double getExtAxisCurrent()
Get external axis current
int speedExtJoint(double v, double a, double duration)
Set target speed, acceleration and duration
int followAnotherAxis(const std::string &target_name, double phase, double err)
Follow motion of another external axis (not to be used during motion)
double getExtAxisVelocity()
Get external axis speed
int setExtAxisMountingPose(const std::vector< double > &pose)
Set mounting pose of external axis (wrt world frame)
double getExtAxisMaxPosition()
Get external axis max position
double getExtAxisBusVoltage()
Get external axis voltage
std::vector< double > getExtAxisPose()
Get pose wrt mounting coordinate system, axis can be positioner or linear rail
int moveExtJoint(double pos, double v, double a, double duration)
move to pos, rotation or linear
double getExtAxisPosition()
Get external axis position
double getExtAxisMaxVelocity()
Get external axis max speed
double getExtAxisAcceleration()
Get external axis acceleration
double getExtAxisBusCurrent()
Get external axis current
std::vector< double > getExtAxisMountingPose()
Get external axis mounting pose
int stopFollowAnotherAxis()
stopFollowAnotherAxis(not to be used during motion)
int getErrorCode()
Get external axis error code
double getExtMinPosition()
Get external axis min position
int getExtAxisType()
Get external axis type: 0 for rotation, 1 for linear.
AxisModeType getAxisModeType()
Get external axis status
double getExtAxisTemperature()
Get external axis temperature
double getExtAxisMaxAcceleration()
Get external axis max acceleration
int clearAxisError()
Reset axis error
std::shared_ptr< AxisInterface > AxisInterfacePtr
同步运行
Interface for injecting logs into the controller's logging system.