ARCS SDK API  0.25.0
载入中...
搜索中...
未找到
force_control.h
浏览该文件的文档.
1/** @file force_control.h
2 * @brief 力控接口
3 *
4 * 力控的限制
5 * When the robot is force controlled, the following functionality is not
6 * accessible:
7 *
8 * • Collision Detection (option 613-1) \n
9 * • SoftMove (option 885-1) \n
10 * • Tracking functionality like Conveyor Tracking (option 606-1), Optical
11 * Tracking (6601) and Weld Guide (815-2) \n
12 * • Sensor Synchronization or Analog Synchronization \n
13 * • World Zones (option 608-1) \n
14 * • Independent Axes (option 610-1) \n
15 * • Path Offset (option 612-1) \n
16 * • Arc options \n
17 * • PickMaster options \n
18 * • Joint soft servo (instruction SoftAct) \n
19 * • Force Control cannot be activated when the robot is running in MultiMove
20 * Coordinated mode (option 604-1). \n
21 * • If Force Control is used together with SafeMove (option 810-2) or
22 * Electronic Position Switches (option 810-1), the function Operational
23 * Safety Range must be used. See the respective manual for these options. \n
24 * • RAPID instructions such as FCAct, FCDeact, FCConditionWaitWhile and
25 * FCRefStop can only be called from normal level in a motion task.
26 *
27 * 应用:抛光、打磨、清洁 \n
28 * FC Pressure \n
29 * 设置轨迹坐标系的z方向为力控轴,spring设置为0 \n
30 * 在还没接触前设置输出力为0,spring设置为固定值(根据vel确定) \n
31 * 离开接触面:设置输出力为0,spring设置为固定值 \n
32 *
33 * 活塞(Piston)装配 \n
34 * Forward clutch hub \n
35 * 设置力控终止模式
36 *
37 * 基于末端力传感器的拖动示教 \n
38 * spring = 0; force_ref = 0; 参考轨迹点任意
39 */
40#ifndef AUBO_SDK_FORCE_CONTROL_INTERFACE_H
41#define AUBO_SDK_FORCE_CONTROL_INTERFACE_H
42
43#include <vector>
44#include <thread>
45
46#include <aubo/global_config.h>
47#include <aubo/type_def.h>
48
49namespace arcs {
50namespace common_interface {
51
52/**
53 * 力控接口抽象类
54 */
55class ARCS_ABI_EXPORT ForceControl
56{
57public:
59 virtual ~ForceControl();
60
61 /**
62 * Start force control
63 *
64 * fcEnable is used to enable Force Control. At the same time as Force
65 * Control is enabled, fcEnable is used to define the coordinate system
66 * for Force Control, and tune the force and torque damping. If a coordinate
67 * system is not specified in fcEnable a default force control coordinate
68 * system is created with the same orientation as the work object coordinate
69 * system. All Force Control supervisions are activated by fcEnable.
70 *
71 * 使能力控。
72 * fcEnable 被用于使能力控。 在力控被使能的同时,
73 * fcEnable 用于定义力控的坐标系,并调整力和力矩的阻尼。
74 * 如果在 fcEnable 中未指定坐标系,
75 * 则会创建一个默认的力控制坐标系,其方向与工作对象坐标系相同。
76 * 所有力控制监管功能都被 fcEnable 激活。
77 *
78 * @return 成功返回0;失败返回错误码
79 * AUBO_BUSY
80 * AUBO_BAD_STATE
81 * -AUBO_BAD_STATE
82 *
83 * @throws arcs::common_interface::AuboException
84 *
85 * @par Python函数原型
86 * fcEnable(self: pyaubo_sdk.ForceControl) -> int
87 *
88 * @par Lua函数原型
89 * fcEnable() -> nil
90 *
91 * @par JSON-RPC请求示例
92 * {"jsonrpc":"2.0","method":"rob1.ForceControl.fcEnable","params":[],"id":1}
93 *
94 * @par JSON-RPC响应示例
95 * {"id":1,"jsonrpc":"2.0","result":0}
96 *
97 */
98 int fcEnable();
99
100 /**
101 * End force control
102 *
103 * fcDisable is used to disable Force Control. After a successful
104 * deactivation the robot is back in position control.
105 *
106 * 失能力控。
107 * fcDisable 被用于失能力控。 在成功失能力控之后,机器人将回到位置控制模式。
108 *
109 * @return 成功返回0;失败返回错误码
110 * AUBO_BUSY
111 * AUBO_BAD_STATE
112 * -AUBO_BAD_STATE
113 *
114 * @throws arcs::common_interface::AuboException
115 *
116 * @par Python函数原型
117 * fcDisable(self: pyaubo_sdk.ForceControl) -> int
118 *
119 * @par Lua函数原型
120 * fcDisable() -> nil
121 *
122 * @par JSON-RPC请求示例
123 * {"jsonrpc":"2.0","method":"rob1.ForceControl.fcDisable","params":[],"id":1}
124 *
125 * @par JSON-RPC响应示例
126 * {"id":1,"jsonrpc":"2.0","result":0}
127 *
128 */
130
131 /**
132 * 判断力控是否被使能
133 *
134 * @return 使能返回true,失能返回false
135 *
136 * @throws arcs::common_interface::AuboException
137 *
138 * @par Python函数原型
139 * isFcEnabled(self: pyaubo_sdk.ForceControl) -> bool
140 *
141 * @par Lua函数原型
142 * isFcEnabled() -> boolean
143 *
144 * @par JSON-RPC请求示例
145 * {"jsonrpc":"2.0","method":"rob1.ForceControl.isFcEnabled","params":[],"id":1}
146 *
147 * @par JSON-RPC响应示例
148 * {"id":1,"jsonrpc":"2.0","result":false}
149 *
150 */
152
153 /**
154 * 设置力控参考(目标)值
155 *
156 * @param feature: 参考几何特征,用于生成力控参考坐标系
157 * @param compliance: 柔性轴(方向)选择
158 * @param wrench: 目标力/力矩
159 * @param limits: 速度限制
160 * @param type: 力控参考坐标系类型
161 *
162 * @return 成功返回0;失败返回错误码
163 * AUBO_BUSY
164 * AUBO_BAD_STATE
165 * -AUBO_INVL_ARGUMENT
166 * -AUBO_BAD_STATE
167 *
168 * @throws arcs::common_interface::AuboException
169 *
170 * @par Python函数原型
171 * setTargetForce(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
172 * List[bool], arg2: List[float], arg3: List[float], arg4:
173 * arcs::common_interface::TaskFrameType) -> int
174 *
175 * @par Lua函数原型
176 * setTargetForce(feature: table, compliance: table, wrench: table, limits:
177 * table, type: number) -> nil
178 *
179 */
180 int setTargetForce(const std::vector<double> &feature,
181 const std::vector<bool> &compliance,
182 const std::vector<double> &wrench,
183 const std::vector<double> &limits,
184 TaskFrameType type = TaskFrameType::FRAME_FORCE);
185
186 /**
187 * 设置力控动力学模型
188 *
189 * @param env_stiff: 环境刚度,表示为接触轴方向上的工件刚度,取值范围[0,
190 * 1],默认为0
191 * @param damp_scale: 表征阻尼水平的参数,取值范围[0, 1],默认为0.5
192 * @param stiff_scale: 表征软硬程度的参数,取值范围[0, 1],默认为0.5
193 *
194 * @return 成功返回0;失败返回错误码
195 * AUBO_BUSY
196 * AUBO_BAD_STATE
197 * -AUBO_INVL_ARGUMENT
198 * -AUBO_BAD_STATE
199 *
200 * @throws arcs::common_interface::AuboException
201 *
202 * @par Python函数原型
203 * setDynamicModel1(self: pyaubo_sdk.ForceControl, arg0: List[float],
204 * arg1: List[float], arg2: List[float]) -> int
205 *
206 * @par Lua函数原型
207 * setDynamicModel1(env_stiff: table, damp_scale: table, stiff_scale:
208 * table) -> nil
209 *
210 */
211 int setDynamicModel1(const std::vector<double> &env_stiff,
212 const std::vector<double> &damp_scale,
213 const std::vector<double> &stiff_scale);
214
215 /**
216 * 计算力控动力学模型
217 *
218 * @param env_stiff: 环境刚度,表示为接触轴方向上的工件刚度,取值范围[0,
219 * 1],默认为0
220 * @param damp_scale: 表征阻尼水平的参数,取值范围[0, 1],默认为0.5
221 * @param stiff_scale: 表征软硬程度的参数,取值范围[0, 1],默认为0.5
222 *
223 * @return 力控动力学模型MDK
224 * AUBO_BUSY
225 * AUBO_BAD_STATE
226 * -AUBO_INVL_ARGUMENT
227 * -AUBO_BAD_STATE
228 *
229 * @throws arcs::common_interface::AuboException
230 *
231 * @par Python函数原型
232 * fcCalDynamicModel(self: pyaubo_sdk.ForceControl, arg0: List[float],
233 * arg1: List[float], arg2: List[float]) -> > Tuple[List[float],
234 * List[float], List[float]]
235 *
236 * @par Lua函数原型
237 * fcCalDynamicModel(env_stiff: table, damp_scale: table, stiff_scale:
238 * table) -> table
239 *
240 */
241 DynamicsModel fcCalDynamicModel(const std::vector<double> &env_stiff,
242 const std::vector<double> &damp_scale,
243 const std::vector<double> &stiff_scale);
244
245 /**
246 * 设置力控搜孔场景下的动力学模型
247 *
248 * @param damp_scale: 表征阻尼水平的参数,取值范围[0, 1],默认为0.5
249 * @param stiff_scale: 表征软硬程度的参数,取值范围[0, 1],默认为0.5
250 *
251 * @return 成功返回0;失败返回错误码
252 * AUBO_BUSY
253 * AUBO_BAD_STATE
254 * -AUBO_INVL_ARGUMENT
255 * -AUBO_BAD_STATE
256 *
257 * @throws arcs::common_interface::AuboException
258 *
259 * @par Python函数原型
260 * setDynamicModelSearch(self: pyaubo_sdk.ForceControl, arg0: List[float],
261 * arg1: List[float]) -> int
262 *
263 * @par Lua函数原型
264 * setDynamicModelSearch(damp_scale: table, stiff_scale: table) -> nil
265 *
266 */
267 int setDynamicModelSearch(const std::vector<double> &damp_scale,
268 const std::vector<double> &stiff_scale);
269
270 /**
271 * 设置力控插/拔孔场景下的动力学模型
272 *
273 * @param damp_scale: 表征阻尼水平的参数,取值范围[0, 1],默认为0.5
274 * @param stiff_scale: 表征软硬程度的参数,取值范围[0, 1],默认为0.5
275 *
276 * @return 成功返回0;失败返回错误码
277 * AUBO_BUSY
278 * AUBO_BAD_STATE
279 * -AUBO_INVL_ARGUMENT
280 * -AUBO_BAD_STATE
281 *
282 * @throws arcs::common_interface::AuboException
283 *
284 * @par Python函数原型
285 * setDynamicModelInsert(self: pyaubo_sdk.ForceControl, arg0: List[float],
286 * arg1: List[float]) -> int
287 *
288 * @par Lua函数原型
289 * setDynamicModelInsert(damp_scale: table, stiff_scale: table) -> nil
290 *
291 */
292 int setDynamicModelInsert(const std::vector<double> &damp_scale,
293 const std::vector<double> &stiff_scale);
294
295 /**
296 * 设置力控接触场景下的动力学模型
297 *
298 * @param env_stiff: 表征环境刚度的参数,取值范围[0, 1],默认为0
299 * @param damp_scale: 表征阻尼水平的参数,取值范围[0, 1],默认为0.5
300 * @param stiff_scale: 表征软硬程度的参数,取值范围[0, 1],默认为0.5
301 *
302 * @return 成功返回0;失败返回错误码
303 * AUBO_BUSY
304 * AUBO_BAD_STATE
305 * -AUBO_INVL_ARGUMENT
306 * -AUBO_BAD_STATE
307 *
308 * @throws arcs::common_interface::AuboException
309 *
310 * @par Python函数原型
311 * setDynamicModelContact(self: pyaubo_sdk.ForceControl, arg0: List[float],
312 * arg1: List[float], arg2: List[float]) -> int
313 *
314 * @par Lua函数原型
315 * setDynamicModelContact(env_stiff: table, damp_scale: table, stiff_scale:
316 * table) -> nil
317 *
318 */
319 int setDynamicModelContact(const std::vector<double> &env_stiff,
320 const std::vector<double> &damp_scale,
321 const std::vector<double> &stiff_scale);
322
323 /**
324 * 设置力控动力学模型
325 *
326 * @param m
327 * @param d
328 * @param k
329 *
330 * @return 成功返回0;失败返回错误码
331 * AUBO_BUSY
332 * AUBO_BAD_STATE
333 * -AUBO_INVL_ARGUMENT
334 * -AUBO_BAD_STATE
335 *
336 * @throws arcs::common_interface::AuboException
337 *
338 * @par Python函数原型
339 * setDynamicModel(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
340 * List[float], arg2: List[float]) -> int
341 *
342 * @par Lua函数原型
343 * setDynamicModel(m: table, d: table, k: table) -> nil
344 *
345 */
346 int setDynamicModel(const std::vector<double> &m,
347 const std::vector<double> &d,
348 const std::vector<double> &k);
349
350 /**
351 * 设置力控阈值
352 *
353 * @param thresholds: 力控阈值
354 *
355 * @return 成功返回0;失败返回错误码
356 * AUBO_BUSY
357 * AUBO_BAD_STATE
358 * -AUBO_INVL_ARGUMENT
359 * -AUBO_BAD_STATE
360 *
361 * @throws arcs::common_interface::AuboException
362 *
363 * @par Python函数原型
364 * fcSetSensorThresholds(self: pyaubo_sdk.ForceControl, arg0:
365 * List[float]) -> int
366 *
367 * @par Lua函数原型
368 * fcSetSensorThresholds(feature: table, compliance: table, wrench:
369 * table, limits: table, type: number) -> nil
370 *
371 */
372 int fcSetSensorThresholds(const std::vector<double> &thresholds);
373
374 /**
375 * 设置力控最大受力限制
376 *
377 * @param limits: 力限制
378 *
379 * @return 成功返回0;失败返回错误码
380 * AUBO_BUSY
381 * AUBO_BAD_STATE
382 * -AUBO_INVL_ARGUMENT
383 * -AUBO_BAD_STATE
384 *
385 * @throws arcs::common_interface::AuboException
386 *
387 * @par Python函数原型
388 * fcSetSensorLimits(self: pyaubo_sdk.ForceControl, arg0:
389 * List[float]) -> int
390 *
391 * @par Lua函数原型
392 * fcSetSensorLimits(feature: table, compliance: table, wrench:
393 * table, limits: table, type: number) -> nil
394 *
395 */
396 int fcSetSensorLimits(const std::vector<double> &limits);
397
398 /**
399 * 获取力控阈值
400 *
401 * @return 力控最小力阈值
402 *
403 * @throws arcs::common_interface::AuboException
404 *
405 * @par Python函数原型
406 * getFcSensorThresholds(self: pyaubo_sdk.ForceControl) -> list
407 *
408 * @par Lua函数原型
409 * getFcSensorThresholds() -> table
410 *
411 */
412 std::vector<double> getFcSensorThresholds();
413
414 /**
415 * 获取最大力限制
416 *
417 * @return 力控最大力限制
418 *
419 * @throws arcs::common_interface::AuboException
420 *
421 * @par Python函数原型
422 * getFcSensorLimits(self: pyaubo_sdk.ForceControl) -> list
423 *
424 * @par Lua函数原型
425 * getFcSensorLimits() -> table
426 *
427 */
428 std::vector<double> getFcSensorLimits();
429
430 /**
431 * 获取力控动力学模型
432 *
433 * @return 力控动力学模型
434 *
435 * @throws arcs::common_interface::AuboException
436 *
437 * @par Python函数原型
438 * getDynamicModel(self: pyaubo_sdk.ForceControl) -> Tuple[List[float],
439 * List[float], List[float]]
440 *
441 * @par Lua函数原型
442 * getDynamicModel() -> table
443 *
444 * @par JSON-RPC请求示例
445 * {"jsonrpc":"2.0","method":"rob1.ForceControl.getDynamicModel","params":[],"id":1}
446 *
447 * @par JSON-RPC响应示例
448 * {"id":1,"jsonrpc":"2.0","result":[[],[20.0,20.0,20.0,5.0,5.0,5.0],[]]}
449 *
450 */
452
453 /**
454 * 设置力控终止条件:力,当测量的力在设置的范围之内,力控算法将保持运行,直到设置的条件不满足,力控将退出
455 *
456 * FCCondForce is used to set up an end condition based on measured force.
457 * The condition is lateractivated by calling the instruction
458 * FCCondWaitWhile, which will wait and hold the program execution while the
459 * specified condition is true. This allows the reference force, torque and
460 * movement to continue until the force is outside the specified limits.
461 *
462 * A force condition is set up by defining minimum and maximum limits for
463 * the force in the directions of the force control coordinate system. Once
464 * activated with FCCondWaitWhile, the program execution will continue to
465 * wait while the measured force is within its specified limits.
466 *
467 * It is possible to specify that the condition is fulfilled when the force
468 * is outside the specified limits instead. This is done by using the switch
469 * argument Outside. The condition on force is specified in the force
470 * control coordinate system. This coordinate system is setup by the user in
471 * the instruction FCAct.
472 *
473 * @param min 各方向最小的力/力矩
474 * @param max 各方向最大的力/力矩
475 * @param outside false 在设置条件的范围之内有效
476 * true 在设置条件的范围之外有效
477 * @param timeout
478 * 时间限制,单位s(秒),从开始力控到达该时间时,不管是否满足力控终止条件,都会终止力控
479 *
480 * @return 成功返回0;失败返回错误码
481 * AUBO_BUSY
482 * AUBO_BAD_STATE
483 * -AUBO_INVL_ARGUMENT
484 * -AUBO_BAD_STATE
485 *
486 * @throws arcs::common_interface::AuboException
487 *
488 * @par Python函数原型
489 * setCondForce(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
490 * List[float], arg2: bool, arg3: float) -> int
491 *
492 * @par Lua函数原型
493 * setCondForce(min: table, max: table, outside: boolean, timeout: number)
494 * -> nil
495 *
496 */
497 int setCondForce(const std::vector<double> &min,
498 const std::vector<double> &max, bool outside,
499 double timeout);
500
501 /**
502 * FCCondOrient is used to set up an end condition for the tool orientation.
503 * The condition is lateractivated by calling the instruction
504 * FCCondWaitWhile, which will wait and hold the program execution while the
505 * specified condition is true. This allows the reference force, torque and
506 * movement to continue until the orientation is outside the specified
507 * limits.
508 *
509 * An orientation condition is set up by defining a maximum angle and a
510 * maximum rotation from a reference orientation. The reference orientation
511 * is either defined by the current z direction of the tool, or by
512 * specifying an orientation in relation to the z direction of the work
513 * object.
514 *
515 * Once activated, the tool orientation must be within the limits (or
516 * outside, if the argument Outside is used).
517 *
518 * @param frame
519 * @param max_angle
520 * @param max_rot
521 * @param outside
522 * @param timeout
523 *
524 * @return 成功返回0;失败返回错误码
525 * AUBO_BUSY
526 * AUBO_BAD_STATE
527 * -AUBO_INVL_ARGUMENT
528 * -AUBO_BAD_STATE
529 *
530 * @throws arcs::common_interface::AuboException
531 *
532 * @par Python函数原型
533 * setCondOrient(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
534 * float, arg2: float, arg3: bool, arg4: float) -> int
535 *
536 * @par Lua函数原型
537 * setCondOrient(frame: table, max_angle: number, max_rot: number, outside:
538 * boolean, timeout: number) -> nil
539 *
540 */
541 int setCondOrient(const std::vector<double> &frame, double max_angle,
542 double max_rot, bool outside, double timeout);
543
544 /**
545 * 指定力控有效平面,x-y平面,z方向有效
546 *
547 * FCCondPos is used to set up an end condition for the TCP position. The
548 * condition is later activated by calling the instruction FCCondWaitWhile,
549 * which will wait and hold the program execution while the specified
550 * condition is true. This allows the reference force, torque and movement
551 * to continue until the specified position is outside the specified limits.
552 *
553 * A position condition is set up by defining a volume in space for the TCP
554 * position. Once activated the measured TCP position has to be within the
555 * specified volume (or outside, if the argument Outside is used).
556 *
557 * @param plane={A,B,C,D}
558 * 平面表示方法 Ax +By +Cz + D = 0
559 * 其中,n = (A, B, C)是平面的法向量,
560 * D 是将平面平移到坐标原点所需距离(所以D=0时,平面过原点)
561 * @param timeout
562 *
563 * @return 成功返回0;失败返回错误码
564 * AUBO_BUSY
565 * AUBO_BAD_STATE
566 * -AUBO_INVL_ARGUMENT
567 * -AUBO_BAD_STATE
568 *
569 * @throws arcs::common_interface::AuboException
570 *
571 * @par Python函数原型
572 * setCondPlane(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
573 * float) -> int
574 *
575 * @par Lua函数原型
576 * setCondPlane(plane: table, timeout: number) -> nil
577 *
578 */
579 int setCondPlane(const std::vector<double> &plane, double timeout);
580
581 /**
582 * 指定力控有效圆柱体,提供中心轴和圆柱半径,可以指定圆柱内部还是外部
583 *
584 * @param axis
585 * @param radius
586 * @param outside
587 * @param timeout
588 *
589 * @return 成功返回0;失败返回错误码
590 * AUBO_BUSY
591 * AUBO_BAD_STATE
592 * -AUBO_INVL_ARGUMENT
593 * -AUBO_BAD_STATE
594 *
595 * @throws arcs::common_interface::AuboException
596 *
597 * @par Python函数原型
598 * setCondCylinder(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
599 * float, arg2: bool, arg3: float) -> int
600 *
601 * @par Lua函数原型
602 * setCondCylinder(axis: table, radius: number, outside: boolean, timeout:
603 * number) -> nil
604 *
605 */
606 int setCondCylinder(const std::vector<double> &axis, double radius,
607 bool outside, double timeout);
608
609 /**
610 * 指定力控有效球体,提供球心和半径,可以指定球体内部还是外部
611 *
612 * @param center
613 * @param radius
614 * @param outside
615 * @param timeout
616 *
617 * @return 成功返回0;失败返回错误码
618 * AUBO_BUSY
619 * AUBO_BAD_STATE
620 * -AUBO_INVL_ARGUMENT
621 * -AUBO_BAD_STATE
622 *
623 * @throws arcs::common_interface::AuboException
624 *
625 * @par Python函数原型
626 * setCondSphere(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
627 * float, arg2: bool, arg3: float) -> int
628 *
629 * @par Lua函数原型
630 * setCondSphere(center: table, radius: number, outside: boolean, timeout:
631 * number) -> nil
632 *
633 */
634 int setCondSphere(const std::vector<double> &center, double radius,
635 bool outside, double timeout);
636
637 /**
638 * FCCondTCPSpeed is used to setup an end condition for the TCP speed. The
639 * condition is lateractivated by calling the instruction FCCondWaitWhile,
640 * which will wait and hold the program execution while the specified
641 * condition is true. This allows the reference force, torque and movement
642 * to continue until the speed is outside the specified limits.
643 *
644 * A TCP speed condition is setup up by defining minimum and maximum limits
645 * for the TCP speed in all directions of the work object. Once activated
646 * with FCCondWaitWhile, the program execution will continue to wait while
647 * the measured speed is within its specified limits.
648 *
649 * It is possible to specify that the condition is fulfilled when the speed
650 * is outside the specified limits instead. This is the done by using the
651 * switch argument Outside. The condition on TCP speed is specified in the
652 * work object coordinate system.
653 *
654 * @param min
655 * @param max
656 * @param outside
657 * @param timeout
658 *
659 * @return 成功返回0;失败返回错误码
660 * AUBO_BUSY
661 * AUBO_BAD_STATE
662 * -AUBO_INVL_ARGUMENT
663 * -AUBO_BAD_STATE
664 *
665 * @throws arcs::common_interface::AuboException
666 *
667 * @par Python函数原型
668 * setCondTcpSpeed(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
669 * List[float], arg2: bool, arg3: float) -> int
670 *
671 * @par Lua函数原型
672 * setCondTcpSpeed(min: table, max: table, outside: boolean, timeout:
673 * number) -> nil
674 *
675 */
676 int setCondTcpSpeed(const std::vector<double> &min,
677 const std::vector<double> &max, bool outside,
678 double timeout);
679
680 /**
681 * 力控终止条件-距离
682 *
683 * @param distance
684 * @param timeout
685 *
686 * @return 成功返回0;失败返回错误码
687 * AUBO_BUSY
688 * AUBO_BAD_STATE
689 * -AUBO_INVL_ARGUMENT
690 * -AUBO_BAD_STATE
691 *
692 * @throws arcs::common_interface::AuboException
693 *
694 */
695 int setCondDistance(double distance, double timeout);
696
697 /**
698 * 高级力控终止条件
699 *
700 * @param type
701 * @param args
702 * @param timeout
703 *
704 * @return 成功返回0;失败返回错误码
705 * AUBO_BUSY
706 * AUBO_BAD_STATE
707 * -AUBO_INVL_ARGUMENT
708 * -AUBO_BAD_STATE
709 *
710 * @throws arcs::common_interface::AuboException
711 *
712 */
713 int setCondAdvanced(const std::string &type,
714 const std::vector<double> &args, double timeout);
715
716 /**
717 * 激活力控终止条件
718 *
719 * @return 成功返回0;失败返回错误码
720 * AUBO_BUSY
721 * AUBO_BAD_STATE
722 * -AUBO_BAD_STATE
723 *
724 * @throws arcs::common_interface::AuboException
725 *
726 * @par Python函数原型
727 * setCondActive(self: pyaubo_sdk.ForceControl) -> int
728 *
729 * @par Lua函数原型
730 * setCondActive() -> nil
731 *
732 * @par JSON-RPC请求示例
733 * {"jsonrpc":"2.0","method":"rob1.ForceControl.setCondActive","params":[],"id":1}
734 *
735 * @par JSON-RPC响应示例
736 * {"id":1,"jsonrpc":"2.0","result":0}
737 *
738 */
740
741 /**
742 * 力控终止条件是否已经满足
743 *
744 * @return
745 *
746 * @throws arcs::common_interface::AuboException
747 *
748 * @par Python函数原型
749 * isCondFullfiled(self: pyaubo_sdk.ForceControl) -> bool
750 *
751 * @par Lua函数原型
752 * isCondFullfiled() -> boolean
753 *
754 * @par JSON-RPC请求示例
755 * {"jsonrpc":"2.0","method":"rob1.ForceControl.isCondFullfiled","params":[],"id":1}
756 *
757 * @par JSON-RPC响应示例
758 * {"id":1,"jsonrpc":"2.0","result":false}
759 *
760 */
762
763 /**
764 * FCSupvForce is used to set up force supervision in Force Control. The
765 * supervision is activated when Force Control is activated with the
766 * instruction FCAct.
767 *
768 * The force supervision is set up by defining minimum and maximum limits
769 * for the force in the directions of the force control coordinate system.
770 * Once activated, the supervision will stop the execution if the force is
771 * outside the allowed values. The force supervision is specified in the
772 * force control coordinate system. This coordinate system is setup by the
773 * user with the instruction FCAct.
774 *
775 * @param min
776 * @param max
777 *
778 * @return 成功返回0;失败返回错误码
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函数原型
787 * setSupvForce(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
788 * List[float]) -> int
789 *
790 * @par Lua函数原型
791 * setSupvForce(min: table, max: table) -> nil
792 *
793 */
794 int setSupvForce(const std::vector<double> &min,
795 const std::vector<double> &max);
796
797 /**
798 * FCSupvOrient is used to set up an supervision for the tool orientation.
799 * The supervision is activated when Force Control is activated with the
800 * instruction FCAct.
801 *
802 * An orientation supervision is set up by defining a maximum angle and a
803 * maximum rotation from a reference orientation. The reference orientation
804 * is either defined by the current z direction of the tool, or by
805 * specifying an orientation in relation to the z direction of the work
806 * object.
807 *
808 * Once activated, the tool orientation must be within the limits otherwise
809 * the supervision will stop the execution.
810 *
811 * @param frame
812 * @param max_angle
813 * @param max_rot
814 * @param outside
815 *
816 * @return 成功返回0;失败返回错误码
817 * AUBO_BUSY
818 * AUBO_BAD_STATE
819 * -AUBO_INVL_ARGUMENT
820 * -AUBO_BAD_STATE
821 *
822 * @throws arcs::common_interface::AuboException
823 *
824 * @par Python函数原型
825 * setSupvOrient(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
826 * float, arg2: float, arg3: bool) -> int
827 *
828 * @par Lua函数原型
829 * setSupvOrient(frame: table, max_angle: number, max_rot: number,
830 * outside: boolean) -> nil
831 *
832 */
833 int setSupvOrient(const std::vector<double> &frame, double max_angle,
834 double max_rot, bool outside);
835
836 /**
837 * FCSupvPos is used to set up position supervision in Force Control.
838 * Supervision is activated when Force Control is activated with the
839 * instruction FCAct. Position supervision is set up by defining a volume in
840 * space for the TCP. Once activated, the supervision will stop the
841 * execution if the TCP is outside this volume.
842 *
843 * @param frame
844 * @param box
845 *
846 * @return 成功返回0;失败返回错误码
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函数原型
855 * setSupvPosBox(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
856 * List[float[6]]) -> int
857 *
858 * @par Lua函数原型
859 * setSupvPosBox(frame: table, box: table) -> nil
860 *
861 */
862 int setSupvPosBox(const std::vector<double> &frame, const Box &box);
863
864 /**
865 *
866 * @param frame
867 * @param cylinder
868 *
869 * @return 成功返回0;失败返回错误码
870 * AUBO_BUSY
871 * AUBO_BAD_STATE
872 * -AUBO_INVL_ARGUMENT
873 * -AUBO_BAD_STATE
874 *
875 * @throws arcs::common_interface::AuboException
876 *
877 * @par Python函数原型
878 * setSupvPosCylinder(self: pyaubo_sdk.ForceControl, arg0: List[float],
879 * arg1: List[float[5]]) -> int
880 *
881 * @par Lua函数原型
882 * setSupvPosCylinder(frame: table, cylinder: table) -> nil
883 *
884 */
885 int setSupvPosCylinder(const std::vector<double> &frame,
886 const Cylinder &cylinder);
887
888 /**
889 *
890 * @param frame
891 * @param sphere
892 *
893 * @return 成功返回0;失败返回错误码
894 * AUBO_BUSY
895 * AUBO_BAD_STATE
896 * -AUBO_INVL_ARGUMENT
897 * -AUBO_BAD_STATE
898 *
899 * @throws arcs::common_interface::AuboException
900 *
901 * @par Python函数原型
902 * setSupvPosSphere(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
903 * List[float[3]]) -> int
904 *
905 * @par Lua函数原型
906 * setSupvPosSphere(frame: table, sphere: table) -> nil
907 *
908 */
909 int setSupvPosSphere(const std::vector<double> &frame,
910 const Sphere &sphere);
911
912 /**
913 * FCSupvReoriSpeed is used to set up reorientation speed supervision in
914 * Force Control. The supervision is activated when Force Control is
915 * activated with the instruction FCAct.
916 *
917 * The reorientation speed supervision is set up by defining minimum and
918 * maximum limits for the reorientation speed around the axis of the work
919 * object coordinate system. Once activated, the supervision will stop the
920 * execution if the values of the reorientation speed are to high.
921 *
922 * There are two speed supervisions: FCSupvReoriSpeed and FCSupvTCPSpeed,
923 * which is described in section FCSupvTCPSpeed on page 199.
924 * Both supervisions may be required because:
925 * - A robot axis can rotate with high speed while the TCP is stationary.
926 * - The TCP can be far from the rotating axisand asmallaxis rotation may
927 * result in a high speed movement of the TCP
928 *
929 * @param speed_limit
930 * @param outside
931 * @param timeout
932 *
933 * @return 成功返回0;失败返回错误码
934 * AUBO_BUSY
935 * AUBO_BAD_STATE
936 * -AUBO_INVL_ARGUMENT
937 * -AUBO_BAD_STATE
938 *
939 * @throws arcs::common_interface::AuboException
940 *
941 * @par Python函数原型
942 * setSupvReoriSpeed(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
943 * bool, arg2: float) -> int
944 *
945 * @par Lua函数原型
946 * setSupvReoriSpeed(speed_limit: table, outside: boolean, timeout: number)
947 * -> nil
948 *
949 */
950 int setSupvReoriSpeed(const std::vector<double> &speed_limit, bool outside,
951 double timeout);
952
953 /**
954 * FCSupvTCPSpeed is used to set up TCP speed supervision in Force Control.
955 * The supervision is activated when Force Control is activated with the
956 * instruction FCAct. The TCP speed supervision is set up by defining
957 * minimum and maximum limits for the TCP speed in the directions of the
958 * work object coordinate system. Once activated, the supervision will stop
959 * the execution if too high TCP speed values are detected.
960 *
961 * There are two speed supervisions: FCSupvTCPSpeed and FCSupvReorispeed,
962 * which is described in section FCSupvReoriSpeed on page 197.
963 *
964 * Both supervisions may be required because:
965 * - A robot axis can rotate with high speed while the TCP is stationary.
966 * - The TCP can be far from the rotating axisand asmallaxis rotation may
967 * result in a high speed movement of the TCP.
968 *
969 * @param speed_limit
970 * @param outside
971 * @param timeout
972 *
973 * @return 成功返回0;失败返回错误码
974 * AUBO_BUSY
975 * AUBO_BAD_STATE
976 * -AUBO_INVL_ARGUMENT
977 * -AUBO_BAD_STATE
978 *
979 * @throws arcs::common_interface::AuboException
980 *
981 * @par Python函数原型
982 * setSupvTcpSpeed(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1:
983 * bool, arg2: float) -> int
984 *
985 * @par Lua函数原型
986 * setSupvTcpSpeed(speed_limit: table, outside: boolean, timeout: number) ->
987 * nil
988 *
989 */
990 int setSupvTcpSpeed(const std::vector<double> &speed_limit, bool outside,
991 double timeout);
992
993 // 设置低通滤波器
994 // --- force frame filter: 过滤测量到的力/力矩
995 // +++ force loop filter: 力控输出参考速度的滤波器
996
997 /**
998 * 设置低通滤波器
999 *
1000 * --- force frame filter: 过滤测量到的力/力矩
1001 * +++ force loop filter: 力控输出参考速度的滤波器
1002 *
1003 * FCSetLPFilterTune is used change the response of force loop according to
1004 * description in Damping and LP-filter on page 103.
1005 *
1006 * @param cutoff_freq
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 * setLpFilter(self: pyaubo_sdk.ForceControl, arg0: List[float]) -> int
1018 *
1019 * @par Lua函数原型
1020 * setLpFilter(cutoff_freq: table) -> nil
1021 *
1022 */
1023 int setLpFilter(const std::vector<double> &cutoff_freq);
1024
1025 /**
1026 * 重置低通滤波器
1027 *
1028 * @return 成功返回0;失败返回错误码
1029 * AUBO_BUSY
1030 * AUBO_BAD_STATE
1031 * -AUBO_BAD_STATE
1032 *
1033 * @throws arcs::common_interface::AuboException
1034 *
1035 * @par Python函数原型
1036 * resetLpFilter(self: pyaubo_sdk.ForceControl) -> int
1037 *
1038 * @par Lua函数原型
1039 * resetLpFilter() -> nil
1040 *
1041 * @par JSON-RPC请求示例
1042 * {"jsonrpc":"2.0","method":"rob1.ForceControl.resetLpFilter","params":[],"id":1}
1043 *
1044 * @par JSON-RPC响应示例
1045 * {"id":1,"jsonrpc":"2.0","result":0}
1046 *
1047 */
1049
1050 /**
1051 * The FCSpdChgAct is used to activate FC SpeedChange function with desired
1052 * reference and recover behavior. When FC SpeedChange function is active,
1053 * the robot speed will be reduced/increased in order to keep the measured
1054 * signal close to the reference.
1055 *
1056 * @param ref_force
1057 *
1058 * @return 成功返回0;失败返回错误码
1059 * AUBO_BUSY
1060 * AUBO_BAD_STATE
1061 * -AUBO_INVL_ARGUMENT
1062 * -AUBO_BAD_STATE
1063 *
1064 * @throws arcs::common_interface::AuboException
1065 *
1066 * @par Python函数原型
1067 * speedChangeEnable(self: pyaubo_sdk.ForceControl, arg0: float) -> int
1068 *
1069 * @par Lua函数原型
1070 * speedChangeEnable(ref_force: number) -> nil
1071 *
1072 */
1073 int speedChangeEnable(double ref_force);
1074
1075 /**
1076 * Deactivate FC SpeedChange function.
1077 *
1078 * @return 成功返回0;失败返回错误码
1079 * AUBO_BUSY
1080 * AUBO_BAD_STATE
1081 * -AUBO_BAD_STATE
1082 *
1083 * @throws arcs::common_interface::AuboException
1084 *
1085 * @par Python函数原型
1086 * speedChangeDisable(self: pyaubo_sdk.ForceControl) -> int
1087 *
1088 * @par Lua函数原型
1089 * speedChangeDisable() -> nil
1090 *
1091 * @par JSON-RPC请求示例
1092 * {"jsonrpc":"2.0","method":"rob1.ForceControl.speedChangeDisable","params":[],"id":1}
1093 *
1094 * @par JSON-RPC响应示例
1095 * {"id":1,"jsonrpc":"2.0","result":0}
1096 *
1097 */
1099
1100 /**
1101 * FCSpdChgTunSet is used to set FC SpeedChange system parameters to a new
1102 * value.
1103 *
1104 * @param speed_levels
1105 * @param speed_ratio_min
1106 *
1107 * @return 成功返回0;失败返回错误码
1108 * AUBO_BUSY
1109 * AUBO_BAD_STATE
1110 * -AUBO_INVL_ARGUMENT
1111 * -AUBO_BAD_STATE
1112 *
1113 * @throws arcs::common_interface::AuboException
1114 *
1115 * @par Python函数原型
1116 * speedChangeTune(self: pyaubo_sdk.ForceControl, arg0: int, arg1: float) ->
1117 * int
1118 *
1119 * @par Lua函数原型
1120 * speedChangeTune(speed_levels: number, speed_ratio_min: number) -> nil
1121 *
1122 */
1123 int speedChangeTune(int speed_levels, double speed_ratio_min);
1124
1125 /* Defines how many Newtons are required to make the robot move 1 m/s. The
1126 higher the value, the less responsive the robot gets.
1127 The damping can be tuned (as a percentage of the system parameter values)
1128 by the RAPID instruction FCAct. */
1129 // 设置阻尼系数,阻尼的系统参数需要通过配置文件设置
1130 // [damping_fx, damping_fy, damping_fz, damping_tx, damping_ty, damping_tz]
1131 // A value between min and 10,000,000 Ns/m.
1132 // A value between minimum and 10,000,000 Nms/rad.
1133
1134 /**
1135 * FCSetDampingTune is used to tune the damping in the force control
1136 * coordinate systems. The parameters tuned are those described in Damping
1137 * in Torque x Direction - Damping in Torque z Direction on page 255 and
1138 * Damping in Force x Direction - Damping in Force z Direction on page 254.
1139 *
1140 * Damping can be set in the configuration file or by the instruction FCAct.
1141 * The difference is that this instruction can be used when force control is
1142 * active. FCSetDampingTune tunes the actual values set by the instruction
1143 * FCAct, not the value in the configuration file.
1144 *
1145 * @param damping
1146 * @param ramp_time
1147 *
1148 * @return 成功返回0;失败返回错误码
1149 * AUBO_BUSY
1150 * AUBO_BAD_STATE
1151 * -AUBO_INVL_ARGUMENT
1152 * -AUBO_BAD_STATE
1153 *
1154 * @throws arcs::common_interface::AuboException
1155 *
1156 * @par Python函数原型
1157 * setDamping(self: pyaubo_sdk.ForceControl, arg0: List[float], arg1: float)
1158 * -> int
1159 *
1160 * @par Lua函数原型
1161 * setDamping(damping: table, ramp_time: number) -> nil
1162 *
1163 */
1164 int setDamping(const std::vector<double> &damping, double ramp_time);
1165
1166 /**
1167 *
1168 *
1169 * @return 成功返回0;失败返回错误码
1170 * AUBO_BUSY
1171 * AUBO_BAD_STATE
1172 * -AUBO_BAD_STATE
1173 *
1174 * @throws arcs::common_interface::AuboException
1175 *
1176 * @par Python函数原型
1177 * resetDamping(self: pyaubo_sdk.ForceControl) -> int
1178 *
1179 * @par Lua函数原型
1180 * resetDamping() -> nil
1181 *
1182 * @par JSON-RPC请求示例
1183 * {"jsonrpc":"2.0","method":"rob1.ForceControl.resetDamping","params":[],"id":1}
1184 *
1185 * @par JSON-RPC响应示例
1186 * {"id":1,"jsonrpc":"2.0","result":0}
1187 *
1188 */
1190
1191 /**
1192 *
1193 * @return 成功返回0;失败返回错误码
1194 * AUBO_BUSY
1195 * AUBO_BAD_STATE
1196 * -AUBO_BAD_STATE
1197 *
1198 * @throws arcs::common_interface::AuboException
1199 *
1200 * @par JSON-RPC请求示例
1201 * {"jsonrpc":"2.0","method":"rob1.ForceControl.softFloatEnable","params":[],"id":1}
1202 *
1203 * @par JSON-RPC响应示例
1204 * {"id":1,"jsonrpc":"2.0","result":0}
1205 *
1206 */
1208
1209 /**
1210 *
1211 * @return 成功返回0;失败返回错误码
1212 * AUBO_BUSY
1213 * AUBO_BAD_STATE
1214 * -AUBO_BAD_STATE
1215 *
1216 * @throws arcs::common_interface::AuboException
1217 *
1218 * @par JSON-RPC请求示例
1219 * {"jsonrpc":"2.0","method":"rob1.ForceControl.softFloatDisable","params":[],"id":1}
1220 *
1221 * @par JSON-RPC响应示例
1222 * {"id":1,"jsonrpc":"2.0","result":-1}
1223 *
1224 */
1226
1227 /**
1228 * 返回是否开启了软浮动
1229 *
1230 * @return
1231 *
1232 * @throws arcs::common_interface::AuboException
1233 *
1234 * @par JSON-RPC请求示例
1235 * {"jsonrpc":"2.0","method":"rob1.ForceControl.isSoftFloatEnabled","params":[],"id":1}
1236 *
1237 * @par JSON-RPC响应示例
1238 * {"id":1,"jsonrpc":"2.0","result":false}
1239 *
1240 */
1242
1243 /**
1244 * 设置软浮动参数
1245 *
1246 * @param joint_softfloat
1247 * @param select
1248 * @param stiff_percent
1249 * @param stiff_damp_ratio
1250 * @param force_threshold
1251 * @param force_limit
1252 * @return
1253 */
1254 int setSoftFloatParams(bool joint_space, const std::vector<bool> &select,
1255 const std::vector<double> &stiff_percent,
1256 const std::vector<double> &stiff_damp_ratio,
1257 const std::vector<double> &force_threshold,
1258 const std::vector<double> &force_limit);
1259
1260 /**
1261 * 检测工具和外部物体的接触
1262 *
1263 * @param direction
1264 * 预期的接触方向,如果所有的元素为0,表示检测所有方向的接触
1265 * @return
1266 * 返回从当前点回退到碰撞开始点的周期步数,如果返回值为0,表示没有接触
1267 */
1268 int toolContact(const std::vector<bool> &direction);
1269
1270 /**
1271 * @brief 获取历史关节角度
1272 *
1273 * 根据给定的周期步数,从关节状态历史中回退指定数量的周期,获取当时的关节角度数据。
1274 *
1275 * @param steps
1276 * 需要回退的周期数(单位:控制周期数),值越大表示获取越早的历史数据
1277 * @return std::vector<double>
1278 * 对应时间点的各关节角度(单位:弧度)
1279 */
1280 std::vector<double> getActualJointPositionsHistory(int steps);
1281
1282protected:
1283 void *d_{ nullptr };
1284};
1285using ForceControlPtr = std::shared_ptr<ForceControl>;
1286} // namespace common_interface
1287} // namespace arcs
1288
1289#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)
The FCSpdChgAct is used to activate FC SpeedChange function with desired reference and recover behavi...
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)
FCSupvReoriSpeed is used to set up reorientation speed supervision in Force Control.
int setDynamicModelSearch(const std::vector< double > &damp_scale, const std::vector< double > &stiff_scale)
设置力控搜孔场景下的动力学模型
int fcDisable()
End force control
int setCondDistance(double distance, double timeout)
力控终止条件-距离
bool isSoftFloatEnabled()
返回是否开启了软浮动
int setSupvTcpSpeed(const std::vector< double > &speed_limit, bool outside, double timeout)
FCSupvTCPSpeed is used to set up TCP speed supervision in Force Control.
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)
FCSetDampingTune is used to tune the damping in the force control coordinate systems.
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 setCondTcpSpeed(const std::vector< double > &min, const std::vector< double > &max, bool outside, double timeout)
FCCondTCPSpeed is used to setup an end condition for the TCP speed.
int setCondForce(const std::vector< double > &min, const std::vector< double > &max, bool outside, double timeout)
设置力控终止条件:力,当测量的力在设置的范围之内,力控算法将保持运行,直到设置的条件不满足,力控将退出
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)
FCSupvPos is used to set up position supervision in Force Control.
int setSupvPosSphere(const std::vector< double > &frame, const Sphere &sphere)
int setSupvForce(const std::vector< double > &min, const std::vector< double > &max)
FCSupvForce is used to set up force supervision in Force Control.
std::vector< double > getFcSensorLimits()
获取最大力限制
int speedChangeDisable()
Deactivate FC SpeedChange function.
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()
Start force control
int setSupvOrient(const std::vector< double > &frame, double max_angle, double max_rot, bool outside)
FCSupvOrient is used to set up an supervision for the tool orientation.
std::vector< double > getFcSensorThresholds()
获取力控阈值
int speedChangeTune(int speed_levels, double speed_ratio_min)
FCSpdChgTunSet is used to set FC SpeedChange system parameters to a new value.
int toolContact(const std::vector< bool > &direction)
检测工具和外部物体的接触
int setCondOrient(const std::vector< double > &frame, double max_angle, double max_rot, bool outside, double timeout)
FCCondOrient is used to set up an end condition for the tool orientation.
std::tuple< std::vector< double >, std::vector< double >, std::vector< double > > DynamicsModel
Definition type_def.h:717
std::vector< double > Box
Definition type_def.h:725
std::vector< double > Sphere
Definition type_def.h:737
std::shared_ptr< ForceControl > ForceControlPtr
std::vector< double > Cylinder
Definition type_def.h:732
数据类型的定义