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