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