AUBO SDK  0.26.0
载入中...
搜索中...
未找到
force_control.h
浏览该文件的文档.
1/**
2 * \chinese
3 * @file force_control.h
4 * @brief 力控接口
5 *
6 * 力控的限制
7 * 当机器人处于力控模式时,以下功能不可用:
8 *
9 * • 碰撞检测(选项 613-1)\n
10 * • SoftMove(选项 885-1)\n
11 * • 跟踪功能,如输送带跟踪(选项 606-1)、光学跟踪(6601)和焊接引导(815-2)\n
12 * • 传感器同步或模拟同步\n
13 * • 世界区域(选项 608-1)\n
14 * • 独立轴(选项 610-1)\n
15 * • 路径偏移(选项 612-1)\n
16 * • 弧焊选项\n
17 * • PickMaster 选项\n
18 * • 关节软伺服(指令 SoftAct)\n
19 * • 当机器人以 MultiMove 协调模式(选项 604-1)运行时,不能激活力控。\n
20 * • 如果力控与 SafeMove(选项 810-2)或电子位置开关(选项 810-1)一起使用,必须使用操作安全范围功能。请参阅这些选项的相关手册。\n
21 * • RAPID 指令如 FCAct、FCDeact、FCConditionWaitWhile 和 FCRefStop 只能从运动任务的普通级别调用。
22 *
23 * 应用:抛光、打磨、清洁\n
24 * FC Pressure\n
25 * 设置轨迹坐标系的 z 方向为力控轴,spring 设置为 0\n
26 * 在还没接触前设置输出力为 0,spring 设置为固定值(根据 vel 确定)\n
27 * 离开接触面:设置输出力为 0,spring 设置为固定值\n
28 *
29 * 活塞装配\n
30 * Forward clutch hub\n
31 * 设置力控终止模式
32 *
33 * 基于末端力传感器的拖动示教\n
34 * spring = 0; force_ref = 0; 参考轨迹点任意
35 * \endchinese
36 * \english
37 * @file force_control.h
38 * @brief Force control interface
39 *
40 * Force control limitations
41 * When the robot is force controlled, the following functionality is not accessible:
42 *
43 * • Collision Detection (option 613-1) \n
44 * • SoftMove (option 885-1) \n
45 * • Tracking functionality like Conveyor Tracking (option 606-1), Optical Tracking (6601) and Weld Guide (815-2) \n
46 * • Sensor Synchronization or Analog Synchronization \n
47 * • World Zones (option 608-1) \n
48 * • Independent Axes (option 610-1) \n
49 * • Path Offset (option 612-1) \n
50 * • Arc options \n
51 * • PickMaster options \n
52 * • Joint soft servo (instruction SoftAct) \n
53 * • Force Control cannot be activated when the robot is running in MultiMove Coordinated mode (option 604-1). \n
54 * • If Force Control is used together with SafeMove (option 810-2) or Electronic Position Switches (option 810-1), the function Operational Safety Range must be used. See the respective manual for these options. \n
55 * • RAPID instructions such as FCAct, FCDeact, FCConditionWaitWhile and FCRefStop can only be called from normal level in a motion task.
56 *
57 * Applications: polishing, grinding, cleaning \n
58 * FC Pressure \n
59 * Set the z direction of the trajectory coordinate system as the force control axis, set spring to 0 \n
60 * Before contact, set output force to 0, spring to a fixed value (determined by vel) \n
61 * Leaving the contact surface: set output force to 0, spring to a fixed value \n
62 *
63 * Piston assembly \n
64 * Forward clutch hub \n
65 * Set force control termination mode
66 *
67 * Drag teaching based on end force sensor \n
68 * spring = 0; force_ref = 0; reference trajectory point arbitrary
69 * \endenglish
70 */
71#ifndef AUBO_SDK_FORCE_CONTROL_INTERFACE_H
72#define AUBO_SDK_FORCE_CONTROL_INTERFACE_H
73
74#include <vector>
75#include <thread>
76
77#include <aubo/global_config.h>
78#include <aubo/type_def.h>
79
80namespace arcs {
81namespace common_interface {
82
83/**
84 * \chinese
85 * 力控接口抽象类
86 * \endchinese
87 * \english
88 * Abstract class for force control interface
89 * \endenglish
90 */
91class ARCS_ABI_EXPORT ForceControl
92{
93public:
95 virtual ~ForceControl();
96
97 /**
98 * \chinese
99 * 使能力控。
100 * fcEnable 被用于使能力控。 在力控被使能的同时,
101 * fcEnable 用于定义力控的坐标系,并调整力和力矩的阻尼。
102 * 如果在 fcEnable 中未指定坐标系,
103 * 则会创建一个默认的力控制坐标系,其方向与工作对象坐标系相同。
104 * 所有力控制监管功能都被 fcEnable 激活。
105 *
106 * @return 成功返回0;失败返回错误码
107 * AUBO_BUSY
108 * AUBO_BAD_STATE
109 * -AUBO_BAD_STATE
110 *
111 * @throws arcs::common_interface::AuboException
112 *
113 * @par Python函数原型
114 * fcEnable(self: pyaubo_sdk.ForceControl) -> int
115 *
116 * @par Lua函数原型
117 * fcEnable() -> nil
118 *
119 * @par Lua示例
120 * fcEnable()
121 *
122 * @par JSON-RPC请求示例
123 * {"jsonrpc":"2.0","method":"rob1.ForceControl.fcEnable","params":[],"id":1}
124 *
125 * @par JSON-RPC响应示例
126 * {"id":1,"jsonrpc":"2.0","result":0}
127 *
128 * \endchinese
129 *
130 * \english
131 * Start force control
132 *
133 * fcEnable is used to enable Force Control. At the same time as Force
134 * Control is enabled, fcEnable is used to define the coordinate system
135 * for Force Control, and tune the force and torque damping. If a coordinate
136 * system is not specified in fcEnable a default force control coordinate
137 * system is created with the same orientation as the work object coordinate
138 * system. All Force Control supervisions are activated by fcEnable.
139 *
140 *
141 * @return Return 0 if succeeded; return error code if failed
142 * AUBO_BUSY
143 * AUBO_BAD_STATE
144 * -AUBO_BAD_STATE
145 *
146 * @throws arcs::common_interface::AuboException
147 *
148 * @par Python Function Prototype
149 * fcEnable(self: pyaubo_sdk.ForceControl) -> int
150 *
151 * @par Lua Function Prototype
152 * fcEnable() -> nil
153 *
154 * @par Lua example
155 * fcEnable()
156 *
157 * @par JSON-RPC Request example
158 * {"jsonrpc":"2.0","method":"rob1.ForceControl.fcEnable","params":[],"id":1}
159 *
160 * @par JSON-RPC Response example
161 * {"id":1,"jsonrpc":"2.0","result":0}
162 * \endenglish
163 */
164
165 int fcEnable();
166
167 /**
168 * \chinese
169 * 失能力控。
170 * fcDisable 被用于失能力控。 在成功失能力控之后,机器人将回到位置控制模式。
171 *
172 * @return 成功返回0;失败返回错误码
173 * AUBO_BUSY
174 * AUBO_BAD_STATE
175 * -AUBO_BAD_STATE
176 *
177 * @throws arcs::common_interface::AuboException
178 *
179 * @par Python函数原型
180 * fcDisable(self: pyaubo_sdk.ForceControl) -> int
181 *
182 * @par Lua函数原型
183 * fcDisable() -> nil
184 *
185 * @par Lua示例
186 * fcDisable()
187 *
188 * @par JSON-RPC请求示例
189 * {"jsonrpc":"2.0","method":"rob1.ForceControl.fcDisable","params":[],"id":1}
190 *
191 * @par JSON-RPC响应示例
192 * {"id":1,"jsonrpc":"2.0","result":0}
193 * \endchinese
194 *
195 * \english
196 * End force control
197 *
198 * fcDisable is used to disable Force Control. After a successful
199 * deactivation the robot is back in position control.
200 *
201 * @return Return 0 if succeeded; return error code if failed
202 * AUBO_BUSY
203 * AUBO_BAD_STATE
204 * -AUBO_BAD_STATE
205 *
206 * @throws arcs::common_interface::AuboException
207 *
208 * @par Python Function Prototype
209 * fcDisable(self: pyaubo_sdk.ForceControl) -> int
210 *
211 * @par Lua Function Prototype
212 * fcDisable() -> nil
213 *
214 * @par Lua example
215 * fcDisable()
216 *
217 * @par JSON-RPC Request example
218 * {"jsonrpc":"2.0","method":"rob1.ForceControl.fcDisable","params":[],"id":1}
219 *
220 * @par JSON-RPC Response example
221 * {"id":1,"jsonrpc":"2.0","result":0}
222 * \endenglish
223 */
224
226
227 /**
228 * \chinese
229 * 判断力控是否被使能
230 *
231 * @return 使能返回true,失能返回false
232 *
233 * @throws arcs::common_interface::AuboException
234 *
235 * @par Python函数原型
236 * isFcEnabled(self: pyaubo_sdk.ForceControl) -> bool
237 *
238 * @par Lua函数原型
239 * isFcEnabled() -> boolean
240 *
241 * @par Lua示例
242 * Fc_status = isFcEnabled()
243 *
244 * @par JSON-RPC请求示例
245 * {"jsonrpc":"2.0","method":"rob1.ForceControl.isFcEnabled","params":[],"id":1}
246 *
247 * @par JSON-RPC响应示例
248 * {"id":1,"jsonrpc":"2.0","result":false}
249 * \endchinese
250 *
251 * \english
252 * Check if force control is enabled
253 *
254 * @return Returns true if enabled, false if disabled
255 *
256 * @throws arcs::common_interface::AuboException
257 *
258 * @par Python Function Prototype
259 * isFcEnabled(self: pyaubo_sdk.ForceControl) -> bool
260 *
261 * @par Lua Function Prototype
262 * isFcEnabled() -> boolean
263 *
264 * @par Lua example
265 * Fc_status = isFcEnabled()
266 *
267 * @par JSON-RPC Request example
268 * {"jsonrpc":"2.0","method":"rob1.ForceControl.isFcEnabled","params":[],"id":1}
269 *
270 * @par JSON-RPC Response example
271 * {"id":1,"jsonrpc":"2.0","result":false}
272 * \endenglish
273 */
275
276 /**
277 * \chinese
278 * 设置力控参考(目标)值
279 *
280 * @param feature: 参考几何特征,用于生成力控参考坐标系
281 * @param compliance: 柔性轴(方向)选择
282 * @param wrench: 目标力/力矩
283 * @param limits: 速度限制
284 * @param type: 力控参考坐标系类型
285 *
286 * 使用说明:
287 * 1. 基坐标系:
288 * feature = {0,0,0,0,0,0}
289 * type = TaskFrameType::NONE
290 *
291 * 2. 法兰坐标系:
292 * feature = {0,0,0,0,0,0}
293 * type = TaskFrameType::TOOL_FORCE
294 *
295 * 3. TCP坐标系:
296 * feature = tcp_offset
297 * type = TaskFrameType::TOOL_FORCE
298 *
299 * 4. 用户坐标系(FRAME_FORCE):
300 * type = TaskFrameType::FRAME_FORCE
301 * feature 设为用户定义的参考坐标,例如 getTcpPose() 表示以当前 TCP 坐标作为力控坐标系。
302 *
303 * @return 成功返回0;失败返回错误码
304 * AUBO_BUSY
305 * AUBO_BAD_STATE
306 * -AUBO_INVL_ARGUMENT
307 * -AUBO_BAD_STATE
308 *
309 * @throws arcs::common_interface::AuboException
310 *
311 * @par Python函数原型
312 * setTargetForce(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
313 * List[bool], arg2: List[float], arg3: List[float], arg4:
314 * arcs::common_interface::TaskFrameType) -> int
315 *
316 * @par Lua函数原型
317 * setTargetForce(feature: table, compliance: table, wrench: table, limits:
318 * table, type: number) -> nil
319 *
320 * @par Lua示例
321 * setTargetForce({0,0,0,0,0,0},{true,false,false,false,false,false},{10,0,0,0,0,0},{0,0,0,0,0,0},4)
322 *
323 * \endchinese
324 * \english
325 * Set force control reference (target) value
326 *
327 * @param feature: Reference geometric feature for generating force control reference frame
328 * @param compliance: Compliance axis (direction) selection
329 * @param wrench: Target force/torque
330 * @param limits: Velocity limits
331 * @param type: Force control reference frame type
332 *
333 * Usage Examples:
334 * 1. Base Coordinate Frame:
335 * feature = {0,0,0,0,0,0}
336 * type = TaskFrameType::NONE
337 *
338 * 2. Flange Coordinate Frame:
339 * feature = {0,0,0,0,0,0}
340 * type = TaskFrameType::TOOL_FORCE
341 *
342 * 3. TCP Coordinate Frame:
343 * feature = tcp_offset
344 * type = TaskFrameType::TOOL_FORCE
345 *
346 * 4. User Coordinate Frame (FRAME_FORCE):
347 * type = TaskFrameType::FRAME_FORCE
348 * feature should be the user-defined reference frame,
349 * for example, getTcpPose() means setting the force control frame to current TCP pose.
350 *
351 * @return Return 0 if succeeded; return error code if failed
352 * AUBO_BUSY
353 * AUBO_BAD_STATE
354 * -AUBO_INVL_ARGUMENT
355 * -AUBO_BAD_STATE
356 *
357 * @throws arcs::common_interface::AuboException
358 *
359 * @par Python Function Prototype
360 * setTargetForce(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
361 * List[bool], arg2: List[float], arg3: List[float], arg4:
362 * arcs::common_interface::TaskFrameType) -> int
363 *
364 * @par Lua Function Prototype
365 * setTargetForce(feature: table, compliance: table, wrench: table, limits:
366 * table, type: number) -> nil
367 *
368 * @par Lua example
369 * setTargetForce({0,0,0,0,0,0},{true,false,false,false,false,false},{10,0,0,0,0,0},{0,0,0,0,0,0},4)
370 *
371 * \endenglish
372 */
373 int setTargetForce(const std::vector<double> &feature,
374 const std::vector<bool> &compliance,
375 const std::vector<double> &wrench,
376 const std::vector<double> &limits,
377 TaskFrameType type = TaskFrameType::FRAME_FORCE);
378
379 /**
380 * \chinese
381 * 设置力控动力学模型
382 *
383 * @param env_stiff: 环境刚度,表示为接触轴方向上的工件刚度,取值范围[0, 1],默认为0
384 * @param damp_scale: 表征阻尼水平的参数,取值范围[0, 1],默认为0.5
385 * @param stiff_scale: 表征软硬程度的参数,取值范围[0, 1],默认为0.5
386 *
387 * @return 成功返回0;失败返回错误码
388 * AUBO_BUSY
389 * AUBO_BAD_STATE
390 * -AUBO_INVL_ARGUMENT
391 * -AUBO_BAD_STATE
392 *
393 * @throws arcs::common_interface::AuboException
394 *
395 * @par Python函数原型
396 * setDynamicModel1(self: pyaubo_sdk.ForceControl, arg0: List[float],
397 * arg1: List[float], arg2: List[float]) -> int
398 *
399 * @par Lua函数原型
400 * setDynamicModel1(env_stiff: table, damp_scale: table, stiff_scale:
401 * table) -> nil
402 *
403 * @par Lua示例
404 * setDynamicModel1({0,0,0,0,0,0},{0.5,0.5,0.5,0.5,0.5,0.5},{0.5,0.5,0.5,0.5,0.5,0.5})
405 *
406 * \endchinese
407 * \english
408 * Set force control dynamics model
409 *
410 * @param env_stiff: Environment stiffness, representing the workpiece stiffness in the contact axis direction, range [0, 1], default 0
411 * @param damp_scale: Parameter representing damping level, range [0, 1], default 0.5
412 * @param stiff_scale: Parameter representing stiffness level, range [0, 1], default 0.5
413 *
414 * @return Return 0 if succeeded; return error code if failed
415 * AUBO_BUSY
416 * AUBO_BAD_STATE
417 * -AUBO_INVL_ARGUMENT
418 * -AUBO_BAD_STATE
419 *
420 * @throws arcs::common_interface::AuboException
421 *
422 * @par Python Function Prototype
423 * setDynamicModel1(self: pyaubo_sdk.ForceControl, arg0: List[float],
424 * arg1: List[float], arg2: List[float]) -> int
425 *
426 * @par Lua Function Prototype
427 * setDynamicModel1(env_stiff: table, damp_scale: table, stiff_scale:
428 * table) -> nil
429 *
430 * @par Lua example
431 * setDynamicModel1({0,0,0,0,0,0},{0.5,0.5,0.5,0.5,0.5,0.5},{0.5,0.5,0.5,0.5,0.5,0.5})
432 *
433 * \endenglish
434 */
435 int setDynamicModel1(const std::vector<double> &env_stiff,
436 const std::vector<double> &damp_scale,
437 const std::vector<double> &stiff_scale);
438
439 /**
440 * \chinese
441 * 计算力控动力学模型
442 *
443 * @param env_stiff: 环境刚度,表示为接触轴方向上的工件刚度,取值范围[0, 1],默认为0
444 * @param damp_scale: 表征阻尼水平的参数,取值范围[0, 1],默认为0.5
445 * @param stiff_scale: 表征软硬程度的参数,取值范围[0, 1],默认为0.5
446 *
447 * @return 力控动力学模型MDK
448 * AUBO_BUSY
449 * AUBO_BAD_STATE
450 * -AUBO_INVL_ARGUMENT
451 * -AUBO_BAD_STATE
452 *
453 * @throws arcs::common_interface::AuboException
454 *
455 * @par Python函数原型
456 * fcCalDynamicModel(self: pyaubo_sdk.ForceControl, arg0: List[float],
457 * arg1: List[float], arg2: List[float]) -> Tuple[List[float], List[float], List[float]]
458 *
459 * @par Lua函数原型
460 * fcCalDynamicModel(env_stiff: table, damp_scale: table, stiff_scale: table) -> table
461 *
462 * @par Lua示例
463 * fc_table = fcCalDynamicModel({0,0,0,0,0,0},{0.5,0.5,0.5,0.5,0.5,0.5},{0.5,0.5,0.5,0.5,0.5,0.5})
464 *
465 * \endchinese
466 * \english
467 * Calculate force control dynamics model
468 *
469 * @param env_stiff: Environment stiffness, representing the workpiece stiffness in the contact axis direction, range [0, 1], default 0
470 * @param damp_scale: Parameter representing damping level, range [0, 1], default 0.5
471 * @param stiff_scale: Parameter representing stiffness level, range [0, 1], default 0.5
472 *
473 * @return Force control dynamics model MDK
474 * AUBO_BUSY
475 * AUBO_BAD_STATE
476 * -AUBO_INVL_ARGUMENT
477 * -AUBO_BAD_STATE
478 *
479 * @throws arcs::common_interface::AuboException
480 *
481 * @par Python Function Prototype
482 * fcCalDynamicModel(self: pyaubo_sdk.ForceControl, arg0: List[float],
483 * arg1: List[float], arg2: List[float]) -> Tuple[List[float], List[float], List[float]]
484 *
485 * @par Lua Function Prototype
486 * fcCalDynamicModel(env_stiff: table, damp_scale: table, stiff_scale: table) -> table
487 *
488 * @par Lua example
489 * fc_table = fcCalDynamicModel({0,0,0,0,0,0},{0.5,0.5,0.5,0.5,0.5,0.5},{0.5,0.5,0.5,0.5,0.5,0.5})
490 *
491 * \endenglish
492 */
493 DynamicsModel fcCalDynamicModel(const std::vector<double> &env_stiff,
494 const std::vector<double> &damp_scale,
495 const std::vector<double> &stiff_scale);
496
497 /**
498 * \chinese
499 * 设置力控搜孔场景下的动力学模型
500 *
501 * @param damp_scale: 表征阻尼水平的参数,取值范围[0, 1],默认为0.5
502 * @param stiff_scale: 表征软硬程度的参数,取值范围[0, 1],默认为0.5
503 *
504 * @return 成功返回0;失败返回错误码
505 * AUBO_BUSY
506 * AUBO_BAD_STATE
507 * -AUBO_INVL_ARGUMENT
508 * -AUBO_BAD_STATE
509 *
510 * @throws arcs::common_interface::AuboException
511 *
512 * @par Python函数原型
513 * setDynamicModelSearch(self: pyaubo_sdk.ForceControl, arg0: List[float],
514 * arg1: List[float]) -> int
515 *
516 * @par Lua函数原型
517 * setDynamicModelSearch(damp_scale: table, stiff_scale: table) -> nil
518 *
519 * @par Lua示例
520 * setDynamicModelSearch({0.5,0.5,0.5,0.5,0.5,0.5},{0.5,0.5,0.5,0.5,0.5,0.5})
521 *
522 * \endchinese
523 * \english
524 * Set force control dynamics model for hole searching scenario
525 *
526 * @param damp_scale: Parameter representing damping level, range [0, 1], default 0.5
527 * @param stiff_scale: Parameter representing stiffness level, range [0, 1], default 0.5
528 *
529 * @return Return 0 if succeeded; return error code if failed
530 * AUBO_BUSY
531 * AUBO_BAD_STATE
532 * -AUBO_INVL_ARGUMENT
533 * -AUBO_BAD_STATE
534 *
535 * @throws arcs::common_interface::AuboException
536 *
537 * @par Python Function Prototype
538 * setDynamicModelSearch(self: pyaubo_sdk.ForceControl, arg0: List[float],
539 * arg1: List[float]) -> int
540 *
541 * @par Lua Function Prototype
542 * setDynamicModelSearch(damp_scale: table, stiff_scale: table) -> nil
543 *
544 * @par Lua example
545 * setDynamicModelSearch({0.5,0.5,0.5,0.5,0.5,0.5},{0.5,0.5,0.5,0.5,0.5,0.5})
546 *
547 * \endenglish
548 */
549 int setDynamicModelSearch(const std::vector<double> &damp_scale,
550 const std::vector<double> &stiff_scale);
551
552 /**
553 * \chinese
554 * 设置力控插/拔孔场景下的动力学模型
555 *
556 * @param damp_scale: 表征阻尼水平的参数,取值范围[0, 1],默认为0.5
557 * @param stiff_scale: 表征软硬程度的参数,取值范围[0, 1],默认为0.5
558 *
559 * @return 成功返回0;失败返回错误码
560 * AUBO_BUSY
561 * AUBO_BAD_STATE
562 * -AUBO_INVL_ARGUMENT
563 * -AUBO_BAD_STATE
564 *
565 * @throws arcs::common_interface::AuboException
566 *
567 * @par Python函数原型
568 * setDynamicModelInsert(self: pyaubo_sdk.ForceControl, arg0: List[float],
569 * arg1: List[float]) -> int
570 *
571 * @par Lua函数原型
572 * setDynamicModelInsert(damp_scale: table, stiff_scale: table) -> nil
573 *
574 * @par Lua示例
575 * setDynamicModelInsert({0.5,0.5,0.5,0.5,0.5,0.5},{0.5,0.5,0.5,0.5,0.5,0.5})
576 *
577 * \endchinese
578 * \english
579 * Set force control dynamics model for insertion/extraction scenario
580 *
581 * @param damp_scale: Parameter representing damping level, range [0, 1], default 0.5
582 * @param stiff_scale: Parameter representing stiffness level, range [0, 1], default 0.5
583 *
584 * @return Return 0 if succeeded; return error code if failed
585 * AUBO_BUSY
586 * AUBO_BAD_STATE
587 * -AUBO_INVL_ARGUMENT
588 * -AUBO_BAD_STATE
589 *
590 * @throws arcs::common_interface::AuboException
591 *
592 * @par Python Function Prototype
593 * setDynamicModelInsert(self: pyaubo_sdk.ForceControl, arg0: List[float],
594 * arg1: List[float]) -> int
595 *
596 * @par Lua Function Prototype
597 * setDynamicModelInsert(damp_scale: table, stiff_scale: table) -> nil
598 *
599 * @par Lua example
600 * setDynamicModelInsert({0.5,0.5,0.5,0.5,0.5,0.5},{0.5,0.5,0.5,0.5,0.5,0.5})
601 *
602 * \endenglish
603 */
604 int setDynamicModelInsert(const std::vector<double> &damp_scale,
605 const std::vector<double> &stiff_scale);
606 /**
607 * \chinese
608 * 设置力控接触场景下的动力学模型
609 *
610 * @param env_stiff: 表征环境刚度的参数,取值范围[0, 1],默认为0
611 * @param damp_scale: 表征阻尼水平的参数,取值范围[0, 1],默认为0.5
612 * @param stiff_scale: 表征软硬程度的参数,取值范围[0, 1],默认为0.5
613 *
614 * @return 成功返回0;失败返回错误码
615 * AUBO_BUSY
616 * AUBO_BAD_STATE
617 * -AUBO_INVL_ARGUMENT
618 * -AUBO_BAD_STATE
619 *
620 * @throws arcs::common_interface::AuboException
621 *
622 * @par Python函数原型
623 * setDynamicModelContact(self: pyaubo_sdk.ForceControl, arg0: List[float],
624 * arg1: List[float], arg2: List[float]) -> int
625 *
626 * @par Lua函数原型
627 * setDynamicModelContact(env_stiff: table, damp_scale: table, stiff_scale:
628 * table) -> nil
629 *
630 * @par Lua示例
631 * setDynamicModelContact({0,0,0,0,0,0},{0.5,0.5,0.5,0.5,0.5,0.5},{0.5,0.5,0.5,0.5,0.5,0.5})
632 *
633 * \endchinese
634 * \english
635 * Set force control dynamics model for contact scenario
636 *
637 * @param env_stiff: Parameter representing environment stiffness, range [0, 1], default 0
638 * @param damp_scale: Parameter representing damping level, range [0, 1], default 0.5
639 * @param stiff_scale: Parameter representing stiffness level, range [0, 1], default 0.5
640 *
641 * @return Return 0 if succeeded; return error code if failed
642 * AUBO_BUSY
643 * AUBO_BAD_STATE
644 * -AUBO_INVL_ARGUMENT
645 * -AUBO_BAD_STATE
646 *
647 * @throws arcs::common_interface::AuboException
648 *
649 * @par Python Function Prototype
650 * setDynamicModelContact(self: pyaubo_sdk.ForceControl, arg0: List[float],
651 * arg1: List[float], arg2: List[float]) -> int
652 *
653 * @par Lua Function Prototype
654 * setDynamicModelContact(env_stiff: table, damp_scale: table, stiff_scale:
655 * table) -> nil
656 *
657 * @par Lua example
658 * setDynamicModelContact({0,0,0,0,0,0},{0.5,0.5,0.5,0.5,0.5,0.5},{0.5,0.5,0.5,0.5,0.5,0.5})
659 *
660 * \endenglish
661 */
662 int setDynamicModelContact(const std::vector<double> &env_stiff,
663 const std::vector<double> &damp_scale,
664 const std::vector<double> &stiff_scale);
665
666 /**
667 * \chinese
668 * 设置力控动力学模型
669 *
670 * @param m 质量参数
671 * @param d 阻尼参数
672 * @param k 刚度参数
673 *
674 * 参数单位说明:
675 * - 质量:
676 * - 笛卡尔空间:单位为 kg,长度为工作空间维度(一般为6),顺序为 [x, y, z, Rx, Ry, Rz]
677 * - 关节空间:单位为 kg·m²,长度为机器人自由度(一般为6),顺序为 [J1, J2, J3, J4, J5, J6]
678 * - 阻尼:
679 * - 笛卡尔空间:单位为 N·s/m,顺序为 [x, y, z, Rx, Ry, Rz]
680 * - 关节空间:单位为 N·m·s/rad,顺序为 [J1, J2, J3, J4, J5, J6]
681 * - 刚度:
682 * - 笛卡尔空间:单位为 N/m,顺序为 [x, y, z, Rx, Ry, Rz]
683 * - 关节空间:单位为 N·m/rad,顺序为 [J1, J2, J3, J4, J5, J6]
684 *
685 * @return 成功返回0;失败返回错误码
686 * AUBO_BUSY
687 * AUBO_BAD_STATE
688 * -AUBO_INVL_ARGUMENT
689 * -AUBO_BAD_STATE
690 *
691 * @throws arcs::common_interface::AuboException
692 *
693 * @par Python函数原型
694 * setDynamicModel(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
695 * List[float], arg2: List[float]) -> int
696 *
697 * @par Lua函数原型
698 * setDynamicModel(m: table, d: table, k: table) -> nil
699 *
700 * @par Lua示例
701 * setDynamicModel({20.0, 20.0, 20.0, 10.0, 10.0, 10.0},{2000, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0})
702 *
703 * \endchinese
704 * \english
705 * Set force control dynamics model
706 *
707 * @param m Mass parameters
708 * @param d Damping parameters
709 * @param k Stiffness parameters
710 *
711 * Parameter unit description:
712 * - Mass:
713 * - Cartesian space: unit is kg, length is 6, order is [x, y, z, Rx, Ry, Rz]
714 * - Joint space: unit is kg·m², length is 6, order is [J1, J2, J3, J4, J5, J6]
715 * - Damping:
716 * - Cartesian space: unit is N·s/m, order is [x, y, z, Rx, Ry, Rz]
717 * - Joint space: unit is N·m·s/rad, order is [J1, J2, J3, J4, J5, J6]
718 * - Stiffness:
719 * - Cartesian space: unit is N/m, order is [x, y, z, Rx, Ry, Rz]
720 * - Joint space: unit is N·m/rad, order is [J1, J2, J3, J4, J5, J6]
721 *
722 * @return Return 0 if succeeded; return error code if failed
723 * AUBO_BUSY
724 * AUBO_BAD_STATE
725 * -AUBO_INVL_ARGUMENT
726 * -AUBO_BAD_STATE
727 *
728 * @throws arcs::common_interface::AuboException
729 *
730 * @par Python Function Prototype
731 * setDynamicModel(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
732 * List[float], arg2: List[float]) -> int
733 *
734 * @par Lua Function Prototype
735 * setDynamicModel(m: table, d: table, k: table) -> nil
736 *
737 * @par Lua example
738 * setDynamicModel({20.0, 20.0, 20.0, 10.0, 10.0, 10.0},{2000, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0})
739 *
740 * \endenglish
741 */
742 int setDynamicModel(const std::vector<double> &m,
743 const std::vector<double> &d,
744 const std::vector<double> &k);
745
746 /**
747 * \chinese
748 * 设置力控阈值
749 *
750 * @param thresholds: 力控阈值
751 *
752 * @return 成功返回0;失败返回错误码
753 * AUBO_BUSY
754 * AUBO_BAD_STATE
755 * -AUBO_INVL_ARGUMENT
756 * -AUBO_BAD_STATE
757 *
758 * @throws arcs::common_interface::AuboException
759 *
760 * @par Python函数原型
761 * fcSetSensorThresholds(self: pyaubo_sdk.ForceControl, arg0:
762 * List[float]) -> int
763 *
764 * @par Lua函数原型
765 * fcSetSensorThresholds(thresholds: table) -> nil
766 *
767 * @par Lua示例
768 * fcSetSensorThresholds({1.0,1.0,1.0,0.5,0.5,0.5})
769 *
770 * \endch
771 * \endchinese
772 * \english
773 * Set force control thresholds
774 *
775 * @param thresholds: Force control thresholds
776 *
777 * @return Return 0 if succeeded; return error code if failed
778 * AUBO_BUSY
779 * AUBO_BAD_STATE
780 * -AUBO_INVL_ARGUMENT
781 * -AUBO_BAD_STATE
782 *
783 * @throws arcs::common_interface::AuboException
784 *
785 * @par Python Function Prototype
786 * fcSetSensorThresholds(self: pyaubo_sdk.ForceControl, arg0:
787 * List[float]) -> int
788 *
789 * @par Lua Function Prototype
790 * fcSetSensorThresholds(thresholds: table) -> nil
791 *
792 * @par Lua example
793 * fcSetSensorThresholds({1.0,1.0,1.0,0.5,0.5,0.5})
794 *
795 * \endenglish
796 */
797 int fcSetSensorThresholds(const std::vector<double> &thresholds);
798
799 /**
800 * \chinese
801 * 设置力控最大受力限制
802 *
803 * @param limits: 力限制
804 *
805 * @return 成功返回0;失败返回错误码
806 * AUBO_BUSY
807 * AUBO_BAD_STATE
808 * -AUBO_INVL_ARGUMENT
809 * -AUBO_BAD_STATE
810 *
811 * @throws arcs::common_interface::AuboException
812 *
813 * @par Python函数原型
814 * fcSetSensorLimits(self: pyaubo_sdk.ForceControl, arg0:
815 * List[float]) -> int
816 *
817 * @par Lua函数原型
818 * fcSetSensorLimits(limits: table) -> nil
819 *
820 * @par Lua示例
821 * fcSetSensorLimits({200.0,200.0,200.0,50.0,50.0,50.0})
822 *
823 * \endchinese
824 * \english
825 * Set force control maximum force limits
826 *
827 * @param limits: Force limits
828 *
829 * @return Return 0 if succeeded; return error code if failed
830 * AUBO_BUSY
831 * AUBO_BAD_STATE
832 * -AUBO_INVL_ARGUMENT
833 * -AUBO_BAD_STATE
834 *
835 * @throws arcs::common_interface::AuboException
836 *
837 * @par Python Function Prototype
838 * fcSetSensorLimits(self: pyaubo_sdk.ForceControl, arg0:
839 * List[float]) -> int
840 *
841 * @par Lua Function Prototype
842 * fcSetSensorLimits(limits: table) -> nil
843 *
844 * @par Lua example
845 * fcSetSensorLimits({200.0,200.0,200.0,50.0,50.0,50.0})
846 *
847 * \endenglish
848 */
849 int fcSetSensorLimits(const std::vector<double> &limits);
850
851 /**
852 * \chinese
853 * 获取力控阈值
854 *
855 * @return 力控最小力阈值
856 *
857 * @throws arcs::common_interface::AuboException
858 *
859 * @par Python函数原型
860 * getFcSensorThresholds(self: pyaubo_sdk.ForceControl) -> list
861 *
862 * @par Lua函数原型
863 * getFcSensorThresholds() -> table
864 *
865 * @par Lua函数示例
866 * Fc_Thresholds = getFcSensorThresholds()
867 *
868 * \endchinese
869 * \english
870 * Get force control thresholds
871 *
872 * @return Minimum force control thresholds
873 *
874 * @throws arcs::common_interface::AuboException
875 *
876 * @par Python Function Prototype
877 * getFcSensorThresholds(self: pyaubo_sdk.ForceControl) -> list
878 *
879 * @par Lua Function Prototype
880 * getFcSensorThresholds() -> table
881 *
882 * @par Lua example
883 * Fc_Thresholds = getFcSensorThresholds()
884 *
885 * \endenglish
886 */
887 std::vector<double> getFcSensorThresholds();
888
889 /**
890 * \chinese
891 * 获取最大力限制
892 *
893 * @return 力控最大力限制
894 *
895 * @throws arcs::common_interface::AuboException
896 *
897 * @par Python函数原型
898 * getFcSensorLimits(self: pyaubo_sdk.ForceControl) -> list
899 *
900 * @par Lua函数原型
901 * getFcSensorLimits() -> table
902 *
903 * @par Lua示例
904 * Fc_Limits = getFcSensorLimits()
905 *
906 * \endchinese
907 * \english
908 * Get maximum force limits
909 *
910 * @return Force control maximum force limits
911 *
912 * @throws arcs::common_interface::AuboException
913 *
914 * @par Python Function Prototype
915 * getFcSensorLimits(self: pyaubo_sdk.ForceControl) -> list
916 *
917 * @par Lua Function Prototype
918 * getFcSensorLimits() -> table
919 *
920 * @par Lua example
921 * Fc_Limits = getFcSensorLimits()
922 *
923 * \endenglish
924 */
925 std::vector<double> getFcSensorLimits();
926
927 /**
928 * \chinese
929 * 获取力控动力学模型
930 *
931 * @return 力控动力学模型
932 *
933 * @throws arcs::common_interface::AuboException
934 *
935 * @par Python函数原型
936 * getDynamicModel(self: pyaubo_sdk.ForceControl) -> Tuple[List[float],
937 * List[float], List[float]]
938 *
939 * @par Lua函数原型
940 * getDynamicModel() -> table
941 *
942 * @par Lua示例
943 * Fc_Model = getDynamicModel()
944 *
945 * @par JSON-RPC请求示例
946 * {"jsonrpc":"2.0","method":"rob1.ForceControl.getDynamicModel","params":[],"id":1}
947 *
948 * @par JSON-RPC响应示例
949 * {"id":1,"jsonrpc":"2.0","result":[[],[20.0,20.0,20.0,5.0,5.0,5.0],[]]}
950 * \endchinese
951 * \english
952 * Get force control dynamics model
953 *
954 * @return Force control dynamics model
955 *
956 * @throws arcs::common_interface::AuboException
957 *
958 * @par Python Function Prototype
959 * getDynamicModel(self: pyaubo_sdk.ForceControl) -> Tuple[List[float],
960 * List[float], List[float]]
961 *
962 * @par Lua Function Prototype
963 * getDynamicModel() -> table
964 *
965 * @par Lua example
966 * Fc_Model = getDynamicModel()
967 *
968 * @par JSON-RPC Request example
969 * {"jsonrpc":"2.0","method":"rob1.ForceControl.getDynamicModel","params":[],"id":1}
970 *
971 * @par JSON-RPC Response example
972 * {"id":1,"jsonrpc":"2.0","result":[[],[20.0,20.0,20.0,5.0,5.0,5.0],[]]}
973 * \endenglish
974 */
976
977 /**
978 * \chinese
979 * 设置力控终止条件:力,当测量的力在设置的范围之内,力控算法将保持运行,直到设置的条件不满足,力控将退出
980 *
981 * The condition is lateractivated by calling the instruction
982 * FCCondWaitWhile, which will wait and hold the program execution while the
983 * specified condition is true. This allows the reference force, torque and
984 * movement to continue until the force is outside the specified limits.
985 *
986 * A force condition is set up by defining minimum and maximum limits for
987 * the force in the directions of the force control coordinate system. Once
988 * activated with FCCondWaitWhile, the program execution will continue to
989 * wait while the measured force is within its specified limits.
990 *
991 * It is possible to specify that the condition is fulfilled when the force
992 * is outside the specified limits instead. This is done by using the switch
993 * argument Outside. The condition on force is specified in the force
994 * control coordinate system. This coordinate system is setup by the user in
995 * the instruction FCAct.
996 *
997 * @param min 各方向最小的力/力矩
998 * @param max 各方向最大的力/力矩
999 * @param outside false 在设置条件的范围之内有效
1000 * true 在设置条件的范围之外有效
1001 * @param timeout
1002 * 时间限制,单位s(秒),从开始力控到达该时间时,不管是否满足力控终止条件,都会终止力控
1003 *
1004 * @return 成功返回0;失败返回错误码
1005 * AUBO_BUSY
1006 * AUBO_BAD_STATE
1007 * -AUBO_INVL_ARGUMENT
1008 * -AUBO_BAD_STATE
1009 *
1010 * @throws arcs::common_interface::AuboException
1011 *
1012 * @par Python函数原型
1013 * setCondForce(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1014 * List[float], arg2: bool, arg3: float) -> int
1015 *
1016 * @par Lua函数原型
1017 * setCondForce(min: table, max: table, outside: boolean, timeout: number)
1018 * -> nil
1019 * @par Lua示例
1020 * setCondForce({0.1,0.1,0.1,0.1,0.1,0.1},{50,50,50,5,5,5},{true,true,true,true,true,true},10)
1021 *
1022 * \endchinese
1023 * \english
1024 * Set force control termination condition: Force. When the measured force is within
1025 * the specified range, the force control algorithm will continue to run until the set
1026 * condition is not met, at which point force control will exit.
1027 *
1028 * The condition is lateractivated by calling the instruction
1029 * FCCondWaitWhile, which will wait and hold the program execution while the
1030 * specified condition is true. This allows the reference force, torque and
1031 * movement to continue until the force is outside the specified limits.
1032 *
1033 * A force condition is set up by defining minimum and maximum limits for
1034 * the force in the directions of the force control coordinate system. Once
1035 * activated with FCCondWaitWhile, the program execution will continue to
1036 * wait while the measured force is within its specified limits.
1037 *
1038 * It is possible to specify that the condition is fulfilled when the force
1039 * is outside the specified limits instead. This is done by using the switch
1040 * argument Outside. The condition on force is specified in the force
1041 * control coordinate system. This coordinate system is setup by the user in
1042 * the instruction FCAct.
1043 *
1044 * @param min Minimum force/torque in each direction
1045 * @param max Maximum force/torque in each direction
1046 * @param outside false: valid within the specified range
1047 * true: valid outside the specified range
1048 * @param timeout
1049 * Time limit in seconds; when this time is reached from the start of force control,
1050 * force control will terminate regardless of whether the end condition is met
1051 *
1052 * @return Return 0 if succeeded; return error code if failed
1053 * AUBO_BUSY
1054 * AUBO_BAD_STATE
1055 * -AUBO_INVL_ARGUMENT
1056 * -AUBO_BAD_STATE
1057 *
1058 * @throws arcs::common_interface::AuboException
1059 *
1060 * @par Python Function Prototype
1061 * setCondForce(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1062 * List[float], arg2: bool, arg3: float) -> int
1063 *
1064 * @par Lua Function Prototype
1065 * setCondForce(min: table, max: table, outside: boolean, timeout: number)
1066 * -> nil
1067 * @par Lua example
1068 * setCondForce({0.1,0.1,0.1,0.1,0.1,0.1},{50,50,50,5,5,5},{true,true,true,true,true,true},10)
1069 *
1070 * \endenglish
1071 */
1072 int setCondForce(const std::vector<double> &min,
1073 const std::vector<double> &max, bool outside,
1074 double timeout);
1075
1076 /**
1077 * \chinese
1078 * 设置力控终止条件:姿态,当测量的姿态在设置的范围之内,力控算法将保持运行,直到设置的条件不满足,力控将退出.
1079 *
1080 * setCondOrient is used to set up an end condition for the tool orientation.
1081 * The condition is lateractivated by calling the instruction
1082 * FCCondWaitWhile, which will wait and hold the program execution while the
1083 * specified condition is true. This allows the reference force, torque and
1084 * movement to continue until the orientation is outside the specified
1085 * limits.
1086 *
1087 * An orientation condition is set up by defining a maximum angle and a
1088 * maximum rotation from a reference orientation. The reference orientation
1089 * is either defined by the current z direction of the tool, or by
1090 * specifying an orientation in relation to the z direction of the work
1091 * object.
1092 *
1093 * Once activated, the tool orientation must be within the limits (or
1094 * outside, if the argument Outside is used).
1095 *
1096 * @param frame
1097 * @param max_angle
1098 * @param max_rot
1099 * @param outside
1100 * @param timeout
1101 *
1102 * @return 成功返回0;失败返回错误码
1103 * AUBO_BUSY
1104 * AUBO_BAD_STATE
1105 * -AUBO_INVL_ARGUMENT
1106 * -AUBO_BAD_STATE
1107 *
1108 * @throws arcs::common_interface::AuboException
1109 *
1110 * @par Python函数原型
1111 * setCondOrient(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1112 * float, arg2: float, arg3: bool, arg4: float) -> int
1113 *
1114 * @par Lua函数原型
1115 * setCondOrient(frame: table, max_angle: number, max_rot: number, outside:
1116 * boolean, timeout: number) -> nil
1117 *
1118 * @par Lua示例
1119 * setCondOrient({0.1, 0.3, 0.1, 0.3142, 0.0, 1.571},30.0,20.0,true,10.0)
1120 *
1121 * \endchinese
1122 *
1123 * \english
1124 * setCondOrient is used to set up an end condition for the tool orientation.
1125 * The condition will wait and hold the program execution while the
1126 * specified condition is true. This allows the reference force, torque and
1127 * movement to continue until the orientation is outside the specified
1128 * limits.
1129 *
1130 * An orientation condition is set up by defining a maximum angle and a
1131 * maximum rotation from a reference orientation. The reference orientation
1132 * is either defined by the current z direction of the tool, or by
1133 * specifying an orientation in relation to the z direction of the work
1134 * object.
1135 *
1136 * Once activated, the tool orientation must be within the limits (or
1137 * outside, if the argument Outside is used).
1138 *
1139 * @param frame
1140 * @param max_angle
1141 * @param max_rot
1142 * @param outside
1143 * @param timeout
1144 *
1145 * @return Return 0 if succeeded; return error code if failed
1146 * AUBO_BUSY
1147 * AUBO_BAD_STATE
1148 * -AUBO_INVL_ARGUMENT
1149 * -AUBO_BAD_STATE
1150 *
1151 * @throws arcs::common_interface::AuboException
1152 *
1153 * @par Python Function Prototype
1154 * setCondOrient(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1155 * float, arg2: float, arg3: bool, arg4: float) -> int
1156 *
1157 * @par Lua Function Prototype
1158 * setCondOrient(frame: table, max_angle: number, max_rot: number, outside:
1159 * boolean, timeout: number) -> nil
1160 *
1161 * @par Lua example
1162 * setCondOrient({0.1, 0.3, 0.1, 0.3142, 0.0, 1.571},30.0,20.0,true,10.0)
1163 *
1164 * \endenglish
1165 */
1166 int setCondOrient(const std::vector<double> &frame, double max_angle,
1167 double max_rot, bool outside, double timeout);
1168
1169 /**
1170 * \chinese
1171 * 指定力控有效平面,x-y平面,z方向有效
1172 *
1173 * @param plane={A,B,C,D}
1174 * 平面表示方法 Ax +By +Cz + D = 0
1175 * 其中,n = (A, B, C)是平面的法向量,
1176 * D 是将平面平移到坐标原点所需距离(所以D=0时,平面过原点)
1177 * @param timeout
1178 *
1179 * @return 成功返回0;失败返回错误码
1180 * AUBO_BUSY
1181 * AUBO_BAD_STATE
1182 * -AUBO_INVL_ARGUMENT
1183 * -AUBO_BAD_STATE
1184 *
1185 * @throws arcs::common_interface::AuboException
1186 *
1187 * @par Python函数原型
1188 * setCondPlane(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1189 * float) -> int
1190 *
1191 * @par Lua函数原型
1192 * setCondPlane(plane: table, timeout: number) -> nil
1193 *
1194 * @par Lua示例
1195 * setCondPlane({0.1, 0.3, 0.1, 0.3},10.0)
1196 *
1197 * \endchinese
1198 * \english
1199 * Specify a valid force control plane, x-y plane, z direction is valid
1200 *
1201 * @param plane={A,B,C,D}
1202 * Plane equation: Ax + By + Cz + D = 0
1203 * where n = (A, B, C) is the normal vector of the plane,
1204 * D is the distance required to move the plane to the origin (so D=0 means the plane passes through the origin)
1205 * @param timeout
1206 *
1207 * @return Return 0 if succeeded; return error code if failed
1208 * AUBO_BUSY
1209 * AUBO_BAD_STATE
1210 * -AUBO_INVL_ARGUMENT
1211 * -AUBO_BAD_STATE
1212 *
1213 * @throws arcs::common_interface::AuboException
1214 *
1215 * @par Python Function Prototype
1216 * setCondPlane(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1217 * float) -> int
1218 *
1219 * @par Lua Function Prototype
1220 * setCondPlane(plane: table, timeout: number) -> nil
1221 *
1222 * @par Lua example
1223 * setCondPlane({0.1, 0.3, 0.1, 0.3},10.0)
1224 *
1225 * \endenglish
1226 */
1227 int setCondPlane(const std::vector<double> &plane, double timeout);
1228
1229 /**
1230 * \chinese
1231 * 指定力控有效圆柱体,提供中心轴和圆柱半径,可以指定圆柱内部还是外部
1232 *
1233 * @param axis
1234 * @param radius
1235 * @param outside
1236 * @param timeout
1237 *
1238 * @return 成功返回0;失败返回错误码
1239 * AUBO_BUSY
1240 * AUBO_BAD_STATE
1241 * -AUBO_INVL_ARGUMENT
1242 * -AUBO_BAD_STATE
1243 *
1244 * @throws arcs::common_interface::AuboException
1245 *
1246 * @par Python函数原型
1247 * setCondCylinder(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1248 * float, arg2: bool, arg3: float) -> int
1249 *
1250 * @par Lua函数原型
1251 * setCondCylinder(axis: table, radius: number, outside: boolean, timeout:
1252 * number) -> nil
1253 *
1254 * @par Lua示例
1255 * setCondCylinder({0,1,0},10.0,true,5,0)
1256 *
1257 * \endchinese
1258 * \english
1259 * Specify a valid force control cylinder by providing the central axis and cylinder radius, and specify whether the inside or outside of the cylinder is valid.
1260 *
1261 * @param axis
1262 * @param radius
1263 * @param outside
1264 * @param timeout
1265 *
1266 * @return Return 0 if succeeded; return error code if failed
1267 * AUBO_BUSY
1268 * AUBO_BAD_STATE
1269 * -AUBO_INVL_ARGUMENT
1270 * -AUBO_BAD_STATE
1271 *
1272 * @throws arcs::common_interface::AuboException
1273 *
1274 * @par Python Function Prototype
1275 * setCondCylinder(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1276 * float, arg2: bool, arg3: float) -> int
1277 *
1278 * @par Lua Function Prototype
1279 * setCondCylinder(axis: table, radius: number, outside: boolean, timeout:
1280 * number) -> nil
1281 *
1282 * @par Lua example
1283 * setCondCylinder({0,1,0},10.0,true,5,0)
1284 *
1285 * \endenglish
1286 */
1287 int setCondCylinder(const std::vector<double> &axis, double radius,
1288 bool outside, double timeout);
1289
1290 /**
1291 * \chinese
1292 * 指定力控有效球体,提供球心和半径,可以指定球体内部还是外部
1293 *
1294 * @param center
1295 * @param radius
1296 * @param outside
1297 * @param timeout
1298 *
1299 * @return 成功返回0;失败返回错误码
1300 * AUBO_BUSY
1301 * AUBO_BAD_STATE
1302 * -AUBO_INVL_ARGUMENT
1303 * -AUBO_BAD_STATE
1304 *
1305 * @throws arcs::common_interface::AuboException
1306 *
1307 * @par Python函数原型
1308 * setCondSphere(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1309 * float, arg2: bool, arg3: float) -> int
1310 *
1311 * @par Lua函数原型
1312 * setCondSphere(center: table, radius: number, outside: boolean, timeout:
1313 * number) -> nil
1314 *
1315 * @par Lua示例
1316 * setCondSphere({0.2, 0.5, 0.1, 1.57, 0, 0},10.0,true,5,0)
1317 *
1318 * \endchinese
1319 * \english
1320 * Specify a valid force control sphere by providing the center and radius, and specify whether the inside or outside of the sphere is valid.
1321 *
1322 * @param center
1323 * @param radius
1324 * @param outside
1325 * @param timeout
1326 *
1327 * @return Return 0 if succeeded; return error code if failed
1328 * AUBO_BUSY
1329 * AUBO_BAD_STATE
1330 * -AUBO_INVL_ARGUMENT
1331 * -AUBO_BAD_STATE
1332 *
1333 * @throws arcs::common_interface::AuboException
1334 *
1335 * @par Python Function Prototype
1336 * setCondSphere(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1337 * float, arg2: bool, arg3: float) -> int
1338 *
1339 * @par Lua Function Prototype
1340 * setCondSphere(center: table, radius: number, outside: boolean, timeout:
1341 * number) -> nil
1342 *
1343 * @par Lua example
1344 * setCondSphere({0.2, 0.5, 0.1, 1.57, 0, 0},10.0,true,5,0)
1345 *
1346 * \endenglish
1347 */
1348 int setCondSphere(const std::vector<double> &center, double radius,
1349 bool outside, double timeout);
1350
1351 /**
1352 * \chinese
1353 * 设置TCP速度的终止条件。该条件可通过调用FCCondWaitWhile指令激活,
1354 * 在指定条件为真时,程序将等待并保持执行。这样可以使参考力、力矩和运动继续,
1355 * 直到速度超出指定范围。
1356 *
1357 * 通过定义TCP在工作对象所有方向上的最小和最大速度限制来设置TCP速度条件。
1358 * 一旦通过FCCondWaitWhile激活,程序将在测量速度处于指定范围内时继续等待。
1359 *
1360 * 也可以指定当速度超出指定范围时条件成立,通过使用outside参数实现。
1361 * TCP速度条件在工作对象坐标系中指定。
1362 *
1363 * @param min 最小速度
1364 * @param max 最大速度
1365 * @param outside 是否在范围外有效
1366 * @param timeout 超时时间
1367 *
1368 * @return 成功返回0;失败返回错误码
1369 * AUBO_BUSY
1370 * AUBO_BAD_STATE
1371 * -AUBO_INVL_ARGUMENT
1372 * -AUBO_BAD_STATE
1373 *
1374 * @throws arcs::common_interface::AuboException
1375 *
1376 * @par Python函数原型
1377 * setCondTcpSpeed(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1378 * List[float], arg2: bool, arg3: float) -> int
1379 *
1380 * @par Lua函数原型
1381 * setCondTcpSpeed(min: table, max: table, outside: boolean, timeout:
1382 * number) -> nil
1383 *
1384 * @par Lua示例
1385 * setCondTcpSpeed({0.2, 0.2, 0.2, 0.2, 0.2, 0.2},{1.2, 1.2, 1.2, 1.2, 1.2, 1.2},true,5,0)
1386 *
1387 * \endchinese
1388 * \english
1389 * setCondTcpSpeed is used to setup an end condition for the TCP speed. The
1390 * condition is later activated by calling the instruction FCCondWaitWhile,
1391 * which will wait and hold the program execution while the specified
1392 * condition is true. This allows the reference force, torque and movement
1393 * to continue until the speed is outside the specified limits.
1394 *
1395 * A TCP speed condition is set up by defining minimum and maximum limits
1396 * for the TCP speed in all directions of the work object. Once activated
1397 * with FCCondWaitWhile, the program execution will continue to wait while
1398 * the measured speed is within its specified limits.
1399 *
1400 * It is possible to specify that the condition is fulfilled when the speed
1401 * is outside the specified limits instead. This is done by using the
1402 * switch argument Outside. The condition on TCP speed is specified in the
1403 * work object coordinate system.
1404 *
1405 * @param min
1406 * @param max
1407 * @param outside
1408 * @param timeout
1409 *
1410 * @return Return 0 if succeeded; return error code if failed
1411 * AUBO_BUSY
1412 * AUBO_BAD_STATE
1413 * -AUBO_INVL_ARGUMENT
1414 * -AUBO_BAD_STATE
1415 *
1416 * @throws arcs::common_interface::AuboException
1417 *
1418 * @par Python Function Prototype
1419 * setCondTcpSpeed(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1420 * List[float], arg2: bool, arg3: float) -> int
1421 *
1422 * @par Lua Function Prototype
1423 * setCondTcpSpeed(min: table, max: table, outside: boolean, timeout:
1424 * number) -> nil
1425 *
1426 * @par Lua example
1427 * setCondTcpSpeed({0.2, 0.2, 0.2, 0.2, 0.2, 0.2},{1.2, 1.2, 1.2, 1.2, 1.2, 1.2},true,5,0)
1428 *
1429 * \endenglish
1430 */
1431 int setCondTcpSpeed(const std::vector<double> &min,
1432 const std::vector<double> &max, bool outside,
1433 double timeout);
1434
1435 /**
1436 * \chinese
1437 * 力控终止条件-距离
1438 *
1439 * @param distance 距离
1440 * @param timeout 超时时间
1441 *
1442 * @return 成功返回0;失败返回错误码
1443 * AUBO_BUSY
1444 * AUBO_BAD_STATE
1445 * -AUBO_INVL_ARGUMENT
1446 * -AUBO_BAD_STATE
1447 *
1448 * @throws arcs::common_interface::AuboException
1449 *
1450 * @par Lua函数原型
1451 * setCondDistance(distance: number, timeout: number)
1452 *
1453 * @par Lua示例
1454 * setCondDistance(0.2, 10.0)
1455 *
1456 * \endchinese
1457 * \english
1458 * Force control termination condition - distance
1459 *
1460 * @param distance Distance
1461 * @param timeout Timeout
1462 *
1463 * @return Return 0 if succeeded; return error code if failed
1464 * AUBO_BUSY
1465 * AUBO_BAD_STATE
1466 * -AUBO_INVL_ARGUMENT
1467 * -AUBO_BAD_STATE
1468 *
1469 * @throws arcs::common_interface::AuboException
1470 *
1471 * @par Lua Function Prototype
1472 * setCondDistance(distance: number, timeout: number)
1473 *
1474 * @par Lua example
1475 * setCondDistance(0.2, 10.0)
1476 *
1477 * \endenglish
1478 */
1479 int setCondDistance(double distance, double timeout);
1480
1481 /**
1482 * \chinese
1483 * 高级力控终止条件
1484 *
1485 * @param type 类型
1486 * @param args 参数
1487 * @param timeout 超时时间
1488 *
1489 * @return 成功返回0;失败返回错误码
1490 * AUBO_BUSY
1491 * AUBO_BAD_STATE
1492 * -AUBO_INVL_ARGUMENT
1493 * -AUBO_BAD_STATE
1494 *
1495 * @throws arcs::common_interface::AuboException
1496 *
1497 * @par Lua函数原型
1498 * setCondAdvanced(type: number, args: table, timeout: number)
1499 *
1500 * @par Lua示例
1501 * setCondAdvanced(1, {0,1,0,0,0,0},10)
1502 *
1503 * \endchinese
1504 * \english
1505 * Advanced force control termination condition
1506 *
1507 * @param type Type
1508 * @param args Arguments
1509 * @param timeout Timeout
1510 *
1511 * @return Return 0 if succeeded; return error code if failed
1512 * AUBO_BUSY
1513 * AUBO_BAD_STATE
1514 * -AUBO_INVL_ARGUMENT
1515 * -AUBO_BAD_STATE
1516 *
1517 * @throws arcs::common_interface::AuboException
1518 *
1519 * @par Lua Function Prototype
1520 * setCondAdvanced(type: number, args: table, timeout: number)
1521 *
1522 * @par Lua example
1523 * setCondAdvanced(1, {0,1,0,0,0,0},10)
1524 *
1525 * \endenglish
1526 */
1527 int setCondAdvanced(const std::string &type,
1528 const std::vector<double> &args, double timeout);
1529
1530 /**
1531 * \chinese
1532 * 激活力控终止条件
1533 *
1534 * @return 成功返回0;失败返回错误码
1535 * AUBO_BUSY
1536 * AUBO_BAD_STATE
1537 * -AUBO_BAD_STATE
1538 *
1539 * @throws arcs::common_interface::AuboException
1540 *
1541 * @par Python函数原型
1542 * setCondActive(self: pyaubo_sdk.ForceControl) -> int
1543 *
1544 * @par Lua函数原型
1545 * setCondActive() -> nil
1546 *
1547 * @par Lua示例
1548 * setCondActive()
1549 *
1550 * @par JSON-RPC请求示例
1551 * {"jsonrpc":"2.0","method":"rob1.ForceControl.setCondActive","params":[],"id":1}
1552 *
1553 * @par JSON-RPC响应示例
1554 * {"id":1,"jsonrpc":"2.0","result":0}
1555 * \endchinese
1556 * \english
1557 * Activate force control termination condition
1558 *
1559 * @return Return 0 if succeeded; return error code if failed
1560 * AUBO_BUSY
1561 * AUBO_BAD_STATE
1562 * -AUBO_BAD_STATE
1563 *
1564 * @throws arcs::common_interface::AuboException
1565 *
1566 * @par Python Function Prototype
1567 * setCondActive(self: pyaubo_sdk.ForceControl) -> int
1568 *
1569 * @par Lua Function Prototype
1570 * setCondActive() -> nil
1571 *
1572 * @par Lua example
1573 * setCondActive()
1574 *
1575 * @par JSON-RPC Request example
1576 * {"jsonrpc":"2.0","method":"rob1.ForceControl.setCondActive","params":[],"id":1}
1577 *
1578 * @par JSON-RPC Response example
1579 * {"id":1,"jsonrpc":"2.0","result":0}
1580 * \endenglish
1581 */
1583
1584 /**
1585 * \chinese
1586 * 力控终止条件是否已经满足
1587 *
1588 * @return
1589 *
1590 * @throws arcs::common_interface::AuboException
1591 *
1592 * @par Python函数原型
1593 * isCondFullfiled(self: pyaubo_sdk.ForceControl) -> bool
1594 *
1595 * @par Lua函数原型
1596 * isCondFullfiled() -> boolean
1597 *
1598 * @par Lua示例
1599 * status = isCondFullfiled()
1600 *
1601 * @par JSON-RPC请求示例
1602 * {"jsonrpc":"2.0","method":"rob1.ForceControl.isCondFullfiled","params":[],"id":1}
1603 *
1604 * @par JSON-RPC响应示例
1605 * {"id":1,"jsonrpc":"2.0","result":false}
1606 * \endchinese
1607 * \english
1608 * Check if the force control termination condition has been fulfilled
1609 *
1610 * @return
1611 *
1612 * @throws arcs::common_interface::AuboException
1613 *
1614 * @par Python Function Prototype
1615 * isCondFullfiled(self: pyaubo_sdk.ForceControl) -> bool
1616 *
1617 * @par Lua Function Prototype
1618 * isCondFullfiled() -> boolean
1619 *
1620 * @par Lua example
1621 * status = isCondFullfiled()
1622 *
1623 * @par JSON-RPC Request example
1624 * {"jsonrpc":"2.0","method":"rob1.ForceControl.isCondFullfiled","params":[],"id":1}
1625 *
1626 * @par JSON-RPC Response example
1627 * {"id":1,"jsonrpc":"2.0","result":false}
1628 * \endenglish
1629 */
1631
1632 /**
1633 * \chinese
1634 * setSupvForce 用于在力控中设置力监督。监督在通过 FCAct 指令激活力控时被激活。
1635 *
1636 * 力监督通过在力控坐标系的各个方向上定义最小和最大力限制来设置。
1637 * 一旦激活,如果力超出允许的范围,监督将停止执行。力监督在力控坐标系中指定。
1638 * 该坐标系由用户通过 FCAct 指令设置。
1639 *
1640 * @param min 最小力限制
1641 * @param max 最大力限制
1642 *
1643 * @return 成功返回0;失败返回错误码
1644 * AUBO_BUSY
1645 * AUBO_BAD_STATE
1646 * -AUBO_INVL_ARGUMENT
1647 * -AUBO_BAD_STATE
1648 *
1649 * @throws arcs::common_interface::AuboException
1650 *
1651 * @par Python函数原型
1652 * setSupvForce(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1653 * List[float]) -> int
1654 *
1655 * @par Lua函数原型
1656 * setSupvForce(min: table, max: table) -> nil
1657 *
1658 * @par Lua示例
1659 * setSupvForce({0.1 ,0.1 ,0.1 ,0.1 ,0.1 ,0.1}, {10.0 ,10.0 ,10.0 ,10.0 ,10.0 ,10.0})
1660 *
1661 * \endchinese
1662 * \english
1663 * setSupvForce is used to set up force supervision in Force Control. The
1664 * supervision is activated when Force Control is activated with the
1665 * instruction FCAct.
1666 *
1667 * The force supervision is set up by defining minimum and maximum limits
1668 * for the force in the directions of the force control coordinate system.
1669 * Once activated, the supervision will stop the execution if the force is
1670 * outside the allowed values. The force supervision is specified in the
1671 * force control coordinate system. This coordinate system is setup by the
1672 * user with the instruction FCAct.
1673 *
1674 * @param min
1675 * @param max
1676 *
1677 * @return Return 0 if succeeded; return error code if failed
1678 * AUBO_BUSY
1679 * AUBO_BAD_STATE
1680 * -AUBO_INVL_ARGUMENT
1681 * -AUBO_BAD_STATE
1682 *
1683 * @throws arcs::common_interface::AuboException
1684 *
1685 * @par Python Function Prototype
1686 * setSupvForce(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1687 * List[float]) -> int
1688 *
1689 * @par Lua Function Prototype
1690 * setSupvForce(min: table, max: table) -> nil
1691 *
1692 * @par Lua example
1693 * setSupvForce({0.1 ,0.1 ,0.1 ,0.1 ,0.1 ,0.1}, {10.0 ,10.0 ,10.0 ,10.0 ,10.0 ,10.0})
1694 *
1695 * \endenglish
1696 */
1697 int setSupvForce(const std::vector<double> &min,
1698 const std::vector<double> &max);
1699
1700 /**
1701 * \chinese
1702 * setSupvOrient 用于设置工具姿态的监督条件。
1703 * 当通过 FCAct 指令激活力控时,监督条件被激活。
1704 *
1705 * 姿态监督通过定义相对于参考姿态的最大角度和最大旋转来设置。
1706 * 参考姿态可以由工具当前的z方向定义,也可以通过指定相对于工作对象z方向的姿态来定义。
1707 *
1708 * 一旦激活,工具姿态必须在限制范围内,否则监督将停止执行。
1709 *
1710 * @param frame
1711 * @param max_angle
1712 * @param max_rot
1713 * @param outside
1714 *
1715 * @return 成功返回0;失败返回错误码
1716 * AUBO_BUSY
1717 * AUBO_BAD_STATE
1718 * -AUBO_INVL_ARGUMENT
1719 * -AUBO_BAD_STATE
1720 *
1721 * @throws arcs::common_interface::AuboException
1722 *
1723 * @par Python函数原型
1724 * setSupvOrient(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1725 * float, arg2: float, arg3: bool) -> int
1726 *
1727 * @par Lua函数原型
1728 * setSupvOrient(frame: table, max_angle: number, max_rot: number,
1729 * outside: boolean) -> nil
1730 * \endchinese
1731 * \english
1732 * setSupvOrient is used to set up an supervision for the tool orientation.
1733 * The supervision is activated when Force Control is activated with the
1734 * instruction FCAct.
1735 *
1736 * An orientation supervision is set up by defining a maximum angle and a
1737 * maximum rotation from a reference orientation. The reference orientation
1738 * is either defined by the current z direction of the tool, or by
1739 * specifying an orientation in relation to the z direction of the work
1740 * object.
1741 *
1742 * Once activated, the tool orientation must be within the limits otherwise
1743 * the supervision will stop the execution.
1744 *
1745 * @param frame
1746 * @param max_angle
1747 * @param max_rot
1748 * @param outside
1749 *
1750 * @return Return 0 if succeeded; return error code if failed
1751 * AUBO_BUSY
1752 * AUBO_BAD_STATE
1753 * -AUBO_INVL_ARGUMENT
1754 * -AUBO_BAD_STATE
1755 *
1756 * @throws arcs::common_interface::AuboException
1757 *
1758 * @par Python Function Prototype
1759 * setSupvOrient(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1760 * float, arg2: float, arg3: bool) -> int
1761 *
1762 * @par Lua Function Prototype
1763 * setSupvOrient(frame: table, max_angle: number, max_rot: number,
1764 * outside: boolean) -> nil
1765 * \endenglish
1766 */
1767 int setSupvOrient(const std::vector<double> &frame, double max_angle,
1768 double max_rot, bool outside);
1769
1770 /**
1771 * \chinese
1772 * setSupvPosBox 用于在力控中设置位置监督。监督在通过 FCAct 指令激活力控时被激活。
1773 * 位置监督通过为TCP定义空间体积来设置。一旦激活,如果TCP超出该体积,监督将停止执行。
1774 *
1775 * @param frame
1776 * @param box
1777 *
1778 * @return 成功返回0;失败返回错误码
1779 * AUBO_BUSY
1780 * AUBO_BAD_STATE
1781 * -AUBO_INVL_ARGUMENT
1782 * -AUBO_BAD_STATE
1783 *
1784 * @throws arcs::common_interface::AuboException
1785 *
1786 * @par Python函数原型
1787 * setSupvPosBox(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1788 * List[float[6]]) -> int
1789 *
1790 * @par Lua函数原型
1791 * setSupvPosBox(frame: table, box: table) -> nil
1792 * \endchinese
1793 * \english
1794 * setSupvPosBox is used to set up position supervision in Force Control.
1795 * Supervision is activated when Force Control is activated with the
1796 * instruction FCAct. Position supervision is set up by defining a volume in
1797 * space for the TCP. Once activated, the supervision will stop the
1798 * execution if the TCP is outside this volume.
1799 *
1800 * @param frame
1801 * @param box
1802 *
1803 * @return Return 0 if succeeded; return error code if failed
1804 * AUBO_BUSY
1805 * AUBO_BAD_STATE
1806 * -AUBO_INVL_ARGUMENT
1807 * -AUBO_BAD_STATE
1808 *
1809 * @throws arcs::common_interface::AuboException
1810 *
1811 * @par Python Function Prototype
1812 * setSupvPosBox(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1813 * List[float[6]]) -> int
1814 *
1815 * @par Lua Function Prototype
1816 * setSupvPosBox(frame: table, box: table) -> nil
1817 * \endenglish
1818 */
1819 int setSupvPosBox(const std::vector<double> &frame, const Box &box);
1820
1821 /**
1822 * \chinese
1823 *
1824 * @param frame
1825 * @param cylinder
1826 *
1827 * @return 成功返回0;失败返回错误码
1828 * AUBO_BUSY
1829 * AUBO_BAD_STATE
1830 * -AUBO_INVL_ARGUMENT
1831 * -AUBO_BAD_STATE
1832 *
1833 * @throws arcs::common_interface::AuboException
1834 *
1835 * @par Python函数原型
1836 * setSupvPosCylinder(self: pyaubo_sdk.ForceControl, arg0: List[float],
1837 * arg1: List[float[5]]) -> int
1838 *
1839 * @par Lua函数原型
1840 * setSupvPosCylinder(frame: table, cylinder: table) -> nil
1841 *
1842 * \endchinese
1843 * \english
1844 *
1845 * @param frame
1846 * @param cylinder
1847 *
1848 * @return Return 0 if succeeded; return error code if failed
1849 * AUBO_BUSY
1850 * AUBO_BAD_STATE
1851 * -AUBO_INVL_ARGUMENT
1852 * -AUBO_BAD_STATE
1853 *
1854 * @throws arcs::common_interface::AuboException
1855 *
1856 * @par Python Function Prototype
1857 * setSupvPosCylinder(self: pyaubo_sdk.ForceControl, arg0: List[float],
1858 * arg1: List[float[5]]) -> int
1859 *
1860 * @par Lua Function Prototype
1861 * setSupvPosCylinder(frame: table, cylinder: table) -> nil
1862 *
1863 * \endenglish
1864 */
1865 int setSupvPosCylinder(const std::vector<double> &frame,
1866 const Cylinder &cylinder);
1867
1868 /**
1869 * \chinese
1870 *
1871 * @param frame
1872 * @param sphere
1873 *
1874 * @return 成功返回0;失败返回错误码
1875 * AUBO_BUSY
1876 * AUBO_BAD_STATE
1877 * -AUBO_INVL_ARGUMENT
1878 * -AUBO_BAD_STATE
1879 *
1880 * @throws arcs::common_interface::AuboException
1881 *
1882 * @par Python函数原型
1883 * setSupvPosSphere(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1884 * List[float[3]]) -> int
1885 *
1886 * @par Lua函数原型
1887 * setSupvPosSphere(frame: table, sphere: table) -> nil
1888 *
1889 * \endchinese
1890 * \english
1891 *
1892 * @param frame
1893 * @param sphere
1894 *
1895 * @return Return 0 if succeeded; return error code if failed
1896 * AUBO_BUSY
1897 * AUBO_BAD_STATE
1898 * -AUBO_INVL_ARGUMENT
1899 * -AUBO_BAD_STATE
1900 *
1901 * @throws arcs::common_interface::AuboException
1902 *
1903 * @par Python Function Prototype
1904 * setSupvPosSphere(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1905 * List[float[3]]) -> int
1906 *
1907 * @par Lua Function Prototype
1908 * setSupvPosSphere(frame: table, sphere: table) -> nil
1909 *
1910 * \endenglish
1911 */
1912 int setSupvPosSphere(const std::vector<double> &frame,
1913 const Sphere &sphere);
1914
1915 /**
1916 * \chinese
1917 * setSupvReoriSpeed 用于在力控中设置重新定向速度监督。监督在通过 FCAct 指令激活力控时被激活。
1918 *
1919 * 重新定向速度监督通过定义工作对象坐标系轴周围重新定向速度的最小和最大限制来设置。
1920 * 一旦激活,如果重新定向速度的值过高,监督将停止执行。
1921 *
1922 * 有两种速度监督:FCSupvReoriSpeed 和 FCSupvTCPSpeed,后者在第199页的 FCSupvTCPSpeed 部分有描述。
1923 * 可能需要两种监督,因为:
1924 * - 机器人轴可以在 TCP 静止时高速旋转。
1925 * - 当 TCP 距离旋转轴较远时,轴的微小旋转可能导致 TCP 的高速运动。
1926 *
1927 * @param speed_limit 速度限制
1928 * @param outside 是否在范围外有效
1929 * @param timeout 超时时间
1930 *
1931 * @return 成功返回0;失败返回错误码
1932 * AUBO_BUSY
1933 * AUBO_BAD_STATE
1934 * -AUBO_INVL_ARGUMENT
1935 * -AUBO_BAD_STATE
1936 *
1937 * @throws arcs::common_interface::AuboException
1938 *
1939 * @par Python函数原型
1940 * setSupvReoriSpeed(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: bool, arg2: float) -> int
1941 *
1942 * @par Lua函数原型
1943 * setSupvReoriSpeed(speed_limit: table, outside: boolean, timeout: number) -> nil
1944 * \endchinese
1945 * \english
1946 * setSupvReoriSpeed is used to set up reorientation speed supervision in Force Control. The supervision is activated when Force Control is activated with the instruction FCAct.
1947 *
1948 * The reorientation speed supervision is set up by defining minimum and maximum limits for the reorientation speed around the axis of the work object coordinate system. Once activated, the supervision will stop the execution if the values of the reorientation speed are too high.
1949 *
1950 * There are two speed supervisions: FCSupvReoriSpeed and FCSupvTCPSpeed, which is described in section FCSupvTCPSpeed on page 199.
1951 * Both supervisions may be required because:
1952 * - A robot axis can rotate with high speed while the TCP is stationary.
1953 * - The TCP can be far from the rotating axis and a small axis rotation may result in a high speed movement of the TCP.
1954 *
1955 * @param speed_limit
1956 * @param outside
1957 * @param timeout
1958 *
1959 * @return Return 0 if succeeded; return error code if failed
1960 * AUBO_BUSY
1961 * AUBO_BAD_STATE
1962 * -AUBO_INVL_ARGUMENT
1963 * -AUBO_BAD_STATE
1964 *
1965 * @throws arcs::common_interface::AuboException
1966 *
1967 * @par Python Function Prototype
1968 * setSupvReoriSpeed(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: bool, arg2: float) -> int
1969 *
1970 * @par Lua Function Prototype
1971 * setSupvReoriSpeed(speed_limit: table, outside: boolean, timeout: number) -> nil
1972 * \endenglish
1973 */
1974 int setSupvReoriSpeed(const std::vector<double> &speed_limit, bool outside,
1975 double timeout);
1976
1977 /**
1978 * \chinese
1979 * setSupvTcpSpeed 用于在力控中设置TCP速度监督。监督在通过 FCAct 指令激活力控时被激活。
1980 * TCP速度监督通过定义工作对象坐标系各方向上的最小和最大速度限制来设置。
1981 * 一旦激活,如果检测到过高的TCP速度值,监督将停止执行。
1982 *
1983 * 有两种速度监督:FCSupvTCPSpeed 和 FCSupvReoriSpeed,后者在第197页的 FCSupvReoriSpeed 部分有描述。
1984 *
1985 * 可能需要两种监督,因为:
1986 * - 机器人轴可以在TCP静止时高速旋转。
1987 * - 当TCP距离旋转轴较远时,轴的微小旋转可能导致TCP的高速运动。
1988 *
1989 * @param speed_limit 速度限制
1990 * @param outside 是否在范围外有效
1991 * @param timeout 超时时间
1992 *
1993 * @return 成功返回0;失败返回错误码
1994 * AUBO_BUSY
1995 * AUBO_BAD_STATE
1996 * -AUBO_INVL_ARGUMENT
1997 * -AUBO_BAD_STATE
1998 *
1999 * @throws arcs::common_interface::AuboException
2000 *
2001 * @par Python函数原型
2002 * setSupvTcpSpeed(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: bool, arg2: float) -> int
2003 *
2004 * @par Lua函数原型
2005 * setSupvTcpSpeed(speed_limit: table, outside: boolean, timeout: number) -> nil
2006 * \endchinese
2007 * \english
2008 * setSupvTcpSpeed is used to set up TCP speed supervision in Force Control.
2009 * The supervision is activated when Force Control is activated with the
2010 * instruction FCAct. The TCP speed supervision is set up by defining
2011 * minimum and maximum limits for the TCP speed in the directions of the
2012 * work object coordinate system. Once activated, the supervision will stop
2013 * the execution if too high TCP speed values are detected.
2014 *
2015 * There are two speed supervisions: FCSupvTCPSpeed and FCSupvReoriSpeed,
2016 * which is described in section FCSupvReoriSpeed on page 197.
2017 *
2018 * Both supervisions may be required because:
2019 * - A robot axis can rotate with high speed while the TCP is stationary.
2020 * - The TCP can be far from the rotating axis and a small axis rotation may
2021 * result in a high speed movement of the TCP.
2022 *
2023 * @param speed_limit
2024 * @param outside
2025 * @param timeout
2026 *
2027 * @return Return 0 if succeeded; return error code if failed
2028 * AUBO_BUSY
2029 * AUBO_BAD_STATE
2030 * -AUBO_INVL_ARGUMENT
2031 * -AUBO_BAD_STATE
2032 *
2033 * @throws arcs::common_interface::AuboException
2034 *
2035 * @par Python Function Prototype
2036 * setSupvTcpSpeed(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: bool, arg2: float) -> int
2037 *
2038 * @par Lua Function Prototype
2039 * setSupvTcpSpeed(speed_limit: table, outside: boolean, timeout: number) -> nil
2040 * \endenglish
2041 */
2042 int setSupvTcpSpeed(const std::vector<double> &speed_limit, bool outside,
2043 double timeout);
2044
2045 // 设置低通滤波器
2046 // --- force frame filter: 过滤测量到的力/力矩
2047 // +++ force loop filter: 力控输出参考速度的滤波器
2048
2049 /**
2050 * \chinese
2051 * 设置低通滤波器
2052 *
2053 * --- force frame filter: 过滤测量到的力/力矩
2054 * +++ force loop filter: 力控输出参考速度的滤波器
2055 *
2056 * @param cutoff_freq 截止频率
2057 *
2058 * @return 成功返回0;失败返回错误码
2059 * AUBO_BUSY
2060 * AUBO_BAD_STATE
2061 * -AUBO_INVL_ARGUMENT
2062 * -AUBO_BAD_STATE
2063 *
2064 * @throws arcs::common_interface::AuboException
2065 *
2066 * @par Python函数原型
2067 * setLpFilter(self: pyaubo_sdk.ForceControl, arg0: List[float]) -> int
2068 *
2069 * @par Lua函数原型
2070 * setLpFilter(cutoff_freq: table) -> nil
2071 * \endchinese
2072 * \english
2073 * Set low-pass filter
2074 *
2075 * --- force frame filter: filter measured force/torque
2076 * +++ force loop filter: filter for force control output reference speed
2077 *
2078 * FCSetLPFilterTune is used to change the response of force loop according to
2079 * the description in Damping and LP-filter on page 103.
2080 *
2081 * @param cutoff_freq Cutoff frequency
2082 *
2083 * @return Return 0 if succeeded; return error code if failed
2084 * AUBO_BUSY
2085 * AUBO_BAD_STATE
2086 * -AUBO_INVL_ARGUMENT
2087 * -AUBO_BAD_STATE
2088 *
2089 * @throws arcs::common_interface::AuboException
2090 *
2091 * @par Python Function Prototype
2092 * setLpFilter(self: pyaubo_sdk.ForceControl, arg0: List[float]) -> int
2093 *
2094 * @par Lua Function Prototype
2095 * setLpFilter(cutoff_freq: table) -> nil
2096 * \endenglish
2097 */
2098 int setLpFilter(const std::vector<double> &cutoff_freq);
2099
2100 /**
2101 * \chinese
2102 * 重置低通滤波器
2103 *
2104 * @return 成功返回0;失败返回错误码
2105 * AUBO_BUSY
2106 * AUBO_BAD_STATE
2107 * -AUBO_BAD_STATE
2108 *
2109 * @throws arcs::common_interface::AuboException
2110 *
2111 * @par Python函数原型
2112 * resetLpFilter(self: pyaubo_sdk.ForceControl) -> int
2113 *
2114 * @par Lua函数原型
2115 * resetLpFilter() -> nil
2116 *
2117 * @par JSON-RPC请求示例
2118 * {"jsonrpc":"2.0","method":"rob1.ForceControl.resetLpFilter","params":[],"id":1}
2119 *
2120 * @par JSON-RPC响应示例
2121 * {"id":1,"jsonrpc":"2.0","result":0}
2122 * \endchinese
2123 * \english
2124 * Reset low-pass filter
2125 *
2126 * @return Return 0 if succeeded; return error code if failed
2127 * AUBO_BUSY
2128 * AUBO_BAD_STATE
2129 * -AUBO_BAD_STATE
2130 *
2131 * @throws arcs::common_interface::AuboException
2132 *
2133 * @par Python Function Prototype
2134 * resetLpFilter(self: pyaubo_sdk.ForceControl) -> int
2135 *
2136 * @par Lua Function Prototype
2137 * resetLpFilter() -> nil
2138 *
2139 * @par JSON-RPC Request example
2140 * {"jsonrpc":"2.0","method":"rob1.ForceControl.resetLpFilter","params":[],"id":1}
2141 *
2142 * @par JSON-RPC Response example
2143 * {"id":1,"jsonrpc":"2.0","result":0}
2144 * \endenglish
2145 */
2147
2148 /**
2149 * \chinese
2150 * speedChangeEnable 用于激活 FC SpeedChange 功能,并设置期望的参考力和恢复行为。
2151 * 当 FC SpeedChange 功能被激活时,机器人速度会根据测量信号与参考值的接近程度自动降低或提高。
2152 *
2153 * @param ref_force 参考力
2154 *
2155 * @return 成功返回0;失败返回错误码
2156 * AUBO_BUSY
2157 * AUBO_BAD_STATE
2158 * -AUBO_INVL_ARGUMENT
2159 * -AUBO_BAD_STATE
2160 *
2161 * @throws arcs::common_interface::AuboException
2162 *
2163 * @par Python函数原型
2164 * speedChangeEnable(self: pyaubo_sdk.ForceControl, arg0: float) -> int
2165 *
2166 * @par Lua函数原型
2167 * speedChangeEnable(ref_force: number) -> nil
2168 * \endchinese
2169 * \english
2170 * The speedChangeEnable is used to activate FC SpeedChange function with desired
2171 * reference and recover behavior. When FC SpeedChange function is active,
2172 * the robot speed will be reduced/increased in order to keep the measured
2173 * signal close to the reference.
2174 *
2175 * @param ref_force
2176 *
2177 * @return Return 0 if succeeded; return error code if failed
2178 * AUBO_BUSY
2179 * AUBO_BAD_STATE
2180 * -AUBO_INVL_ARGUMENT
2181 * -AUBO_BAD_STATE
2182 *
2183 * @throws arcs::common_interface::AuboException
2184 *
2185 * @par Python Function Prototype
2186 * speedChangeEnable(self: pyaubo_sdk.ForceControl, arg0: float) -> int
2187 *
2188 * @par Lua Function Prototype
2189 * speedChangeEnable(ref_force: number) -> nil
2190 * \endenglish
2191 */
2192 int speedChangeEnable(double ref_force);
2193
2194 /**
2195 * \chinese
2196 * 停用 FC SpeedChange 功能。
2197 *
2198 * @return 成功返回0;失败返回错误码
2199 * AUBO_BUSY
2200 * AUBO_BAD_STATE
2201 * -AUBO_BAD_STATE
2202 *
2203 * @throws arcs::common_interface::AuboException
2204 *
2205 * @par Python函数原型
2206 * speedChangeDisable(self: pyaubo_sdk.ForceControl) -> int
2207 *
2208 * @par Lua函数原型
2209 * speedChangeDisable() -> nil
2210 *
2211 * @par JSON-RPC请求示例
2212 * {"jsonrpc":"2.0","method":"rob1.ForceControl.speedChangeDisable","params":[],"id":1}
2213 *
2214 * @par JSON-RPC响应示例
2215 * {"id":1,"jsonrpc":"2.0","result":0}
2216 * \endchinese
2217 * \english
2218 * Deactivate FC SpeedChange function.
2219 *
2220 * @return Return 0 if succeeded; return error code if failed
2221 * AUBO_BUSY
2222 * AUBO_BAD_STATE
2223 * -AUBO_BAD_STATE
2224 *
2225 * @throws arcs::common_interface::AuboException
2226 *
2227 * @par Python Function Prototype
2228 * speedChangeDisable(self: pyaubo_sdk.ForceControl) -> int
2229 *
2230 * @par Lua Function Prototype
2231 * speedChangeDisable() -> nil
2232 *
2233 * @par JSON-RPC Request example
2234 * {"jsonrpc":"2.0","method":"rob1.ForceControl.speedChangeDisable","params":[],"id":1}
2235 *
2236 * @par JSON-RPC Response example
2237 * {"id":1,"jsonrpc":"2.0","result":0}
2238 * \endenglish
2239 */
2241
2242 /**
2243 * \chinese
2244 * speedChangeTune 用于将 FC SpeedChange 系统参数设置为新值。
2245 *
2246 * @param speed_levels 速度级别
2247 * @param speed_ratio_min 最小速度比例
2248 *
2249 * @return 成功返回0;失败返回错误码
2250 * AUBO_BUSY
2251 * AUBO_BAD_STATE
2252 * -AUBO_INVL_ARGUMENT
2253 * -AUBO_BAD_STATE
2254 *
2255 * @throws arcs::common_interface::AuboException
2256 *
2257 * @par Python函数原型
2258 * speedChangeTune(self: pyaubo_sdk.ForceControl, arg0: int, arg1: float) -> int
2259 *
2260 * @par Lua函数原型
2261 * speedChangeTune(speed_levels: number, speed_ratio_min: number) -> nil
2262 * \endchinese
2263 * \english
2264 * speedChangeTune is used to set FC SpeedChange system parameters to a new value.
2265 *
2266 * @param speed_levels
2267 * @param speed_ratio_min
2268 *
2269 * @return Return 0 if succeeded; return error code if failed
2270 * AUBO_BUSY
2271 * AUBO_BAD_STATE
2272 * -AUBO_INVL_ARGUMENT
2273 * -AUBO_BAD_STATE
2274 *
2275 * @throws arcs::common_interface::AuboException
2276 *
2277 * @par Python Function Prototype
2278 * speedChangeTune(self: pyaubo_sdk.ForceControl, arg0: int, arg1: float) -> int
2279 *
2280 * @par Lua Function Prototype
2281 * speedChangeTune(speed_levels: number, speed_ratio_min: number) -> nil
2282 * \endenglish
2283 */
2284 int speedChangeTune(int speed_levels, double speed_ratio_min);
2285
2286 /* Defines how many Newtons are required to make the robot move 1 m/s. The
2287 higher the value, the less responsive the robot gets.
2288 The damping can be tuned (as a percentage of the system parameter values)
2289 by the RAPID instruction FCAct. */
2290 // 设置阻尼系数,阻尼的系统参数需要通过配置文件设置
2291 // [damping_fx, damping_fy, damping_fz, damping_tx, damping_ty, damping_tz]
2292 // A value between min and 10,000,000 Ns/m.
2293 // A value between minimum and 10,000,000 Nms/rad.
2294
2295 /**
2296 * \chinese
2297 * setDamping 用于在力控坐标系中调整阻尼。可调参数包括扭矩x方向到扭矩z方向的阻尼(见第255页)以及力x方向到力z方向的阻尼(见第254页)。
2298 *
2299 * 阻尼可以通过配置文件或FCAct指令设置。不同之处在于本指令可在力控激活时使用。FCSetDampingTune调整的是FCAct指令设置的实际值,而不是配置文件中的值。
2300 *
2301 * @param damping 阻尼参数
2302 * @param ramp_time 斜坡时间
2303 *
2304 * @return 成功返回0;失败返回错误码
2305 * AUBO_BUSY
2306 * AUBO_BAD_STATE
2307 * -AUBO_INVL_ARGUMENT
2308 * -AUBO_BAD_STATE
2309 *
2310 * @throws arcs::common_interface::AuboException
2311 *
2312 * @par Python函数原型
2313 * setDamping(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: float) -> int
2314 *
2315 * @par Lua函数原型
2316 * setDamping(damping: table, ramp_time: number) -> nil
2317 * \endchinese
2318 * \english
2319 * setDamping is used to tune the damping in the force control coordinate systems. The parameters tuned are those described in Damping in Torque x Direction - Damping in Torque z Direction on page 255 and Damping in Force x Direction - Damping in Force z Direction on page 254.
2320 *
2321 * Damping can be set in the configuration file or by the instruction FCAct. The difference is that this instruction can be used when force control is active. FCSetDampingTune tunes the actual values set by the instruction FCAct, not the value in the configuration file.
2322 *
2323 * @param damping
2324 * @param ramp_time
2325 *
2326 * @return Return 0 if succeeded; return error code if failed
2327 * AUBO_BUSY
2328 * AUBO_BAD_STATE
2329 * -AUBO_INVL_ARGUMENT
2330 * -AUBO_BAD_STATE
2331 *
2332 * @throws arcs::common_interface::AuboException
2333 *
2334 * @par Python Function Prototype
2335 * setDamping(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: float) -> int
2336 *
2337 * @par Lua Function Prototype
2338 * setDamping(damping: table, ramp_time: number) -> nil
2339 * \endenglish
2340 */
2341 int setDamping(const std::vector<double> &damping, double ramp_time);
2342
2343 /**
2344 * \chinese
2345 * 重置阻尼参数
2346 *
2347 * @return 成功返回0;失败返回错误码
2348 * AUBO_BUSY
2349 * AUBO_BAD_STATE
2350 * -AUBO_BAD_STATE
2351 *
2352 * @throws arcs::common_interface::AuboException
2353 *
2354 * @par Python函数原型
2355 * resetDamping(self: pyaubo_sdk.ForceControl) -> int
2356 *
2357 * @par Lua函数原型
2358 * resetDamping() -> nil
2359 *
2360 * @par JSON-RPC请求示例
2361 * {"jsonrpc":"2.0","method":"rob1.ForceControl.resetDamping","params":[],"id":1}
2362 *
2363 * @par JSON-RPC响应示例
2364 * {"id":1,"jsonrpc":"2.0","result":0}
2365 * \endchinese
2366 * \english
2367 * Reset damping parameters
2368 *
2369 * @return Return 0 if succeeded; return error code if failed
2370 * AUBO_BUSY
2371 * AUBO_BAD_STATE
2372 * -AUBO_BAD_STATE
2373 *
2374 * @throws arcs::common_interface::AuboException
2375 *
2376 * @par Python Function Prototype
2377 * resetDamping(self: pyaubo_sdk.ForceControl) -> int
2378 *
2379 * @par Lua Function Prototype
2380 * resetDamping() -> nil
2381 *
2382 * @par JSON-RPC Request example
2383 * {"jsonrpc":"2.0","method":"rob1.ForceControl.resetDamping","params":[],"id":1}
2384 *
2385 * @par JSON-RPC Response example
2386 * {"id":1,"jsonrpc":"2.0","result":0}
2387 * \endenglish
2388 */
2390
2391 /**
2392 * \chinese
2393 * 启用软浮动功能。
2394 *
2395 * @return 成功返回0;失败返回错误码
2396 * AUBO_BUSY
2397 * AUBO_BAD_STATE
2398 * -AUBO_BAD_STATE
2399 *
2400 * @throws arcs::common_interface::AuboException
2401 *
2402 * @par JSON-RPC请求示例
2403 * {"jsonrpc":"2.0","method":"rob1.ForceControl.softFloatEnable","params":[],"id":1}
2404 *
2405 * @par JSON-RPC响应示例
2406 * {"id":1,"jsonrpc":"2.0","result":0}
2407 * \endchinese
2408 * \english
2409 * Enable soft float function.
2410 *
2411 * @return Return 0 if succeeded; return error code if failed
2412 * AUBO_BUSY
2413 * AUBO_BAD_STATE
2414 * -AUBO_BAD_STATE
2415 *
2416 * @throws arcs::common_interface::AuboException
2417 *
2418 * @par JSON-RPC Request example
2419 * {"jsonrpc":"2.0","method":"rob1.ForceControl.softFloatEnable","params":[],"id":1}
2420 *
2421 * @par JSON-RPC Response example
2422 * {"id":1,"jsonrpc":"2.0","result":0}
2423 * \endenglish
2424 */
2426
2427 /**
2428 * \chinese
2429 * 停用软浮动功能。
2430 *
2431 * @return 成功返回0;失败返回错误码
2432 * AUBO_BUSY
2433 * AUBO_BAD_STATE
2434 * -AUBO_BAD_STATE
2435 *
2436 * @throws arcs::common_interface::AuboException
2437 *
2438 * @par JSON-RPC请求示例
2439 * {"jsonrpc":"2.0","method":"rob1.ForceControl.softFloatDisable","params":[],"id":1}
2440 *
2441 * @par JSON-RPC响应示例
2442 * {"id":1,"jsonrpc":"2.0","result":-1}
2443 * \endchinese
2444 * \english
2445 * Disable soft float function.
2446 *
2447 * @return Return 0 if succeeded; return error code if failed
2448 * AUBO_BUSY
2449 * AUBO_BAD_STATE
2450 * -AUBO_BAD_STATE
2451 *
2452 * @throws arcs::common_interface::AuboException
2453 *
2454 * @par JSON-RPC Request example
2455 * {"jsonrpc":"2.0","method":"rob1.ForceControl.softFloatDisable","params":[],"id":1}
2456 *
2457 * @par JSON-RPC Response example
2458 * {"id":1,"jsonrpc":"2.0","result":-1}
2459 * \endenglish
2460 */
2462
2463 /**
2464 * \chinese
2465 * 返回是否开启了软浮动
2466 *
2467 * @return
2468 *
2469 * @throws arcs::common_interface::AuboException
2470 *
2471 * @par JSON-RPC请求示例
2472 * {"jsonrpc":"2.0","method":"rob1.ForceControl.isSoftFloatEnabled","params":[],"id":1}
2473 *
2474 * @par JSON-RPC响应示例
2475 * {"id":1,"jsonrpc":"2.0","result":false}
2476 * \endchinese
2477 * \english
2478 * Returns whether soft float is enabled
2479 *
2480 * @return
2481 *
2482 * @throws arcs::common_interface::AuboException
2483 *
2484 * @par JSON-RPC Request example
2485 * {"jsonrpc":"2.0","method":"rob1.ForceControl.isSoftFloatEnabled","params":[],"id":1}
2486 *
2487 * @par JSON-RPC Response example
2488 * {"id":1,"jsonrpc":"2.0","result":false}
2489 * \endenglish
2490 */
2492
2493 /**
2494 * \chinese
2495 * 设置软浮动参数
2496 *
2497 * @param joint_softfloat 是否在关节空间启用软浮动
2498 * @param select 选择哪些自由度启用软浮动
2499 * @param stiff_percent 刚度百分比
2500 * @param stiff_damp_ratio 刚度阻尼比
2501 * @param force_threshold 力阈值
2502 * @param force_limit 力限制
2503 * @return 返回0表示成功,其他为错误码
2504 * \endchinese
2505 * \english
2506 * Set soft float parameters
2507 *
2508 * @param joint_softfloat Whether to enable soft float in joint space
2509 * @param select Select which degrees of freedom to enable soft float
2510 * @param stiff_percent Stiffness percentage
2511 * @param stiff_damp_ratio Stiffness damping ratio
2512 * @param force_threshold Force threshold
2513 * @param force_limit Force limit
2514 * @return Return 0 if succeeded, otherwise error code
2515 * \endenglish
2516 */
2517 int setSoftFloatParams(bool joint_space, const std::vector<bool> &select,
2518 const std::vector<double> &stiff_percent,
2519 const std::vector<double> &stiff_damp_ratio,
2520 const std::vector<double> &force_threshold,
2521 const std::vector<double> &force_limit);
2522
2523 /**
2524 * \chinese
2525 * 检测工具和外部物体的接触
2526 *
2527 * @param direction
2528 * 预期的接触方向,如果所有的元素为0,表示检测所有方向的接触
2529 * @return
2530 * 返回从当前点回退到碰撞开始点的周期步数,如果返回值为0,表示没有接触
2531 * \endchinese
2532 * \english
2533 * Detect contact between the tool and external objects
2534 *
2535 * @param direction
2536 * Expected contact direction. If all elements are 0, detect contact in all directions.
2537 * @return
2538 * Returns the number of cycle steps back from the current point to the collision start point. If the return value is 0, no contact is detected.
2539 * \endenglish
2540 */
2541 int toolContact(const std::vector<bool> &direction);
2542
2543 /**
2544 * \chinese
2545 * @brief 获取历史关节角度
2546 *
2547 * 根据给定的周期步数,从关节状态历史中回退指定数量的周期,获取当时的关节角度数据。
2548 *
2549 * @param steps
2550 * 需要回退的周期数(单位:控制周期数),值越大表示获取越早的历史数据
2551 * @return std::vector<double>
2552 * 对应时间点的各关节角度(单位:弧度)
2553 * \endchinese
2554 * \english
2555 * @brief Get historical joint positions
2556 *
2557 * According to the given number of cycle steps, go back the specified number of cycles from the joint state history to obtain the joint position data at that time.
2558 *
2559 * @param steps
2560 * Number of cycles to go back (unit: control cycles), the larger the value, the earlier the historical data is obtained
2561 * @return std::vector<double>
2562 * Joint positions (unit: radians) at the corresponding time point
2563 * \endenglish
2564 */
2565 std::vector<double> getActualJointPositionsHistory(int steps);
2566
2567protected:
2568 void *d_{ nullptr };
2569};
2570using ForceControlPtr = std::shared_ptr<ForceControl>;
2571} // namespace common_interface
2572} // namespace arcs
2573
2574#endif // AUBO_SDK_FORCE_CONTROL_INTERFACE_H
int setSoftFloatParams(bool joint_space, const std::vector< bool > &select, const std::vector< double > &stiff_percent, const std::vector< double > &stiff_damp_ratio, const std::vector< double > &force_threshold, const std::vector< double > &force_limit)
设置软浮动参数
int speedChangeEnable(double ref_force)
speedChangeEnable 用于激活 FC SpeedChange 功能,并设置期望的参考力和恢复行为。 当 FC SpeedChange 功能被激活时,机器人速度会根据测量信号与参考值的接近程...
int setDynamicModel1(const std::vector< double > &env_stiff, const std::vector< double > &damp_scale, const std::vector< double > &stiff_scale)
设置力控动力学模型
int setSupvReoriSpeed(const std::vector< double > &speed_limit, bool outside, double timeout)
setSupvReoriSpeed 用于在力控中设置重新定向速度监督。监督在通过 FCAct 指令激活力控时被激活。
int setDynamicModelSearch(const std::vector< double > &damp_scale, const std::vector< double > &stiff_scale)
设置力控搜孔场景下的动力学模型
int fcDisable()
失能力控。 fcDisable 被用于失能力控。 在成功失能力控之后,机器人将回到位置控制模式。
int setCondDistance(double distance, double timeout)
力控终止条件-距离
bool isSoftFloatEnabled()
返回是否开启了软浮动
int setSupvTcpSpeed(const std::vector< double > &speed_limit, bool outside, double timeout)
setSupvTcpSpeed 用于在力控中设置TCP速度监督。监督在通过 FCAct 指令激活力控时被激活。 TCP速度监督通过定义工作对象坐标系各方向上的最小和最大速度限制来设置。 一旦激活,如果检...
int setCondActive()
激活力控终止条件
bool isCondFullfiled()
力控终止条件是否已经满足
int setDynamicModelInsert(const std::vector< double > &damp_scale, const std::vector< double > &stiff_scale)
设置力控插/拔孔场景下的动力学模型
int setCondCylinder(const std::vector< double > &axis, double radius, bool outside, double timeout)
指定力控有效圆柱体,提供中心轴和圆柱半径,可以指定圆柱内部还是外部
int setDamping(const std::vector< double > &damping, double ramp_time)
setDamping 用于在力控坐标系中调整阻尼。可调参数包括扭矩x方向到扭矩z方向的阻尼(见第255页)以及力x方向到力z方向的阻尼(见第254页)。
int resetLpFilter()
重置低通滤波器
int setCondAdvanced(const std::string &type, const std::vector< double > &args, double timeout)
高级力控终止条件
int setLpFilter(const std::vector< double > &cutoff_freq)
设置低通滤波器
std::vector< double > getActualJointPositionsHistory(int steps)
int resetDamping()
重置阻尼参数
int setCondTcpSpeed(const std::vector< double > &min, const std::vector< double > &max, bool outside, double timeout)
设置TCP速度的终止条件。该条件可通过调用FCCondWaitWhile指令激活, 在指定条件为真时,程序将等待并保持执行。这样可以使参考力、力矩和运动继续, 直到速度超出指定范围。
int setCondForce(const std::vector< double > &min, const std::vector< double > &max, bool outside, double timeout)
设置力控终止条件:力,当测量的力在设置的范围之内,力控算法将保持运行,直到设置的条件不满足,力控将退出
int setDynamicModelContact(const std::vector< double > &env_stiff, const std::vector< double > &damp_scale, const std::vector< double > &stiff_scale)
设置力控接触场景下的动力学模型
int setCondSphere(const std::vector< double > &center, double radius, bool outside, double timeout)
指定力控有效球体,提供球心和半径,可以指定球体内部还是外部
int setCondPlane(const std::vector< double > &plane, double timeout)
指定力控有效平面,x-y平面,z方向有效
bool isFcEnabled()
判断力控是否被使能
int setSupvPosBox(const std::vector< double > &frame, const Box &box)
setSupvPosBox 用于在力控中设置位置监督。监督在通过 FCAct 指令激活力控时被激活。 位置监督通过为TCP定义空间体积来设置。一旦激活,如果TCP超出该体积,监督将停止执行。
int setSupvPosSphere(const std::vector< double > &frame, const Sphere &sphere)
int setSupvForce(const std::vector< double > &min, const std::vector< double > &max)
setSupvForce 用于在力控中设置力监督。监督在通过 FCAct 指令激活力控时被激活。
std::vector< double > getFcSensorLimits()
获取最大力限制
int speedChangeDisable()
停用 FC SpeedChange 功能。
int fcSetSensorThresholds(const std::vector< double > &thresholds)
设置力控阈值
int setSupvPosCylinder(const std::vector< double > &frame, const Cylinder &cylinder)
int setDynamicModel(const std::vector< double > &m, const std::vector< double > &d, const std::vector< double > &k)
设置力控动力学模型
int fcSetSensorLimits(const std::vector< double > &limits)
设置力控最大受力限制
DynamicsModel getDynamicModel()
获取力控动力学模型
int setTargetForce(const std::vector< double > &feature, const std::vector< bool > &compliance, const std::vector< double > &wrench, const std::vector< double > &limits, TaskFrameType type=TaskFrameType::FRAME_FORCE)
设置力控参考(目标)值
DynamicsModel fcCalDynamicModel(const std::vector< double > &env_stiff, const std::vector< double > &damp_scale, const std::vector< double > &stiff_scale)
计算力控动力学模型
int fcEnable()
使能力控。 fcEnable 被用于使能力控。 在力控被使能的同时, fcEnable 用于定义力控的坐标系,并调整力和力矩的阻尼。 如果在 fcEnable 中未指定坐标系, 则会创建一个默认的力控制...
int setSupvOrient(const std::vector< double > &frame, double max_angle, double max_rot, bool outside)
setSupvOrient 用于设置工具姿态的监督条件。 当通过 FCAct 指令激活力控时,监督条件被激活。
std::vector< double > getFcSensorThresholds()
获取力控阈值
int speedChangeTune(int speed_levels, double speed_ratio_min)
speedChangeTune 用于将 FC SpeedChange 系统参数设置为新值。
int softFloatEnable()
启用软浮动功能。
int toolContact(const std::vector< bool > &direction)
检测工具和外部物体的接触
int setCondOrient(const std::vector< double > &frame, double max_angle, double max_rot, bool outside, double timeout)
设置力控终止条件:姿态,当测量的姿态在设置的范围之内,力控算法将保持运行,直到设置的条件不满足,力控将退出.
int softFloatDisable()
停用软浮动功能。
std::tuple< std::vector< double >, std::vector< double >, std::vector< double > > DynamicsModel
Definition type_def.h:782
std::vector< double > Box
Definition type_def.h:790
std::vector< double > Sphere
Definition type_def.h:802
std::shared_ptr< ForceControl > ForceControlPtr
std::vector< double > Cylinder
Definition type_def.h:797
数据类型的定义