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(feature: table, compliance: table, wrench:
766 * table, limits: table, type: number) -> nil
767 *
768 * @par Lua示例
769 * fcSetSensorThresholds({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)
770 *
771 * \endch
772 * \endchinese
773 * \english
774 * Set force control thresholds
775 *
776 * @param thresholds: Force control thresholds
777 *
778 * @return Return 0 if succeeded; return error code if failed
779 * AUBO_BUSY
780 * AUBO_BAD_STATE
781 * -AUBO_INVL_ARGUMENT
782 * -AUBO_BAD_STATE
783 *
784 * @throws arcs::common_interface::AuboException
785 *
786 * @par Python Function Prototype
787 * fcSetSensorThresholds(self: pyaubo_sdk.ForceControl, arg0:
788 * List[float]) -> int
789 *
790 * @par Lua Function Prototype
791 * fcSetSensorThresholds(feature: table, compliance: table, wrench:
792 * table, limits: table, type: number) -> nil
793 *
794 * @par Lua example
795 * fcSetSensorThresholds({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)
796 *
797 * \endenglish
798 */
799 int fcSetSensorThresholds(const std::vector<double> &thresholds);
800
801 /**
802 * \chinese
803 * 设置力控最大受力限制
804 *
805 * @param limits: 力限制
806 *
807 * @return 成功返回0;失败返回错误码
808 * AUBO_BUSY
809 * AUBO_BAD_STATE
810 * -AUBO_INVL_ARGUMENT
811 * -AUBO_BAD_STATE
812 *
813 * @throws arcs::common_interface::AuboException
814 *
815 * @par Python函数原型
816 * fcSetSensorLimits(self: pyaubo_sdk.ForceControl, arg0:
817 * List[float]) -> int
818 *
819 * @par Lua函数原型
820 * fcSetSensorLimits(feature: table, compliance: table, wrench:
821 * table, limits: table, type: number) -> nil
822 *
823 * @par Lua示例
824 * fcSetSensorLimits({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)
825 *
826 * \endchinese
827 * \english
828 * Set force control maximum force limits
829 *
830 * @param limits: Force limits
831 *
832 * @return Return 0 if succeeded; return error code if failed
833 * AUBO_BUSY
834 * AUBO_BAD_STATE
835 * -AUBO_INVL_ARGUMENT
836 * -AUBO_BAD_STATE
837 *
838 * @throws arcs::common_interface::AuboException
839 *
840 * @par Python Function Prototype
841 * fcSetSensorLimits(self: pyaubo_sdk.ForceControl, arg0:
842 * List[float]) -> int
843 *
844 * @par Lua Function Prototype
845 * fcSetSensorLimits(feature: table, compliance: table, wrench:
846 * table, limits: table, type: number) -> nil
847 *
848 * @par Lua example
849 * fcSetSensorLimits({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)
850 *
851 * \endenglish
852 */
853 int fcSetSensorLimits(const std::vector<double> &limits);
854
855 /**
856 * \chinese
857 * 获取力控阈值
858 *
859 * @return 力控最小力阈值
860 *
861 * @throws arcs::common_interface::AuboException
862 *
863 * @par Python函数原型
864 * getFcSensorThresholds(self: pyaubo_sdk.ForceControl) -> list
865 *
866 * @par Lua函数原型
867 * getFcSensorThresholds() -> table
868 *
869 * @par Lua函数示例
870 * Fc_Thresholds = getFcSensorThresholds()
871 *
872 * \endchinese
873 * \english
874 * Get force control thresholds
875 *
876 * @return Minimum force control thresholds
877 *
878 * @throws arcs::common_interface::AuboException
879 *
880 * @par Python Function Prototype
881 * getFcSensorThresholds(self: pyaubo_sdk.ForceControl) -> list
882 *
883 * @par Lua Function Prototype
884 * getFcSensorThresholds() -> table
885 *
886 * @par Lua example
887 * Fc_Thresholds = getFcSensorThresholds()
888 *
889 * \endenglish
890 */
891 std::vector<double> getFcSensorThresholds();
892
893 /**
894 * \chinese
895 * 获取最大力限制
896 *
897 * @return 力控最大力限制
898 *
899 * @throws arcs::common_interface::AuboException
900 *
901 * @par Python函数原型
902 * getFcSensorLimits(self: pyaubo_sdk.ForceControl) -> list
903 *
904 * @par Lua函数原型
905 * getFcSensorLimits() -> table
906 *
907 * @par Lua示例
908 * Fc_Limits = getFcSensorLimits()
909 *
910 * \endchinese
911 * \english
912 * Get maximum force limits
913 *
914 * @return Force control maximum force limits
915 *
916 * @throws arcs::common_interface::AuboException
917 *
918 * @par Python Function Prototype
919 * getFcSensorLimits(self: pyaubo_sdk.ForceControl) -> list
920 *
921 * @par Lua Function Prototype
922 * getFcSensorLimits() -> table
923 *
924 * @par Lua example
925 * Fc_Limits = getFcSensorLimits()
926 *
927 * \endenglish
928 */
929 std::vector<double> getFcSensorLimits();
930
931 /**
932 * \chinese
933 * 获取力控动力学模型
934 *
935 * @return 力控动力学模型
936 *
937 * @throws arcs::common_interface::AuboException
938 *
939 * @par Python函数原型
940 * getDynamicModel(self: pyaubo_sdk.ForceControl) -> Tuple[List[float],
941 * List[float], List[float]]
942 *
943 * @par Lua函数原型
944 * getDynamicModel() -> table
945 *
946 * @par Lua示例
947 * Fc_Model = getDynamicModel()
948 *
949 * @par JSON-RPC请求示例
950 * {"jsonrpc":"2.0","method":"rob1.ForceControl.getDynamicModel","params":[],"id":1}
951 *
952 * @par JSON-RPC响应示例
953 * {"id":1,"jsonrpc":"2.0","result":[[],[20.0,20.0,20.0,5.0,5.0,5.0],[]]}
954 * \endchinese
955 * \english
956 * Get force control dynamics model
957 *
958 * @return Force control dynamics model
959 *
960 * @throws arcs::common_interface::AuboException
961 *
962 * @par Python Function Prototype
963 * getDynamicModel(self: pyaubo_sdk.ForceControl) -> Tuple[List[float],
964 * List[float], List[float]]
965 *
966 * @par Lua Function Prototype
967 * getDynamicModel() -> table
968 *
969 * @par Lua example
970 * Fc_Model = getDynamicModel()
971 *
972 * @par JSON-RPC Request example
973 * {"jsonrpc":"2.0","method":"rob1.ForceControl.getDynamicModel","params":[],"id":1}
974 *
975 * @par JSON-RPC Response example
976 * {"id":1,"jsonrpc":"2.0","result":[[],[20.0,20.0,20.0,5.0,5.0,5.0],[]]}
977 * \endenglish
978 */
980
981 /**
982 * \chinese
983 * 设置力控终止条件:力,当测量的力在设置的范围之内,力控算法将保持运行,直到设置的条件不满足,力控将退出
984 *
985 * The condition is lateractivated by calling the instruction
986 * FCCondWaitWhile, which will wait and hold the program execution while the
987 * specified condition is true. This allows the reference force, torque and
988 * movement to continue until the force is outside the specified limits.
989 *
990 * A force condition is set up by defining minimum and maximum limits for
991 * the force in the directions of the force control coordinate system. Once
992 * activated with FCCondWaitWhile, the program execution will continue to
993 * wait while the measured force is within its specified limits.
994 *
995 * It is possible to specify that the condition is fulfilled when the force
996 * is outside the specified limits instead. This is done by using the switch
997 * argument Outside. The condition on force is specified in the force
998 * control coordinate system. This coordinate system is setup by the user in
999 * the instruction FCAct.
1000 *
1001 * @param min 各方向最小的力/力矩
1002 * @param max 各方向最大的力/力矩
1003 * @param outside false 在设置条件的范围之内有效
1004 * true 在设置条件的范围之外有效
1005 * @param timeout
1006 * 时间限制,单位s(秒),从开始力控到达该时间时,不管是否满足力控终止条件,都会终止力控
1007 *
1008 * @return 成功返回0;失败返回错误码
1009 * AUBO_BUSY
1010 * AUBO_BAD_STATE
1011 * -AUBO_INVL_ARGUMENT
1012 * -AUBO_BAD_STATE
1013 *
1014 * @throws arcs::common_interface::AuboException
1015 *
1016 * @par Python函数原型
1017 * setCondForce(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1018 * List[float], arg2: bool, arg3: float) -> int
1019 *
1020 * @par Lua函数原型
1021 * setCondForce(min: table, max: table, outside: boolean, timeout: number)
1022 * -> nil
1023 * @par Lua示例
1024 * 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)
1025 *
1026 * \endchinese
1027 * \english
1028 * Set force control termination condition: Force. When the measured force is within
1029 * the specified range, the force control algorithm will continue to run until the set
1030 * condition is not met, at which point force control will exit.
1031 *
1032 * The condition is lateractivated by calling the instruction
1033 * FCCondWaitWhile, which will wait and hold the program execution while the
1034 * specified condition is true. This allows the reference force, torque and
1035 * movement to continue until the force is outside the specified limits.
1036 *
1037 * A force condition is set up by defining minimum and maximum limits for
1038 * the force in the directions of the force control coordinate system. Once
1039 * activated with FCCondWaitWhile, the program execution will continue to
1040 * wait while the measured force is within its specified limits.
1041 *
1042 * It is possible to specify that the condition is fulfilled when the force
1043 * is outside the specified limits instead. This is done by using the switch
1044 * argument Outside. The condition on force is specified in the force
1045 * control coordinate system. This coordinate system is setup by the user in
1046 * the instruction FCAct.
1047 *
1048 * @param min Minimum force/torque in each direction
1049 * @param max Maximum force/torque in each direction
1050 * @param outside false: valid within the specified range
1051 * true: valid outside the specified range
1052 * @param timeout
1053 * Time limit in seconds; when this time is reached from the start of force control,
1054 * force control will terminate regardless of whether the end condition is met
1055 *
1056 * @return Return 0 if succeeded; return error code if failed
1057 * AUBO_BUSY
1058 * AUBO_BAD_STATE
1059 * -AUBO_INVL_ARGUMENT
1060 * -AUBO_BAD_STATE
1061 *
1062 * @throws arcs::common_interface::AuboException
1063 *
1064 * @par Python Function Prototype
1065 * setCondForce(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1066 * List[float], arg2: bool, arg3: float) -> int
1067 *
1068 * @par Lua Function Prototype
1069 * setCondForce(min: table, max: table, outside: boolean, timeout: number)
1070 * -> nil
1071 * @par Lua example
1072 * 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)
1073 *
1074 * \endenglish
1075 */
1076 int setCondForce(const std::vector<double> &min,
1077 const std::vector<double> &max, bool outside,
1078 double timeout);
1079
1080 /**
1081 * \chinese
1082 * 设置力控终止条件:姿态,当测量的姿态在设置的范围之内,力控算法将保持运行,直到设置的条件不满足,力控将退出.
1083 *
1084 * setCondOrient is used to set up an end condition for the tool orientation.
1085 * The condition is lateractivated by calling the instruction
1086 * FCCondWaitWhile, which will wait and hold the program execution while the
1087 * specified condition is true. This allows the reference force, torque and
1088 * movement to continue until the orientation is outside the specified
1089 * limits.
1090 *
1091 * An orientation condition is set up by defining a maximum angle and a
1092 * maximum rotation from a reference orientation. The reference orientation
1093 * is either defined by the current z direction of the tool, or by
1094 * specifying an orientation in relation to the z direction of the work
1095 * object.
1096 *
1097 * Once activated, the tool orientation must be within the limits (or
1098 * outside, if the argument Outside is used).
1099 *
1100 * @param frame
1101 * @param max_angle
1102 * @param max_rot
1103 * @param outside
1104 * @param timeout
1105 *
1106 * @return 成功返回0;失败返回错误码
1107 * AUBO_BUSY
1108 * AUBO_BAD_STATE
1109 * -AUBO_INVL_ARGUMENT
1110 * -AUBO_BAD_STATE
1111 *
1112 * @throws arcs::common_interface::AuboException
1113 *
1114 * @par Python函数原型
1115 * setCondOrient(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1116 * float, arg2: float, arg3: bool, arg4: float) -> int
1117 *
1118 * @par Lua函数原型
1119 * setCondOrient(frame: table, max_angle: number, max_rot: number, outside:
1120 * boolean, timeout: number) -> nil
1121 *
1122 * @par Lua示例
1123 * setCondOrient({0.1, 0.3, 0.1, 0.3142, 0.0, 1.571},30.0,20.0,true,10.0)
1124 *
1125 * \endchinese
1126 *
1127 * \english
1128 * setCondOrient is used to set up an end condition for the tool orientation.
1129 * The condition will wait and hold the program execution while the
1130 * specified condition is true. This allows the reference force, torque and
1131 * movement to continue until the orientation is outside the specified
1132 * limits.
1133 *
1134 * An orientation condition is set up by defining a maximum angle and a
1135 * maximum rotation from a reference orientation. The reference orientation
1136 * is either defined by the current z direction of the tool, or by
1137 * specifying an orientation in relation to the z direction of the work
1138 * object.
1139 *
1140 * Once activated, the tool orientation must be within the limits (or
1141 * outside, if the argument Outside is used).
1142 *
1143 * @param frame
1144 * @param max_angle
1145 * @param max_rot
1146 * @param outside
1147 * @param timeout
1148 *
1149 * @return Return 0 if succeeded; return error code if failed
1150 * AUBO_BUSY
1151 * AUBO_BAD_STATE
1152 * -AUBO_INVL_ARGUMENT
1153 * -AUBO_BAD_STATE
1154 *
1155 * @throws arcs::common_interface::AuboException
1156 *
1157 * @par Python Function Prototype
1158 * setCondOrient(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1159 * float, arg2: float, arg3: bool, arg4: float) -> int
1160 *
1161 * @par Lua Function Prototype
1162 * setCondOrient(frame: table, max_angle: number, max_rot: number, outside:
1163 * boolean, timeout: number) -> nil
1164 *
1165 * @par Lua example
1166 * setCondOrient({0.1, 0.3, 0.1, 0.3142, 0.0, 1.571},30.0,20.0,true,10.0)
1167 *
1168 * \endenglish
1169 */
1170 int setCondOrient(const std::vector<double> &frame, double max_angle,
1171 double max_rot, bool outside, double timeout);
1172
1173 /**
1174 * \chinese
1175 * 指定力控有效平面,x-y平面,z方向有效
1176 *
1177 * @param plane={A,B,C,D}
1178 * 平面表示方法 Ax +By +Cz + D = 0
1179 * 其中,n = (A, B, C)是平面的法向量,
1180 * D 是将平面平移到坐标原点所需距离(所以D=0时,平面过原点)
1181 * @param timeout
1182 *
1183 * @return 成功返回0;失败返回错误码
1184 * AUBO_BUSY
1185 * AUBO_BAD_STATE
1186 * -AUBO_INVL_ARGUMENT
1187 * -AUBO_BAD_STATE
1188 *
1189 * @throws arcs::common_interface::AuboException
1190 *
1191 * @par Python函数原型
1192 * setCondPlane(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1193 * float) -> int
1194 *
1195 * @par Lua函数原型
1196 * setCondPlane(plane: table, timeout: number) -> nil
1197 *
1198 * @par Lua示例
1199 * setCondPlane({0.1, 0.3, 0.1, 0.3},10.0)
1200 *
1201 * \endchinese
1202 * \english
1203 * Specify a valid force control plane, x-y plane, z direction is valid
1204 *
1205 * @param plane={A,B,C,D}
1206 * Plane equation: Ax + By + Cz + D = 0
1207 * where n = (A, B, C) is the normal vector of the plane,
1208 * D is the distance required to move the plane to the origin (so D=0 means the plane passes through the origin)
1209 * @param timeout
1210 *
1211 * @return Return 0 if succeeded; return error code if failed
1212 * AUBO_BUSY
1213 * AUBO_BAD_STATE
1214 * -AUBO_INVL_ARGUMENT
1215 * -AUBO_BAD_STATE
1216 *
1217 * @throws arcs::common_interface::AuboException
1218 *
1219 * @par Python Function Prototype
1220 * setCondPlane(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1221 * float) -> int
1222 *
1223 * @par Lua Function Prototype
1224 * setCondPlane(plane: table, timeout: number) -> nil
1225 *
1226 * @par Lua example
1227 * setCondPlane({0.1, 0.3, 0.1, 0.3},10.0)
1228 *
1229 * \endenglish
1230 */
1231 int setCondPlane(const std::vector<double> &plane, double timeout);
1232
1233 /**
1234 * \chinese
1235 * 指定力控有效圆柱体,提供中心轴和圆柱半径,可以指定圆柱内部还是外部
1236 *
1237 * @param axis
1238 * @param radius
1239 * @param outside
1240 * @param timeout
1241 *
1242 * @return 成功返回0;失败返回错误码
1243 * AUBO_BUSY
1244 * AUBO_BAD_STATE
1245 * -AUBO_INVL_ARGUMENT
1246 * -AUBO_BAD_STATE
1247 *
1248 * @throws arcs::common_interface::AuboException
1249 *
1250 * @par Python函数原型
1251 * setCondCylinder(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1252 * float, arg2: bool, arg3: float) -> int
1253 *
1254 * @par Lua函数原型
1255 * setCondCylinder(axis: table, radius: number, outside: boolean, timeout:
1256 * number) -> nil
1257 *
1258 * @par Lua示例
1259 * setCondCylinder({0,1,0},10.0,true,5,0)
1260 *
1261 * \endchinese
1262 * \english
1263 * 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.
1264 *
1265 * @param axis
1266 * @param radius
1267 * @param outside
1268 * @param timeout
1269 *
1270 * @return Return 0 if succeeded; return error code if failed
1271 * AUBO_BUSY
1272 * AUBO_BAD_STATE
1273 * -AUBO_INVL_ARGUMENT
1274 * -AUBO_BAD_STATE
1275 *
1276 * @throws arcs::common_interface::AuboException
1277 *
1278 * @par Python Function Prototype
1279 * setCondCylinder(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1280 * float, arg2: bool, arg3: float) -> int
1281 *
1282 * @par Lua Function Prototype
1283 * setCondCylinder(axis: table, radius: number, outside: boolean, timeout:
1284 * number) -> nil
1285 *
1286 * @par Lua example
1287 * setCondCylinder({0,1,0},10.0,true,5,0)
1288 *
1289 * \endenglish
1290 */
1291 int setCondCylinder(const std::vector<double> &axis, double radius,
1292 bool outside, double timeout);
1293
1294 /**
1295 * \chinese
1296 * 指定力控有效球体,提供球心和半径,可以指定球体内部还是外部
1297 *
1298 * @param center
1299 * @param radius
1300 * @param outside
1301 * @param timeout
1302 *
1303 * @return 成功返回0;失败返回错误码
1304 * AUBO_BUSY
1305 * AUBO_BAD_STATE
1306 * -AUBO_INVL_ARGUMENT
1307 * -AUBO_BAD_STATE
1308 *
1309 * @throws arcs::common_interface::AuboException
1310 *
1311 * @par Python函数原型
1312 * setCondSphere(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1313 * float, arg2: bool, arg3: float) -> int
1314 *
1315 * @par Lua函数原型
1316 * setCondSphere(center: table, radius: number, outside: boolean, timeout:
1317 * number) -> nil
1318 *
1319 * @par Lua示例
1320 * setCondSphere({0.2, 0.5, 0.1, 1.57, 0, 0},10.0,true,5,0)
1321 *
1322 * \endchinese
1323 * \english
1324 * Specify a valid force control sphere by providing the center and radius, and specify whether the inside or outside of the sphere is valid.
1325 *
1326 * @param center
1327 * @param radius
1328 * @param outside
1329 * @param timeout
1330 *
1331 * @return Return 0 if succeeded; return error code if failed
1332 * AUBO_BUSY
1333 * AUBO_BAD_STATE
1334 * -AUBO_INVL_ARGUMENT
1335 * -AUBO_BAD_STATE
1336 *
1337 * @throws arcs::common_interface::AuboException
1338 *
1339 * @par Python Function Prototype
1340 * setCondSphere(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1341 * float, arg2: bool, arg3: float) -> int
1342 *
1343 * @par Lua Function Prototype
1344 * setCondSphere(center: table, radius: number, outside: boolean, timeout:
1345 * number) -> nil
1346 *
1347 * @par Lua example
1348 * setCondSphere({0.2, 0.5, 0.1, 1.57, 0, 0},10.0,true,5,0)
1349 *
1350 * \endenglish
1351 */
1352 int setCondSphere(const std::vector<double> &center, double radius,
1353 bool outside, double timeout);
1354
1355 /**
1356 * \chinese
1357 * 设置TCP速度的终止条件。该条件可通过调用FCCondWaitWhile指令激活,
1358 * 在指定条件为真时,程序将等待并保持执行。这样可以使参考力、力矩和运动继续,
1359 * 直到速度超出指定范围。
1360 *
1361 * 通过定义TCP在工作对象所有方向上的最小和最大速度限制来设置TCP速度条件。
1362 * 一旦通过FCCondWaitWhile激活,程序将在测量速度处于指定范围内时继续等待。
1363 *
1364 * 也可以指定当速度超出指定范围时条件成立,通过使用outside参数实现。
1365 * TCP速度条件在工作对象坐标系中指定。
1366 *
1367 * @param min 最小速度
1368 * @param max 最大速度
1369 * @param outside 是否在范围外有效
1370 * @param timeout 超时时间
1371 *
1372 * @return 成功返回0;失败返回错误码
1373 * AUBO_BUSY
1374 * AUBO_BAD_STATE
1375 * -AUBO_INVL_ARGUMENT
1376 * -AUBO_BAD_STATE
1377 *
1378 * @throws arcs::common_interface::AuboException
1379 *
1380 * @par Python函数原型
1381 * setCondTcpSpeed(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1382 * List[float], arg2: bool, arg3: float) -> int
1383 *
1384 * @par Lua函数原型
1385 * setCondTcpSpeed(min: table, max: table, outside: boolean, timeout:
1386 * number) -> nil
1387 *
1388 * @par Lua示例
1389 * 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)
1390 *
1391 * \endchinese
1392 * \english
1393 * setCondTcpSpeed is used to setup an end condition for the TCP speed. The
1394 * condition is later activated by calling the instruction FCCondWaitWhile,
1395 * which will wait and hold the program execution while the specified
1396 * condition is true. This allows the reference force, torque and movement
1397 * to continue until the speed is outside the specified limits.
1398 *
1399 * A TCP speed condition is set up by defining minimum and maximum limits
1400 * for the TCP speed in all directions of the work object. Once activated
1401 * with FCCondWaitWhile, the program execution will continue to wait while
1402 * the measured speed is within its specified limits.
1403 *
1404 * It is possible to specify that the condition is fulfilled when the speed
1405 * is outside the specified limits instead. This is done by using the
1406 * switch argument Outside. The condition on TCP speed is specified in the
1407 * work object coordinate system.
1408 *
1409 * @param min
1410 * @param max
1411 * @param outside
1412 * @param timeout
1413 *
1414 * @return Return 0 if succeeded; return error code if failed
1415 * AUBO_BUSY
1416 * AUBO_BAD_STATE
1417 * -AUBO_INVL_ARGUMENT
1418 * -AUBO_BAD_STATE
1419 *
1420 * @throws arcs::common_interface::AuboException
1421 *
1422 * @par Python Function Prototype
1423 * setCondTcpSpeed(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1424 * List[float], arg2: bool, arg3: float) -> int
1425 *
1426 * @par Lua Function Prototype
1427 * setCondTcpSpeed(min: table, max: table, outside: boolean, timeout:
1428 * number) -> nil
1429 *
1430 * @par Lua example
1431 * 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)
1432 *
1433 * \endenglish
1434 */
1435 int setCondTcpSpeed(const std::vector<double> &min,
1436 const std::vector<double> &max, bool outside,
1437 double timeout);
1438
1439 /**
1440 * \chinese
1441 * 力控终止条件-距离
1442 *
1443 * @param distance 距离
1444 * @param timeout 超时时间
1445 *
1446 * @return 成功返回0;失败返回错误码
1447 * AUBO_BUSY
1448 * AUBO_BAD_STATE
1449 * -AUBO_INVL_ARGUMENT
1450 * -AUBO_BAD_STATE
1451 *
1452 * @throws arcs::common_interface::AuboException
1453 *
1454 * @par Lua函数原型
1455 * setCondDistance(distance: number, timeout: number)
1456 *
1457 * @par Lua示例
1458 * setCondDistance(0.2, 10.0)
1459 *
1460 * \endchinese
1461 * \english
1462 * Force control termination condition - distance
1463 *
1464 * @param distance Distance
1465 * @param timeout Timeout
1466 *
1467 * @return Return 0 if succeeded; return error code if failed
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 Function Prototype
1476 * setCondDistance(distance: number, timeout: number)
1477 *
1478 * @par Lua example
1479 * setCondDistance(0.2, 10.0)
1480 *
1481 * \endenglish
1482 */
1483 int setCondDistance(double distance, double timeout);
1484
1485 /**
1486 * \chinese
1487 * 高级力控终止条件
1488 *
1489 * @param type 类型
1490 * @param args 参数
1491 * @param timeout 超时时间
1492 *
1493 * @return 成功返回0;失败返回错误码
1494 * AUBO_BUSY
1495 * AUBO_BAD_STATE
1496 * -AUBO_INVL_ARGUMENT
1497 * -AUBO_BAD_STATE
1498 *
1499 * @throws arcs::common_interface::AuboException
1500 *
1501 * @par Lua函数原型
1502 * setCondAdvanced(type: number, args: table, timeout: number)
1503 *
1504 * @par Lua示例
1505 * setCondAdvanced(1, {0,1,0,0,0,0},10)
1506 *
1507 * \endchinese
1508 * \english
1509 * Advanced force control termination condition
1510 *
1511 * @param type Type
1512 * @param args Arguments
1513 * @param timeout Timeout
1514 *
1515 * @return Return 0 if succeeded; return error code if failed
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 Function Prototype
1524 * setCondAdvanced(type: number, args: table, timeout: number)
1525 *
1526 * @par Lua example
1527 * setCondAdvanced(1, {0,1,0,0,0,0},10)
1528 *
1529 * \endenglish
1530 */
1531 int setCondAdvanced(const std::string &type,
1532 const std::vector<double> &args, double timeout);
1533
1534 /**
1535 * \chinese
1536 * 激活力控终止条件
1537 *
1538 * @return 成功返回0;失败返回错误码
1539 * AUBO_BUSY
1540 * AUBO_BAD_STATE
1541 * -AUBO_BAD_STATE
1542 *
1543 * @throws arcs::common_interface::AuboException
1544 *
1545 * @par Python函数原型
1546 * setCondActive(self: pyaubo_sdk.ForceControl) -> int
1547 *
1548 * @par Lua函数原型
1549 * setCondActive() -> nil
1550 *
1551 * @par Lua示例
1552 * setCondActive()
1553 *
1554 * @par JSON-RPC请求示例
1555 * {"jsonrpc":"2.0","method":"rob1.ForceControl.setCondActive","params":[],"id":1}
1556 *
1557 * @par JSON-RPC响应示例
1558 * {"id":1,"jsonrpc":"2.0","result":0}
1559 * \endchinese
1560 * \english
1561 * Activate force control termination condition
1562 *
1563 * @return Return 0 if succeeded; return error code if failed
1564 * AUBO_BUSY
1565 * AUBO_BAD_STATE
1566 * -AUBO_BAD_STATE
1567 *
1568 * @throws arcs::common_interface::AuboException
1569 *
1570 * @par Python Function Prototype
1571 * setCondActive(self: pyaubo_sdk.ForceControl) -> int
1572 *
1573 * @par Lua Function Prototype
1574 * setCondActive() -> nil
1575 *
1576 * @par Lua example
1577 * setCondActive()
1578 *
1579 * @par JSON-RPC Request example
1580 * {"jsonrpc":"2.0","method":"rob1.ForceControl.setCondActive","params":[],"id":1}
1581 *
1582 * @par JSON-RPC Response example
1583 * {"id":1,"jsonrpc":"2.0","result":0}
1584 * \endenglish
1585 */
1587
1588 /**
1589 * \chinese
1590 * 力控终止条件是否已经满足
1591 *
1592 * @return
1593 *
1594 * @throws arcs::common_interface::AuboException
1595 *
1596 * @par Python函数原型
1597 * isCondFullfiled(self: pyaubo_sdk.ForceControl) -> bool
1598 *
1599 * @par Lua函数原型
1600 * isCondFullfiled() -> boolean
1601 *
1602 * @par Lua示例
1603 * status = isCondFullfiled()
1604 *
1605 * @par JSON-RPC请求示例
1606 * {"jsonrpc":"2.0","method":"rob1.ForceControl.isCondFullfiled","params":[],"id":1}
1607 *
1608 * @par JSON-RPC响应示例
1609 * {"id":1,"jsonrpc":"2.0","result":false}
1610 * \endchinese
1611 * \english
1612 * Check if the force control termination condition has been fulfilled
1613 *
1614 * @return
1615 *
1616 * @throws arcs::common_interface::AuboException
1617 *
1618 * @par Python Function Prototype
1619 * isCondFullfiled(self: pyaubo_sdk.ForceControl) -> bool
1620 *
1621 * @par Lua Function Prototype
1622 * isCondFullfiled() -> boolean
1623 *
1624 * @par Lua example
1625 * status = isCondFullfiled()
1626 *
1627 * @par JSON-RPC Request example
1628 * {"jsonrpc":"2.0","method":"rob1.ForceControl.isCondFullfiled","params":[],"id":1}
1629 *
1630 * @par JSON-RPC Response example
1631 * {"id":1,"jsonrpc":"2.0","result":false}
1632 * \endenglish
1633 */
1635
1636 /**
1637 * \chinese
1638 * setSupvForce 用于在力控中设置力监督。监督在通过 FCAct 指令激活力控时被激活。
1639 *
1640 * 力监督通过在力控坐标系的各个方向上定义最小和最大力限制来设置。
1641 * 一旦激活,如果力超出允许的范围,监督将停止执行。力监督在力控坐标系中指定。
1642 * 该坐标系由用户通过 FCAct 指令设置。
1643 *
1644 * @param min 最小力限制
1645 * @param max 最大力限制
1646 *
1647 * @return 成功返回0;失败返回错误码
1648 * AUBO_BUSY
1649 * AUBO_BAD_STATE
1650 * -AUBO_INVL_ARGUMENT
1651 * -AUBO_BAD_STATE
1652 *
1653 * @throws arcs::common_interface::AuboException
1654 *
1655 * @par Python函数原型
1656 * setSupvForce(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1657 * List[float]) -> int
1658 *
1659 * @par Lua函数原型
1660 * setSupvForce(min: table, max: table) -> nil
1661 *
1662 * @par Lua示例
1663 * 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})
1664 *
1665 * \endchinese
1666 * \english
1667 * setSupvForce is used to set up force supervision in Force Control. The
1668 * supervision is activated when Force Control is activated with the
1669 * instruction FCAct.
1670 *
1671 * The force supervision is set up by defining minimum and maximum limits
1672 * for the force in the directions of the force control coordinate system.
1673 * Once activated, the supervision will stop the execution if the force is
1674 * outside the allowed values. The force supervision is specified in the
1675 * force control coordinate system. This coordinate system is setup by the
1676 * user with the instruction FCAct.
1677 *
1678 * @param min
1679 * @param max
1680 *
1681 * @return Return 0 if succeeded; return error code if failed
1682 * AUBO_BUSY
1683 * AUBO_BAD_STATE
1684 * -AUBO_INVL_ARGUMENT
1685 * -AUBO_BAD_STATE
1686 *
1687 * @throws arcs::common_interface::AuboException
1688 *
1689 * @par Python Function Prototype
1690 * setSupvForce(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1691 * List[float]) -> int
1692 *
1693 * @par Lua Function Prototype
1694 * setSupvForce(min: table, max: table) -> nil
1695 *
1696 * @par Lua example
1697 * 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})
1698 *
1699 * \endenglish
1700 */
1701 int setSupvForce(const std::vector<double> &min,
1702 const std::vector<double> &max);
1703
1704 /**
1705 * \chinese
1706 * setSupvOrient 用于设置工具姿态的监督条件。
1707 * 当通过 FCAct 指令激活力控时,监督条件被激活。
1708 *
1709 * 姿态监督通过定义相对于参考姿态的最大角度和最大旋转来设置。
1710 * 参考姿态可以由工具当前的z方向定义,也可以通过指定相对于工作对象z方向的姿态来定义。
1711 *
1712 * 一旦激活,工具姿态必须在限制范围内,否则监督将停止执行。
1713 *
1714 * @param frame
1715 * @param max_angle
1716 * @param max_rot
1717 * @param outside
1718 *
1719 * @return 成功返回0;失败返回错误码
1720 * AUBO_BUSY
1721 * AUBO_BAD_STATE
1722 * -AUBO_INVL_ARGUMENT
1723 * -AUBO_BAD_STATE
1724 *
1725 * @throws arcs::common_interface::AuboException
1726 *
1727 * @par Python函数原型
1728 * setSupvOrient(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1729 * float, arg2: float, arg3: bool) -> int
1730 *
1731 * @par Lua函数原型
1732 * setSupvOrient(frame: table, max_angle: number, max_rot: number,
1733 * outside: boolean) -> nil
1734 * \endchinese
1735 * \english
1736 * setSupvOrient is used to set up an supervision for the tool orientation.
1737 * The supervision is activated when Force Control is activated with the
1738 * instruction FCAct.
1739 *
1740 * An orientation supervision is set up by defining a maximum angle and a
1741 * maximum rotation from a reference orientation. The reference orientation
1742 * is either defined by the current z direction of the tool, or by
1743 * specifying an orientation in relation to the z direction of the work
1744 * object.
1745 *
1746 * Once activated, the tool orientation must be within the limits otherwise
1747 * the supervision will stop the execution.
1748 *
1749 * @param frame
1750 * @param max_angle
1751 * @param max_rot
1752 * @param outside
1753 *
1754 * @return Return 0 if succeeded; return error code if failed
1755 * AUBO_BUSY
1756 * AUBO_BAD_STATE
1757 * -AUBO_INVL_ARGUMENT
1758 * -AUBO_BAD_STATE
1759 *
1760 * @throws arcs::common_interface::AuboException
1761 *
1762 * @par Python Function Prototype
1763 * setSupvOrient(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1764 * float, arg2: float, arg3: bool) -> int
1765 *
1766 * @par Lua Function Prototype
1767 * setSupvOrient(frame: table, max_angle: number, max_rot: number,
1768 * outside: boolean) -> nil
1769 * \endenglish
1770 */
1771 int setSupvOrient(const std::vector<double> &frame, double max_angle,
1772 double max_rot, bool outside);
1773
1774 /**
1775 * \chinese
1776 * setSupvPosBox 用于在力控中设置位置监督。监督在通过 FCAct 指令激活力控时被激活。
1777 * 位置监督通过为TCP定义空间体积来设置。一旦激活,如果TCP超出该体积,监督将停止执行。
1778 *
1779 * @param frame
1780 * @param box
1781 *
1782 * @return 成功返回0;失败返回错误码
1783 * AUBO_BUSY
1784 * AUBO_BAD_STATE
1785 * -AUBO_INVL_ARGUMENT
1786 * -AUBO_BAD_STATE
1787 *
1788 * @throws arcs::common_interface::AuboException
1789 *
1790 * @par Python函数原型
1791 * setSupvPosBox(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1792 * List[float[6]]) -> int
1793 *
1794 * @par Lua函数原型
1795 * setSupvPosBox(frame: table, box: table) -> nil
1796 * \endchinese
1797 * \english
1798 * setSupvPosBox is used to set up position supervision in Force Control.
1799 * Supervision is activated when Force Control is activated with the
1800 * instruction FCAct. Position supervision is set up by defining a volume in
1801 * space for the TCP. Once activated, the supervision will stop the
1802 * execution if the TCP is outside this volume.
1803 *
1804 * @param frame
1805 * @param box
1806 *
1807 * @return Return 0 if succeeded; return error code if failed
1808 * AUBO_BUSY
1809 * AUBO_BAD_STATE
1810 * -AUBO_INVL_ARGUMENT
1811 * -AUBO_BAD_STATE
1812 *
1813 * @throws arcs::common_interface::AuboException
1814 *
1815 * @par Python Function Prototype
1816 * setSupvPosBox(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1817 * List[float[6]]) -> int
1818 *
1819 * @par Lua Function Prototype
1820 * setSupvPosBox(frame: table, box: table) -> nil
1821 * \endenglish
1822 */
1823 int setSupvPosBox(const std::vector<double> &frame, const Box &box);
1824
1825 /**
1826 * \chinese
1827 *
1828 * @param frame
1829 * @param cylinder
1830 *
1831 * @return 成功返回0;失败返回错误码
1832 * AUBO_BUSY
1833 * AUBO_BAD_STATE
1834 * -AUBO_INVL_ARGUMENT
1835 * -AUBO_BAD_STATE
1836 *
1837 * @throws arcs::common_interface::AuboException
1838 *
1839 * @par Python函数原型
1840 * setSupvPosCylinder(self: pyaubo_sdk.ForceControl, arg0: List[float],
1841 * arg1: List[float[5]]) -> int
1842 *
1843 * @par Lua函数原型
1844 * setSupvPosCylinder(frame: table, cylinder: table) -> nil
1845 *
1846 * \endchinese
1847 * \english
1848 *
1849 * @param frame
1850 * @param cylinder
1851 *
1852 * @return Return 0 if succeeded; return error code if failed
1853 * AUBO_BUSY
1854 * AUBO_BAD_STATE
1855 * -AUBO_INVL_ARGUMENT
1856 * -AUBO_BAD_STATE
1857 *
1858 * @throws arcs::common_interface::AuboException
1859 *
1860 * @par Python Function Prototype
1861 * setSupvPosCylinder(self: pyaubo_sdk.ForceControl, arg0: List[float],
1862 * arg1: List[float[5]]) -> int
1863 *
1864 * @par Lua Function Prototype
1865 * setSupvPosCylinder(frame: table, cylinder: table) -> nil
1866 *
1867 * \endenglish
1868 */
1869 int setSupvPosCylinder(const std::vector<double> &frame,
1870 const Cylinder &cylinder);
1871
1872 /**
1873 * \chinese
1874 *
1875 * @param frame
1876 * @param sphere
1877 *
1878 * @return 成功返回0;失败返回错误码
1879 * AUBO_BUSY
1880 * AUBO_BAD_STATE
1881 * -AUBO_INVL_ARGUMENT
1882 * -AUBO_BAD_STATE
1883 *
1884 * @throws arcs::common_interface::AuboException
1885 *
1886 * @par Python函数原型
1887 * setSupvPosSphere(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1888 * List[float[3]]) -> int
1889 *
1890 * @par Lua函数原型
1891 * setSupvPosSphere(frame: table, sphere: table) -> nil
1892 *
1893 * \endchinese
1894 * \english
1895 *
1896 * @param frame
1897 * @param sphere
1898 *
1899 * @return Return 0 if succeeded; return error code if failed
1900 * AUBO_BUSY
1901 * AUBO_BAD_STATE
1902 * -AUBO_INVL_ARGUMENT
1903 * -AUBO_BAD_STATE
1904 *
1905 * @throws arcs::common_interface::AuboException
1906 *
1907 * @par Python Function Prototype
1908 * setSupvPosSphere(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
1909 * List[float[3]]) -> int
1910 *
1911 * @par Lua Function Prototype
1912 * setSupvPosSphere(frame: table, sphere: table) -> nil
1913 *
1914 * \endenglish
1915 */
1916 int setSupvPosSphere(const std::vector<double> &frame,
1917 const Sphere &sphere);
1918
1919 /**
1920 * \chinese
1921 * setSupvReoriSpeed 用于在力控中设置重新定向速度监督。监督在通过 FCAct 指令激活力控时被激活。
1922 *
1923 * 重新定向速度监督通过定义工作对象坐标系轴周围重新定向速度的最小和最大限制来设置。
1924 * 一旦激活,如果重新定向速度的值过高,监督将停止执行。
1925 *
1926 * 有两种速度监督:FCSupvReoriSpeed 和 FCSupvTCPSpeed,后者在第199页的 FCSupvTCPSpeed 部分有描述。
1927 * 可能需要两种监督,因为:
1928 * - 机器人轴可以在 TCP 静止时高速旋转。
1929 * - 当 TCP 距离旋转轴较远时,轴的微小旋转可能导致 TCP 的高速运动。
1930 *
1931 * @param speed_limit 速度限制
1932 * @param outside 是否在范围外有效
1933 * @param timeout 超时时间
1934 *
1935 * @return 成功返回0;失败返回错误码
1936 * AUBO_BUSY
1937 * AUBO_BAD_STATE
1938 * -AUBO_INVL_ARGUMENT
1939 * -AUBO_BAD_STATE
1940 *
1941 * @throws arcs::common_interface::AuboException
1942 *
1943 * @par Python函数原型
1944 * setSupvReoriSpeed(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: bool, arg2: float) -> int
1945 *
1946 * @par Lua函数原型
1947 * setSupvReoriSpeed(speed_limit: table, outside: boolean, timeout: number) -> nil
1948 * \endchinese
1949 * \english
1950 * 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.
1951 *
1952 * 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.
1953 *
1954 * There are two speed supervisions: FCSupvReoriSpeed and FCSupvTCPSpeed, which is described in section FCSupvTCPSpeed on page 199.
1955 * Both supervisions may be required because:
1956 * - A robot axis can rotate with high speed while the TCP is stationary.
1957 * - The TCP can be far from the rotating axis and a small axis rotation may result in a high speed movement of the TCP.
1958 *
1959 * @param speed_limit
1960 * @param outside
1961 * @param timeout
1962 *
1963 * @return Return 0 if succeeded; return error code if failed
1964 * AUBO_BUSY
1965 * AUBO_BAD_STATE
1966 * -AUBO_INVL_ARGUMENT
1967 * -AUBO_BAD_STATE
1968 *
1969 * @throws arcs::common_interface::AuboException
1970 *
1971 * @par Python Function Prototype
1972 * setSupvReoriSpeed(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: bool, arg2: float) -> int
1973 *
1974 * @par Lua Function Prototype
1975 * setSupvReoriSpeed(speed_limit: table, outside: boolean, timeout: number) -> nil
1976 * \endenglish
1977 */
1978 int setSupvReoriSpeed(const std::vector<double> &speed_limit, bool outside,
1979 double timeout);
1980
1981 /**
1982 * \chinese
1983 * setSupvTcpSpeed 用于在力控中设置TCP速度监督。监督在通过 FCAct 指令激活力控时被激活。
1984 * TCP速度监督通过定义工作对象坐标系各方向上的最小和最大速度限制来设置。
1985 * 一旦激活,如果检测到过高的TCP速度值,监督将停止执行。
1986 *
1987 * 有两种速度监督:FCSupvTCPSpeed 和 FCSupvReoriSpeed,后者在第197页的 FCSupvReoriSpeed 部分有描述。
1988 *
1989 * 可能需要两种监督,因为:
1990 * - 机器人轴可以在TCP静止时高速旋转。
1991 * - 当TCP距离旋转轴较远时,轴的微小旋转可能导致TCP的高速运动。
1992 *
1993 * @param speed_limit 速度限制
1994 * @param outside 是否在范围外有效
1995 * @param timeout 超时时间
1996 *
1997 * @return 成功返回0;失败返回错误码
1998 * AUBO_BUSY
1999 * AUBO_BAD_STATE
2000 * -AUBO_INVL_ARGUMENT
2001 * -AUBO_BAD_STATE
2002 *
2003 * @throws arcs::common_interface::AuboException
2004 *
2005 * @par Python函数原型
2006 * setSupvTcpSpeed(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: bool, arg2: float) -> int
2007 *
2008 * @par Lua函数原型
2009 * setSupvTcpSpeed(speed_limit: table, outside: boolean, timeout: number) -> nil
2010 * \endchinese
2011 * \english
2012 * setSupvTcpSpeed is used to set up TCP speed supervision in Force Control.
2013 * The supervision is activated when Force Control is activated with the
2014 * instruction FCAct. The TCP speed supervision is set up by defining
2015 * minimum and maximum limits for the TCP speed in the directions of the
2016 * work object coordinate system. Once activated, the supervision will stop
2017 * the execution if too high TCP speed values are detected.
2018 *
2019 * There are two speed supervisions: FCSupvTCPSpeed and FCSupvReoriSpeed,
2020 * which is described in section FCSupvReoriSpeed on page 197.
2021 *
2022 * Both supervisions may be required because:
2023 * - A robot axis can rotate with high speed while the TCP is stationary.
2024 * - The TCP can be far from the rotating axis and a small axis rotation may
2025 * result in a high speed movement of the TCP.
2026 *
2027 * @param speed_limit
2028 * @param outside
2029 * @param timeout
2030 *
2031 * @return Return 0 if succeeded; return error code if failed
2032 * AUBO_BUSY
2033 * AUBO_BAD_STATE
2034 * -AUBO_INVL_ARGUMENT
2035 * -AUBO_BAD_STATE
2036 *
2037 * @throws arcs::common_interface::AuboException
2038 *
2039 * @par Python Function Prototype
2040 * setSupvTcpSpeed(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: bool, arg2: float) -> int
2041 *
2042 * @par Lua Function Prototype
2043 * setSupvTcpSpeed(speed_limit: table, outside: boolean, timeout: number) -> nil
2044 * \endenglish
2045 */
2046 int setSupvTcpSpeed(const std::vector<double> &speed_limit, bool outside,
2047 double timeout);
2048
2049 // 设置低通滤波器
2050 // --- force frame filter: 过滤测量到的力/力矩
2051 // +++ force loop filter: 力控输出参考速度的滤波器
2052
2053 /**
2054 * \chinese
2055 * 设置低通滤波器
2056 *
2057 * --- force frame filter: 过滤测量到的力/力矩
2058 * +++ force loop filter: 力控输出参考速度的滤波器
2059 *
2060 * @param cutoff_freq 截止频率
2061 *
2062 * @return 成功返回0;失败返回错误码
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函数原型
2071 * setLpFilter(self: pyaubo_sdk.ForceControl, arg0: List[float]) -> int
2072 *
2073 * @par Lua函数原型
2074 * setLpFilter(cutoff_freq: table) -> nil
2075 * \endchinese
2076 * \english
2077 * Set low-pass filter
2078 *
2079 * --- force frame filter: filter measured force/torque
2080 * +++ force loop filter: filter for force control output reference speed
2081 *
2082 * FCSetLPFilterTune is used to change the response of force loop according to
2083 * the description in Damping and LP-filter on page 103.
2084 *
2085 * @param cutoff_freq Cutoff frequency
2086 *
2087 * @return Return 0 if succeeded; return error code if failed
2088 * AUBO_BUSY
2089 * AUBO_BAD_STATE
2090 * -AUBO_INVL_ARGUMENT
2091 * -AUBO_BAD_STATE
2092 *
2093 * @throws arcs::common_interface::AuboException
2094 *
2095 * @par Python Function Prototype
2096 * setLpFilter(self: pyaubo_sdk.ForceControl, arg0: List[float]) -> int
2097 *
2098 * @par Lua Function Prototype
2099 * setLpFilter(cutoff_freq: table) -> nil
2100 * \endenglish
2101 */
2102 int setLpFilter(const std::vector<double> &cutoff_freq);
2103
2104 /**
2105 * \chinese
2106 * 重置低通滤波器
2107 *
2108 * @return 成功返回0;失败返回错误码
2109 * AUBO_BUSY
2110 * AUBO_BAD_STATE
2111 * -AUBO_BAD_STATE
2112 *
2113 * @throws arcs::common_interface::AuboException
2114 *
2115 * @par Python函数原型
2116 * resetLpFilter(self: pyaubo_sdk.ForceControl) -> int
2117 *
2118 * @par Lua函数原型
2119 * resetLpFilter() -> nil
2120 *
2121 * @par JSON-RPC请求示例
2122 * {"jsonrpc":"2.0","method":"rob1.ForceControl.resetLpFilter","params":[],"id":1}
2123 *
2124 * @par JSON-RPC响应示例
2125 * {"id":1,"jsonrpc":"2.0","result":0}
2126 * \endchinese
2127 * \english
2128 * Reset low-pass filter
2129 *
2130 * @return Return 0 if succeeded; return error code if failed
2131 * AUBO_BUSY
2132 * AUBO_BAD_STATE
2133 * -AUBO_BAD_STATE
2134 *
2135 * @throws arcs::common_interface::AuboException
2136 *
2137 * @par Python Function Prototype
2138 * resetLpFilter(self: pyaubo_sdk.ForceControl) -> int
2139 *
2140 * @par Lua Function Prototype
2141 * resetLpFilter() -> nil
2142 *
2143 * @par JSON-RPC Request example
2144 * {"jsonrpc":"2.0","method":"rob1.ForceControl.resetLpFilter","params":[],"id":1}
2145 *
2146 * @par JSON-RPC Response example
2147 * {"id":1,"jsonrpc":"2.0","result":0}
2148 * \endenglish
2149 */
2151
2152 /**
2153 * \chinese
2154 * speedChangeEnable 用于激活 FC SpeedChange 功能,并设置期望的参考力和恢复行为。
2155 * 当 FC SpeedChange 功能被激活时,机器人速度会根据测量信号与参考值的接近程度自动降低或提高。
2156 *
2157 * @param ref_force 参考力
2158 *
2159 * @return 成功返回0;失败返回错误码
2160 * AUBO_BUSY
2161 * AUBO_BAD_STATE
2162 * -AUBO_INVL_ARGUMENT
2163 * -AUBO_BAD_STATE
2164 *
2165 * @throws arcs::common_interface::AuboException
2166 *
2167 * @par Python函数原型
2168 * speedChangeEnable(self: pyaubo_sdk.ForceControl, arg0: float) -> int
2169 *
2170 * @par Lua函数原型
2171 * speedChangeEnable(ref_force: number) -> nil
2172 * \endchinese
2173 * \english
2174 * The speedChangeEnable is used to activate FC SpeedChange function with desired
2175 * reference and recover behavior. When FC SpeedChange function is active,
2176 * the robot speed will be reduced/increased in order to keep the measured
2177 * signal close to the reference.
2178 *
2179 * @param ref_force
2180 *
2181 * @return Return 0 if succeeded; return error code if failed
2182 * AUBO_BUSY
2183 * AUBO_BAD_STATE
2184 * -AUBO_INVL_ARGUMENT
2185 * -AUBO_BAD_STATE
2186 *
2187 * @throws arcs::common_interface::AuboException
2188 *
2189 * @par Python Function Prototype
2190 * speedChangeEnable(self: pyaubo_sdk.ForceControl, arg0: float) -> int
2191 *
2192 * @par Lua Function Prototype
2193 * speedChangeEnable(ref_force: number) -> nil
2194 * \endenglish
2195 */
2196 int speedChangeEnable(double ref_force);
2197
2198 /**
2199 * \chinese
2200 * 停用 FC SpeedChange 功能。
2201 *
2202 * @return 成功返回0;失败返回错误码
2203 * AUBO_BUSY
2204 * AUBO_BAD_STATE
2205 * -AUBO_BAD_STATE
2206 *
2207 * @throws arcs::common_interface::AuboException
2208 *
2209 * @par Python函数原型
2210 * speedChangeDisable(self: pyaubo_sdk.ForceControl) -> int
2211 *
2212 * @par Lua函数原型
2213 * speedChangeDisable() -> nil
2214 *
2215 * @par JSON-RPC请求示例
2216 * {"jsonrpc":"2.0","method":"rob1.ForceControl.speedChangeDisable","params":[],"id":1}
2217 *
2218 * @par JSON-RPC响应示例
2219 * {"id":1,"jsonrpc":"2.0","result":0}
2220 * \endchinese
2221 * \english
2222 * Deactivate FC SpeedChange function.
2223 *
2224 * @return Return 0 if succeeded; return error code if failed
2225 * AUBO_BUSY
2226 * AUBO_BAD_STATE
2227 * -AUBO_BAD_STATE
2228 *
2229 * @throws arcs::common_interface::AuboException
2230 *
2231 * @par Python Function Prototype
2232 * speedChangeDisable(self: pyaubo_sdk.ForceControl) -> int
2233 *
2234 * @par Lua Function Prototype
2235 * speedChangeDisable() -> nil
2236 *
2237 * @par JSON-RPC Request example
2238 * {"jsonrpc":"2.0","method":"rob1.ForceControl.speedChangeDisable","params":[],"id":1}
2239 *
2240 * @par JSON-RPC Response example
2241 * {"id":1,"jsonrpc":"2.0","result":0}
2242 * \endenglish
2243 */
2245
2246 /**
2247 * \chinese
2248 * speedChangeTune 用于将 FC SpeedChange 系统参数设置为新值。
2249 *
2250 * @param speed_levels 速度级别
2251 * @param speed_ratio_min 最小速度比例
2252 *
2253 * @return 成功返回0;失败返回错误码
2254 * AUBO_BUSY
2255 * AUBO_BAD_STATE
2256 * -AUBO_INVL_ARGUMENT
2257 * -AUBO_BAD_STATE
2258 *
2259 * @throws arcs::common_interface::AuboException
2260 *
2261 * @par Python函数原型
2262 * speedChangeTune(self: pyaubo_sdk.ForceControl, arg0: int, arg1: float) -> int
2263 *
2264 * @par Lua函数原型
2265 * speedChangeTune(speed_levels: number, speed_ratio_min: number) -> nil
2266 * \endchinese
2267 * \english
2268 * speedChangeTune is used to set FC SpeedChange system parameters to a new value.
2269 *
2270 * @param speed_levels
2271 * @param speed_ratio_min
2272 *
2273 * @return Return 0 if succeeded; return error code if failed
2274 * AUBO_BUSY
2275 * AUBO_BAD_STATE
2276 * -AUBO_INVL_ARGUMENT
2277 * -AUBO_BAD_STATE
2278 *
2279 * @throws arcs::common_interface::AuboException
2280 *
2281 * @par Python Function Prototype
2282 * speedChangeTune(self: pyaubo_sdk.ForceControl, arg0: int, arg1: float) -> int
2283 *
2284 * @par Lua Function Prototype
2285 * speedChangeTune(speed_levels: number, speed_ratio_min: number) -> nil
2286 * \endenglish
2287 */
2288 int speedChangeTune(int speed_levels, double speed_ratio_min);
2289
2290 /* Defines how many Newtons are required to make the robot move 1 m/s. The
2291 higher the value, the less responsive the robot gets.
2292 The damping can be tuned (as a percentage of the system parameter values)
2293 by the RAPID instruction FCAct. */
2294 // 设置阻尼系数,阻尼的系统参数需要通过配置文件设置
2295 // [damping_fx, damping_fy, damping_fz, damping_tx, damping_ty, damping_tz]
2296 // A value between min and 10,000,000 Ns/m.
2297 // A value between minimum and 10,000,000 Nms/rad.
2298
2299 /**
2300 * \chinese
2301 * setDamping 用于在力控坐标系中调整阻尼。可调参数包括扭矩x方向到扭矩z方向的阻尼(见第255页)以及力x方向到力z方向的阻尼(见第254页)。
2302 *
2303 * 阻尼可以通过配置文件或FCAct指令设置。不同之处在于本指令可在力控激活时使用。FCSetDampingTune调整的是FCAct指令设置的实际值,而不是配置文件中的值。
2304 *
2305 * @param damping 阻尼参数
2306 * @param ramp_time 斜坡时间
2307 *
2308 * @return 成功返回0;失败返回错误码
2309 * AUBO_BUSY
2310 * AUBO_BAD_STATE
2311 * -AUBO_INVL_ARGUMENT
2312 * -AUBO_BAD_STATE
2313 *
2314 * @throws arcs::common_interface::AuboException
2315 *
2316 * @par Python函数原型
2317 * setDamping(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: float) -> int
2318 *
2319 * @par Lua函数原型
2320 * setDamping(damping: table, ramp_time: number) -> nil
2321 * \endchinese
2322 * \english
2323 * 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.
2324 *
2325 * 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.
2326 *
2327 * @param damping
2328 * @param ramp_time
2329 *
2330 * @return Return 0 if succeeded; return error code if failed
2331 * AUBO_BUSY
2332 * AUBO_BAD_STATE
2333 * -AUBO_INVL_ARGUMENT
2334 * -AUBO_BAD_STATE
2335 *
2336 * @throws arcs::common_interface::AuboException
2337 *
2338 * @par Python Function Prototype
2339 * setDamping(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: float) -> int
2340 *
2341 * @par Lua Function Prototype
2342 * setDamping(damping: table, ramp_time: number) -> nil
2343 * \endenglish
2344 */
2345 int setDamping(const std::vector<double> &damping, double ramp_time);
2346
2347 /**
2348 * \chinese
2349 * 重置阻尼参数
2350 *
2351 * @return 成功返回0;失败返回错误码
2352 * AUBO_BUSY
2353 * AUBO_BAD_STATE
2354 * -AUBO_BAD_STATE
2355 *
2356 * @throws arcs::common_interface::AuboException
2357 *
2358 * @par Python函数原型
2359 * resetDamping(self: pyaubo_sdk.ForceControl) -> int
2360 *
2361 * @par Lua函数原型
2362 * resetDamping() -> nil
2363 *
2364 * @par JSON-RPC请求示例
2365 * {"jsonrpc":"2.0","method":"rob1.ForceControl.resetDamping","params":[],"id":1}
2366 *
2367 * @par JSON-RPC响应示例
2368 * {"id":1,"jsonrpc":"2.0","result":0}
2369 * \endchinese
2370 * \english
2371 * Reset damping parameters
2372 *
2373 * @return Return 0 if succeeded; return error code if failed
2374 * AUBO_BUSY
2375 * AUBO_BAD_STATE
2376 * -AUBO_BAD_STATE
2377 *
2378 * @throws arcs::common_interface::AuboException
2379 *
2380 * @par Python Function Prototype
2381 * resetDamping(self: pyaubo_sdk.ForceControl) -> int
2382 *
2383 * @par Lua Function Prototype
2384 * resetDamping() -> nil
2385 *
2386 * @par JSON-RPC Request example
2387 * {"jsonrpc":"2.0","method":"rob1.ForceControl.resetDamping","params":[],"id":1}
2388 *
2389 * @par JSON-RPC Response example
2390 * {"id":1,"jsonrpc":"2.0","result":0}
2391 * \endenglish
2392 */
2394
2395 /**
2396 * \chinese
2397 * 启用软浮动功能。
2398 *
2399 * @return 成功返回0;失败返回错误码
2400 * AUBO_BUSY
2401 * AUBO_BAD_STATE
2402 * -AUBO_BAD_STATE
2403 *
2404 * @throws arcs::common_interface::AuboException
2405 *
2406 * @par JSON-RPC请求示例
2407 * {"jsonrpc":"2.0","method":"rob1.ForceControl.softFloatEnable","params":[],"id":1}
2408 *
2409 * @par JSON-RPC响应示例
2410 * {"id":1,"jsonrpc":"2.0","result":0}
2411 * \endchinese
2412 * \english
2413 * Enable soft float function.
2414 *
2415 * @return Return 0 if succeeded; return error code if failed
2416 * AUBO_BUSY
2417 * AUBO_BAD_STATE
2418 * -AUBO_BAD_STATE
2419 *
2420 * @throws arcs::common_interface::AuboException
2421 *
2422 * @par JSON-RPC Request example
2423 * {"jsonrpc":"2.0","method":"rob1.ForceControl.softFloatEnable","params":[],"id":1}
2424 *
2425 * @par JSON-RPC Response example
2426 * {"id":1,"jsonrpc":"2.0","result":0}
2427 * \endenglish
2428 */
2430
2431 /**
2432 * \chinese
2433 * 停用软浮动功能。
2434 *
2435 * @return 成功返回0;失败返回错误码
2436 * AUBO_BUSY
2437 * AUBO_BAD_STATE
2438 * -AUBO_BAD_STATE
2439 *
2440 * @throws arcs::common_interface::AuboException
2441 *
2442 * @par JSON-RPC请求示例
2443 * {"jsonrpc":"2.0","method":"rob1.ForceControl.softFloatDisable","params":[],"id":1}
2444 *
2445 * @par JSON-RPC响应示例
2446 * {"id":1,"jsonrpc":"2.0","result":-1}
2447 * \endchinese
2448 * \english
2449 * Disable soft float function.
2450 *
2451 * @return Return 0 if succeeded; return error code if failed
2452 * AUBO_BUSY
2453 * AUBO_BAD_STATE
2454 * -AUBO_BAD_STATE
2455 *
2456 * @throws arcs::common_interface::AuboException
2457 *
2458 * @par JSON-RPC Request example
2459 * {"jsonrpc":"2.0","method":"rob1.ForceControl.softFloatDisable","params":[],"id":1}
2460 *
2461 * @par JSON-RPC Response example
2462 * {"id":1,"jsonrpc":"2.0","result":-1}
2463 * \endenglish
2464 */
2466
2467 /**
2468 * \chinese
2469 * 返回是否开启了软浮动
2470 *
2471 * @return
2472 *
2473 * @throws arcs::common_interface::AuboException
2474 *
2475 * @par JSON-RPC请求示例
2476 * {"jsonrpc":"2.0","method":"rob1.ForceControl.isSoftFloatEnabled","params":[],"id":1}
2477 *
2478 * @par JSON-RPC响应示例
2479 * {"id":1,"jsonrpc":"2.0","result":false}
2480 * \endchinese
2481 * \english
2482 * Returns whether soft float is enabled
2483 *
2484 * @return
2485 *
2486 * @throws arcs::common_interface::AuboException
2487 *
2488 * @par JSON-RPC Request example
2489 * {"jsonrpc":"2.0","method":"rob1.ForceControl.isSoftFloatEnabled","params":[],"id":1}
2490 *
2491 * @par JSON-RPC Response example
2492 * {"id":1,"jsonrpc":"2.0","result":false}
2493 * \endenglish
2494 */
2496
2497 /**
2498 * \chinese
2499 * 设置软浮动参数
2500 *
2501 * @param joint_softfloat 是否在关节空间启用软浮动
2502 * @param select 选择哪些自由度启用软浮动
2503 * @param stiff_percent 刚度百分比
2504 * @param stiff_damp_ratio 刚度阻尼比
2505 * @param force_threshold 力阈值
2506 * @param force_limit 力限制
2507 * @return 返回0表示成功,其他为错误码
2508 * \endchinese
2509 * \english
2510 * Set soft float parameters
2511 *
2512 * @param joint_softfloat Whether to enable soft float in joint space
2513 * @param select Select which degrees of freedom to enable soft float
2514 * @param stiff_percent Stiffness percentage
2515 * @param stiff_damp_ratio Stiffness damping ratio
2516 * @param force_threshold Force threshold
2517 * @param force_limit Force limit
2518 * @return Return 0 if succeeded, otherwise error code
2519 * \endenglish
2520 */
2521 int setSoftFloatParams(bool joint_space, const std::vector<bool> &select,
2522 const std::vector<double> &stiff_percent,
2523 const std::vector<double> &stiff_damp_ratio,
2524 const std::vector<double> &force_threshold,
2525 const std::vector<double> &force_limit);
2526
2527 /**
2528 * \chinese
2529 * 检测工具和外部物体的接触
2530 *
2531 * @param direction
2532 * 预期的接触方向,如果所有的元素为0,表示检测所有方向的接触
2533 * @return
2534 * 返回从当前点回退到碰撞开始点的周期步数,如果返回值为0,表示没有接触
2535 * \endchinese
2536 * \english
2537 * Detect contact between the tool and external objects
2538 *
2539 * @param direction
2540 * Expected contact direction. If all elements are 0, detect contact in all directions.
2541 * @return
2542 * 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.
2543 * \endenglish
2544 */
2545 int toolContact(const std::vector<bool> &direction);
2546
2547 /**
2548 * \chinese
2549 * @brief 获取历史关节角度
2550 *
2551 * 根据给定的周期步数,从关节状态历史中回退指定数量的周期,获取当时的关节角度数据。
2552 *
2553 * @param steps
2554 * 需要回退的周期数(单位:控制周期数),值越大表示获取越早的历史数据
2555 * @return std::vector<double>
2556 * 对应时间点的各关节角度(单位:弧度)
2557 * \endchinese
2558 * \english
2559 * @brief Get historical joint positions
2560 *
2561 * 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.
2562 *
2563 * @param steps
2564 * Number of cycles to go back (unit: control cycles), the larger the value, the earlier the historical data is obtained
2565 * @return std::vector<double>
2566 * Joint positions (unit: radians) at the corresponding time point
2567 * \endenglish
2568 */
2569 std::vector<double> getActualJointPositionsHistory(int steps);
2570
2571protected:
2572 void *d_{ nullptr };
2573};
2574using ForceControlPtr = std::shared_ptr<ForceControl>;
2575} // namespace common_interface
2576} // namespace arcs
2577
2578#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
数据类型的定义