AUBO SDK  0.26.0
robot_manage.h
Go to the documentation of this file.
1/** @file robot_manage.h
2 * @brief 机器人管理接口,如上电、启动、拖动示教模式等
3 */
4#ifndef AUBO_SDK_ROBOT_CONTROL_INTERFACE_H
5#define AUBO_SDK_ROBOT_CONTROL_INTERFACE_H
6
7#include <vector>
8#include <thread>
9
10#include <aubo/global_config.h>
11#include <aubo/type_def.h>
12
13namespace arcs {
14namespace common_interface {
15
16/**
17 * @defgroup RobotManage RobotManage (机器人生命周期管理)
18 * @ingroup RobotInterface
19 * RobotManage
20 */
21class ARCS_ABI_EXPORT RobotManage
22{
23public:
25 virtual ~RobotManage();
26
27 /**
28 * @ingroup RobotManage
29 * \chinese
30 * 发起机器人上电请求
31 *
32 * @return 成功返回0; 失败返回错误码
33 * AUBO_BAD_STATE
34 *
35 * @throws arcs::common_interface::AuboException
36 *
37 * @par Python函数原型
38 * poweron(self: pyaubo_sdk.RobotManage) -> int
39 *
40 * @par Lua函数原型
41 * poweron() -> number
42 *
43 * @par Lua示例
44 * num = poweron()
45 *
46 * @par JSON-RPC请求示例
47 * {"jsonrpc":"2.0","method":"rob1.RobotManage.poweron","params":[],"id":1}
48 *
49 * @par JSON-RPC响应示例
50 * {"id":1,"jsonrpc":"2.0","result":0}
51 *
52 * @par C++ 实例
53 * @code
54 * auto rpc_cli = std::make_shared<RpcClient>();
55 * auto robot_name = rpc_cli->getRobotNames().front();
56 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->poweron();
57 * @endcode
58 *
59 * \endchinese
60 *
61 * \english
62 * Initiate robot power-on request
63 *
64 * @return Returns 0 on success; error code on failure
65 * AUBO_BAD_STATE
66 *
67 * @throws arcs::common_interface::AuboException
68 *
69 * @par Python function prototype
70 * poweron(self: pyaubo_sdk.RobotManage) -> int
71 *
72 * @par Lua function prototype
73 * poweron() -> number
74 *
75 * @par Lua example
76 * num = poweron()
77 *
78 * @par JSON-RPC request example
79 * {"jsonrpc":"2.0","method":"rob1.RobotManage.poweron","params":[],"id":1}
80 *
81 * @par JSON-RPC response example
82 * {"id":1,"jsonrpc":"2.0","result":0}
83 *
84 * @par C++ example
85 * @code
86 * auto rpc_cli = std::make_shared<RpcClient>();
87 * auto robot_name = rpc_cli->getRobotNames().front();
88 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->poweron();
89 * @endcode
90 * \endenglish
91 */
92 int poweron();
93
94 /**
95 * @ingroup RobotManage
96 * \chinese
97 * 发起机器人启动请求
98 *
99 * @return 成功返回0; 失败返回错误码
100 * AUBO_BAD_STATE
101 *
102 * @throws arcs::common_interface::AuboException
103 *
104 * @par Python函数原型
105 * startup(self: pyaubo_sdk.RobotManage) -> int
106 *
107 * @par Lua函数原型
108 * startup() -> number
109 *
110 * @par Lua示例
111 * num = startup()
112 *
113 * @par JSON-RPC请求示例
114 * {"jsonrpc":"2.0","method":"rob1.RobotManage.startup","params":[],"id":1}
115 *
116 * @par JSON-RPC响应示例
117 * {"id":1,"jsonrpc":"2.0","result":0}
118 *
119 * @par C++示例
120 * @code
121 * auto rpc_cli = std::make_shared<RpcClient>();
122 * auto robot_name = rpc_cli->getRobotNames().front();
123 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->startup();
124 * @endcode
125 * \endchinese
126 *
127 * \english
128 * Initiate robot startup request
129 *
130 * @return Returns 0 on success; error code on failure
131 * AUBO_BAD_STATE
132 *
133 * @throws arcs::common_interface::AuboException
134 *
135 * @par Python function prototype
136 * startup(self: pyaubo_sdk.RobotManage) -> int
137 *
138 * @par Lua function prototype
139 * startup() -> number
140 *
141 * @par Lua example
142 * num = startup()
143 *
144 * @par JSON-RPC request example
145 * {"jsonrpc":"2.0","method":"rob1.RobotManage.startup","params":[],"id":1}
146 *
147 * @par JSON-RPC response example
148 * {"id":1,"jsonrpc":"2.0","result":0}
149 *
150 * @par C++ example
151 * @code
152 * auto rpc_cli = std::make_shared<RpcClient>();
153 * auto robot_name = rpc_cli->getRobotNames().front();
154 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->startup();
155 * @endcode
156 * \endenglish
157 */
158 int startup();
159
160 /**
161 * @ingroup RobotManage
162 * \chinese
163 * 发起机器人松开刹车请求
164 *
165 * @return 成功返回0; 失败返回错误码
166 * AUBO_BAD_STATE
167 *
168 * @throws arcs::common_interface::AuboException
169 *
170 * @par Python函数原型
171 * releaseRobotBrake(self: pyaubo_sdk.RobotManage) -> int
172 *
173 * @par Lua函数原型
174 * releaseRobotBrake() -> number
175 *
176 * @par Lua示例
177 * num = releaseRobotBrake()
178 *
179 * @par JSON-RPC请求示例
180 * {"jsonrpc":"2.0","method":"rob1.RobotManage.releaseRobotBrake","params":[],"id":1}
181 *
182 * @par JSON-RPC响应示例
183 * {"id":1,"jsonrpc":"2.0","result":0}
184 *
185 * @par C++示例
186 * @code
187 * auto rpc_cli = std::make_shared<RpcClient>();
188 * auto robot_name = rpc_cli->getRobotNames().front();
189 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->releaseRobotBrake();
190 * @endcode
191 * \endchinese
192 *
193 * \english
194 * Initiate robot brake release request
195 *
196 * @return Returns 0 on success; error code on failure
197 * AUBO_BAD_STATE
198 *
199 * @throws arcs::common_interface::AuboException
200 *
201 * @par Python function prototype
202 * releaseRobotBrake(self: pyaubo_sdk.RobotManage) -> int
203 *
204 * @par Lua function prototype
205 * releaseRobotBrake() -> number
206 *
207 * @par Lua example
208 * num = releaseRobotBrake()
209 *
210 * @par JSON-RPC request example
211 * {"jsonrpc":"2.0","method":"rob1.RobotManage.releaseRobotBrake","params":[],"id":1}
212 *
213 * @par JSON-RPC response example
214 * {"id":1,"jsonrpc":"2.0","result":0}
215 *
216 * @par C++ example
217 * @code
218 * auto rpc_cli = std::make_shared<RpcClient>();
219 * auto robot_name = rpc_cli->getRobotNames().front();
220 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->releaseRobotBrake();
221 * @endcode
222 * \endenglish
223 */
225
226 /**
227 * @ingroup RobotManage
228 * \chinese
229 * 发起机器人刹车请求
230 *
231 * @return 成功返回0; 失败返回错误码
232 * AUBO_BAD_STATE
233 *
234 * @throws arcs::common_interface::AuboException
235 *
236 * @par Python函数原型
237 * lockRobotBrake(self: pyaubo_sdk.RobotManage) -> int
238 *
239 * @par Lua函数原型
240 * lockRobotBrake() -> number
241 *
242 * @par Lua示例
243 * num = lockRobotBrake()
244 *
245 * @par JSON-RPC请求示例
246 * {"jsonrpc":"2.0","method":"rob1.RobotManage.lockRobotBrake","params":[],"id":1}
247 *
248 * @par JSON-RPC响应示例
249 * {"id":1,"jsonrpc":"2.0","result":0}
250 *
251 * @par C++示例
252 * @code
253 * auto rpc_cli = std::make_shared<RpcClient>();
254 * auto robot_name = rpc_cli->getRobotNames().front();
255 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->lockRobotBrake();
256 * @endcode
257 * \endchinese
258 *
259 * \english
260 * Initiate robot brake lock request
261 *
262 * @return Returns 0 on success; error code on failure
263 * AUBO_BAD_STATE
264 *
265 * @throws arcs::common_interface::AuboException
266 *
267 * @par Python function prototype
268 * lockRobotBrake(self: pyaubo_sdk.RobotManage) -> int
269 *
270 * @par Lua function prototype
271 * lockRobotBrake() -> number
272 *
273 * @par Lua example
274 * num = lockRobotBrake()
275 *
276 * @par JSON-RPC request example
277 * {"jsonrpc":"2.0","method":"rob1.RobotManage.lockRobotBrake","params":[],"id":1}
278 *
279 * @par JSON-RPC response example
280 * {"id":1,"jsonrpc":"2.0","result":0}
281 *
282 * @par C++ example
283 * @code
284 * auto rpc_cli = std::make_shared<RpcClient>();
285 * auto robot_name = rpc_cli->getRobotNames().front();
286 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->lockRobotBrake();
287 * @endcode
288 * \endenglish
289 */
291
292 /**
293 * @ingroup RobotManage
294 * \chinese
295 * 发起机器人断电请求
296 *
297 * @return 成功返回0; 失败返回错误码
298 * AUBO_BAD_STATE
299 *
300 * @throws arcs::common_interface::AuboException
301 *
302 * @par Python函数原型
303 * poweroff(self: pyaubo_sdk.RobotManage) -> int
304 *
305 * @par Lua函数原型
306 * poweroff() -> number
307 *
308 * @par Lua示例
309 * num = poweroff()
310 *
311 * @par JSON-RPC请求示例
312 * {"jsonrpc":"2.0","method":"rob1.RobotManage.poweroff","params":[],"id":1}
313 *
314 * @par JSON-RPC响应示例
315 * {"id":1,"jsonrpc":"2.0","result":0}
316 *
317 * @par C++示例
318 * @code
319 * auto rpc_cli = std::make_shared<RpcClient>();
320 * auto robot_name = rpc_cli->getRobotNames().front();
321 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->poweroff();
322 * @endcode
323 * \endchinese
324 *
325 * \english
326 * Initiate robot power-off request
327 *
328 * @return Returns 0 on success; error code on failure
329 * AUBO_BAD_STATE
330 *
331 * @throws arcs::common_interface::AuboException
332 *
333 * @par Python function prototype
334 * poweroff(self: pyaubo_sdk.RobotManage) -> int
335 *
336 * @par Lua function prototype
337 * poweroff() -> number
338 *
339 * @par Lua example
340 * num = poweroff()
341 *
342 * @par JSON-RPC request example
343 * {"jsonrpc":"2.0","method":"rob1.RobotManage.poweroff","params":[],"id":1}
344 *
345 * @par JSON-RPC response example
346 * {"id":1,"jsonrpc":"2.0","result":0}
347 *
348 * @par C++ example
349 * @code
350 * auto rpc_cli = std::make_shared<RpcClient>();
351 * auto robot_name = rpc_cli->getRobotNames().front();
352 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->poweroff();
353 * @endcode
354 * \endenglish
355 */
356 int poweroff();
357
358 /**
359 * @ingroup RobotManage
360 * \chinese
361 * 发起机器人反向驱动请求
362 *
363 * @param enable
364 *
365 * @return 成功返回0; 失败返回错误码
366 * AUBO_BUSY
367 * AUBO_BAD_STATE
368 * -AUBO_INVL_ARGUMENT
369 * -AUBO_BAD_STATE
370 *
371 * @throws arcs::common_interface::AuboException
372 *
373 * @par Python函数原型
374 * backdrive(self: pyaubo_sdk.RobotManage, arg0: bool) -> int
375 *
376 * @par Lua函数原型
377 * backdrive(enable: boolean) -> number
378 *
379 * @par Lua示例
380 * num = backdrive(false)
381 *
382 * @par JSON-RPC请求示例
383 * {"jsonrpc":"2.0","method":"rob1.RobotManage.backdrive","params":[false],"id":1}
384 *
385 * @par JSON-RPC响应示例
386 * {"id":1,"jsonrpc":"2.0","result":0}
387 *
388 * @par C++示例
389 * @code
390 * auto rpc_cli = std::make_shared<RpcClient>();
391 * auto robot_name = rpc_cli->getRobotNames().front();
392 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->backdrive(true);
393 * @endcode
394 * \endchinese
395 *
396 * \english
397 * Initiate robot backdrive request
398 *
399 * @param enable
400 *
401 * @return Returns 0 on success; error code on failure
402 * AUBO_BUSY
403 * AUBO_BAD_STATE
404 * -AUBO_INVL_ARGUMENT
405 * -AUBO_BAD_STATE
406 *
407 * @throws arcs::common_interface::AuboException
408 *
409 * @par Python function prototype
410 * backdrive(self: pyaubo_sdk.RobotManage, arg0: bool) -> int
411 *
412 * @par Lua function prototype
413 * backdrive(enable: boolean) -> number
414 *
415 * @par Lua example
416 * num = backdrive(false)
417 *
418 * @par JSON-RPC request example
419 * {"jsonrpc":"2.0","method":"rob1.RobotManage.backdrive","params":[false],"id":1}
420 *
421 * @par JSON-RPC response example
422 * {"id":1,"jsonrpc":"2.0","result":0}
423 *
424 * @par C++ example
425 * @code
426 * auto rpc_cli = std::make_shared<RpcClient>();
427 * auto robot_name = rpc_cli->getRobotNames().front();
428 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->backdrive(true);
429 * @endcode
430 * \endenglish
431 */
432 int backdrive(bool enable);
433
434 /**
435 * @ingroup RobotManage
436 * \chinese
437 * 发起机器人自由驱动请求
438 * 接口在软件版本 0.31.x 后已废弃,使用 handguideMode 接口替换
439 * handguideMode({1,1,1,1,1}, {0,0,0,0,0,0})
440 *
441 * @param enable
442 *
443 * @return 成功返回0; 失败返回错误码
444 * AUBO_BUSY
445 * AUBO_BAD_STATE
446 * -AUBO_INVL_ARGUMENT
447 * -AUBO_BAD_STATE
448 *
449 * @throws arcs::common_interface::AuboException
450 *
451 * @par Python函数原型
452 * freedrive(self: pyaubo_sdk.RobotManage, arg0: bool) -> int
453 *
454 * @par Lua函数原型
455 * freedrive(enable: boolean) -> number
456 *
457 * @par Lua示例
458 * num = freedrive(false)
459 *
460 * @par JSON-RPC请求示例
461 * {"jsonrpc":"2.0","method":"rob1.RobotManage.freedrive","params":[true],"id":1}
462 *
463 * @par JSON-RPC响应示例
464 * {"id":1,"jsonrpc":"2.0","result":0}
465 *
466 * @par C++示例
467 * @code
468 * auto rpc_cli = std::make_shared<RpcClient>();
469 * auto robot_name = rpc_cli->getRobotNames().front();
470 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->freedrive(true);
471 * @endcode
472 * \endchinese
473 *
474 * \english
475 * Initiate robot freedrive request
476 * This interface is deprecated after software version 0.31.x, use
477 * handguideMode instead: handguideMode({1,1,1,1,1}, {0,0,0,0,0,0})
478 *
479 * @param enable
480 *
481 * @return Returns 0 on success; error code on failure
482 * AUBO_BUSY
483 * AUBO_BAD_STATE
484 * -AUBO_INVL_ARGUMENT
485 * -AUBO_BAD_STATE
486 *
487 * @throws arcs::common_interface::AuboException
488 *
489 * @par Python function prototype
490 * freedrive(self: pyaubo_sdk.RobotManage, arg0: bool) -> int
491 *
492 * @par Lua function prototype
493 * freedrive(enable: boolean) -> number
494 *
495 * @par Lua example
496 * num = freedrive(false)
497 *
498 * @par JSON-RPC request example
499 * {"jsonrpc":"2.0","method":"rob1.RobotManage.freedrive","params":[true],"id":1}
500 *
501 * @par JSON-RPC response example
502 * {"id":1,"jsonrpc":"2.0","result":0}
503 *
504 * @par C++ example
505 * @code
506 * auto rpc_cli = std::make_shared<RpcClient>();
507 * auto robot_name = rpc_cli->getRobotNames().front();
508 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->freedrive(true);
509 * @endcode
510 * \endenglish
511 */
512 int freedrive(bool enable);
513
514 /**
515 * @ingroup RobotManage
516 * \chinese
517 * 设置拖动示教参数
518 *
519 * @param freeAxes 可以拖动的轴 0-不能拖动 1-可以拖动
520 * @param feature 如果维度为0,代表基于 TCP 坐标系拖动
521 *
522 * @return 成功返回0; 失败返回错误码
523 * AUBO_BUSY
524 * AUBO_BAD_STATE
525 * -AUBO_INVL_ARGUMENT
526 * -AUBO_BAD_STATE
527 *
528 * @throws arcs::common_interface::AuboException
529 * \endchinese
530 *
531 * \english
532 * Advanced hand-guiding mode
533 *
534 * @param freeAxes Axes that can be moved: 0-cannot move, 1-can move
535 * @param feature If the dimension is 0, it means hand-guiding based on
536 * the TCP coordinate system
537 *
538 * @return Returns 0 on success; error code on failure
539 * AUBO_BUSY
540 * AUBO_BAD_STATE
541 * -AUBO_INVL_ARGUMENT
542 * -AUBO_BAD_STATE
543 *
544 * @throws arcs::common_interface::AuboException
545 * \endenglish
546 */
547 int setHandguideParams(const std::vector<int> &freeAxes,
548 const std::vector<double> &feature);
549
550 /**
551 * @ingroup RobotManage
552 * \chinese
553 * 获取拖动轴
554 * \endchinese
555 *
556 * \english
557 * Get Axes that can be moved
558 * \endenglish
559 */
560 std::vector<int> getHandguideFreeAxes();
561
562 /**
563 * @ingroup RobotManage
564 * \chinese
565 * 获取拖动参考坐标系
566 * \endchinese
567 *
568 * \english
569 * Get the drag reference coordinate system
570 * \endenglish
571 */
572 std::vector<double> getHandguideFeature();
573
574 /**
575 * @ingroup RobotManage
576 * \chinese
577 * 高阶拖动示教
578 *
579 * @param freeAxes 可以拖动的轴 0-不能拖动 1-可以拖动
580 * @param feature 如果维度为0,代表基于 TCP 坐标系拖动
581 *
582 * @return 成功返回0; 失败返回错误码
583 * AUBO_BUSY
584 * AUBO_BAD_STATE
585 * -AUBO_INVL_ARGUMENT
586 * -AUBO_BAD_STATE
587 *
588 * @throws arcs::common_interface::AuboException
589 * \endchinese
590 *
591 * \english
592 * Advanced hand-guiding mode
593 *
594 * @param freeAxes Axes that can be moved: 0-cannot move, 1-can move
595 * @param feature If the dimension is 0, it means hand-guiding based on the
596 * TCP coordinate system
597 *
598 * @return Returns 0 on success; error code on failure
599 * AUBO_BUSY
600 * AUBO_BAD_STATE
601 * -AUBO_INVL_ARGUMENT
602 * -AUBO_BAD_STATE
603 *
604 * @throws arcs::common_interface::AuboException
605 * \endenglish
606 */
607 int handguideMode(const std::vector<int> &freeAxes,
608 const std::vector<double> &feature);
609
610 /**
611 * @ingroup RobotManage
612 * \chinese
613 * 退出拖动示教
614 *
615 * @note 需 0.31.x 及以后软件版本
616 *
617 * @return 成功返回0; 失败返回错误码
618 * AUBO_BUSY
619 * AUBO_BAD_STATE
620 * -AUBO_BAD_STATE
621 *
622 * @throws arcs::common_interface::AuboException
623 * \endchinese
624 *
625 * \english
626 * Exit hand-guiding mode
627 *
628 * @note Requires software version 0.31.x or later
629 *
630 * @return Returns 0 on success; error code on failure
631 * AUBO_BUSY
632 * AUBO_BAD_STATE
633 * -AUBO_BAD_STATE
634 *
635 * @throws arcs::common_interface::AuboException
636 * \endenglish
637 */
639
640 /**
641 * @ingroup RobotManage
642 * \chinese
643 * 获取拖动示教器的状态(是否处于奇异空间)
644 *
645 * @note 暂未实现
646 *
647 * @return
648 * • 0 - 正常操作.
649 * • 1 - 接近奇异空间.
650 * • 2 - 极其接近奇异点,将产生较大的拖动阻尼.
651 *
652 * @throws arcs::common_interface::AuboException
653 * \endchinese
654 *
655 * \english
656 * Get the status of the hand-guiding device (whether it is in a singular
657 * space)
658 *
659 * @note Not implemented yet
660 *
661 * @return
662 * • 0 - Normal operation.
663 * • 1 - Approaching singular space.
664 * • 2 - Extremely close to a singularity, large hand-guiding damping will
665 * occur.
666 *
667 * @throws arcs::common_interface::AuboException
668 * \endenglish
669 */
671
672 /**
673 * @ingroup RobotManage
674 * \chinese
675 * 获取拖动示教器触发源
676 *
677 * @note 暂未实现
678 *
679 * @return
680 *
681 * @throws arcs::common_interface::AuboException
682 * \endchinese
683 *
684 * \english
685 * Get the trigger source of the hand-guiding device
686 *
687 * @note Not implemented yet
688 *
689 * @return
690 *
691 * @throws arcs::common_interface::AuboException
692 * \endenglish
693 */
695
696 /**
697 * @ingroup RobotManage
698 * \chinese
699 * 获取拖动示教使能状态
700 *
701 * @return 使能返回true; 失能返回false
702 *
703 * @throws arcs::common_interface::AuboException
704 *
705 * @par Lua函数原型
706 * isHandguideEnabled() -> boolean
707 *
708 * @par Lua示例
709 * Handguide = isHandguideEnabled()
710 *
711 * @par JSON-RPC请求示例
712 * {"jsonrpc":"2.0","method":"rob1.RobotManage.isHandguideEnabled","params":[],"id":1}
713 *
714 * @par JSON-RPC响应示例
715 * {"id":1,"jsonrpc":"2.0","result":false}
716 *
717 * \endchinese
718 * \english
719 * Get the hand-guiding enable status
720 *
721 * @return Returns true if enabled; false if disabled
722 *
723 * @throws arcs::common_interface::AuboException
724 *
725 * @par Lua function prototype
726 * isHandguideEnabled() -> boolean
727 *
728 * @par Lua example
729 * Handguide = isHandguideEnabled()
730 *
731 * @par JSON-RPC request example
732 * {"jsonrpc":"2.0","method":"rob1.RobotManage.isHandguideEnabled","params":[],"id":1}
733 *
734 * @par JSON-RPC response example
735 * {"id":1,"jsonrpc":"2.0","result":false}
736 *
737 * \endenglish
738 */
740
741 /**
742 * @ingroup RobotManage
743 * \chinese
744 * 发起机器人进入/退出仿真模式请求
745 *
746 * @param enable
747 *
748 * @return 成功返回0;失败返回错误码
749 * AUBO_BUSY
750 * AUBO_BAD_STATE
751 * -AUBO_INVL_ARGUMENT
752 * -AUBO_BAD_STATE
753 *
754 * @throws arcs::common_interface::AuboException
755 *
756 * @par Python函数原型
757 * setSim(self: pyaubo_sdk.RobotManage, arg0: bool) -> int
758 *
759 * @par Lua函数原型
760 * setSim(enable: boolean) -> number
761 *
762 * @par Lua示例
763 * num = setSim(true)
764 *
765 * @par JSON-RPC请求示例
766 * {"jsonrpc":"2.0","method":"rob1.RobotManage.setSim","params":[true],"id":1}
767 *
768 * @par JSON-RPC响应示例
769 * {"id":1,"jsonrpc":"2.0","result":0}
770 *
771 * @par C++示例
772 * @code
773 * auto rpc_cli = std::make_shared<RpcClient>();
774 * auto robot_name = rpc_cli->getRobotNames().front();
775 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->setSim(true);
776 * @endcode
777 * \endchinese
778 *
779 * \english
780 * Initiate robot enter/exit simulation mode request
781 *
782 * @param enable
783 *
784 * @return Returns 0 on success; error code on failure
785 * AUBO_BUSY
786 * AUBO_BAD_STATE
787 * -AUBO_INVL_ARGUMENT
788 * -AUBO_BAD_STATE
789 *
790 * @throws arcs::common_interface::AuboException
791 *
792 * @par Python function prototype
793 * setSim(self: pyaubo_sdk.RobotManage, arg0: bool) -> int
794 *
795 * @par Lua function prototype
796 * setSim(enable: boolean) -> number
797 *
798 * @par Lua example
799 * num = setSim(true)
800 *
801 * @par JSON-RPC request example
802 * {"jsonrpc":"2.0","method":"rob1.RobotManage.setSim","params":[true],"id":1}
803 *
804 * @par JSON-RPC response example
805 * {"id":1,"jsonrpc":"2.0","result":0}
806 *
807 * @par C++ example
808 * @code
809 * auto rpc_cli = std::make_shared<RpcClient>();
810 * auto robot_name = rpc_cli->getRobotNames().front();
811 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->setSim(true);
812 * @endcode
813 * \endenglish
814 */
815 int setSim(bool enable);
816
817 /**
818 * @ingroup RobotManage
819 * \chinese
820 * 设置机器人操作模式
821 *
822 * @param mode 操作模式
823 *
824 * @return 成功返回0; 失败返回错误码
825 * -AUBO_BAD_STATE
826 *
827 * @throws arcs::common_interface::AuboException
828 *
829 * @par Python函数原型
830 * setOperationalMode(self: pyaubo_sdk.RobotManage, arg0:
831 * arcs::common_interface::OperationalModeType) -> int
832 *
833 * @par Lua函数原型
834 * setOperationalMode(mode: number) -> number
835 *
836 * @par Lua示例
837 * num = setOperationalMode("Manual")
838 *
839 * @par JSON-RPC请求示例
840 * {"jsonrpc":"2.0","method":"rob1.RobotManage.setOperationalMode","params":["Manual"],"id":1}
841 *
842 * @par JSON-RPC响应示例
843 * {"id":1,"jsonrpc":"2.0","result":0}
844 *
845 * @par C++示例
846 * @code
847 * auto rpc_cli = std::make_shared<RpcClient>();
848 * auto robot_name = rpc_cli->getRobotNames().front();
849 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->setOperationalMode(OperationalModeType::Automatic);
850 * @endcode
851 * \endchinese
852 * \english
853 * Set the robot operational mode
854 *
855 * @param mode Operational mode
856 *
857 * @return Returns 0 on success; error code on failure
858 * -AUBO_BAD_STATE
859 *
860 * @throws arcs::common_interface::AuboException
861 *
862 * @par Python function prototype
863 * setOperationalMode(self: pyaubo_sdk.RobotManage, arg0:
864 * arcs::common_interface::OperationalModeType) -> int
865 *
866 * @par Lua function prototype
867 * setOperationalMode(mode: number) -> number
868 *
869 * @par Lua example
870 * num = setOperationalMode("Manual")
871 *
872 * @par JSON-RPC request example
873 * {"jsonrpc":"2.0","method":"rob1.RobotManage.setOperationalMode","params":["Manual"],"id":1}
874 *
875 * @par JSON-RPC response example
876 * {"id":1,"jsonrpc":"2.0","result":0}
877 *
878 * @par C++ example
879 * @code
880 * auto rpc_cli = std::make_shared<RpcClient>();
881 * auto robot_name = rpc_cli->getRobotNames().front();
882 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->setOperationalMode(OperationalModeType::Automatic);
883 * @endcode
884 * \endenglish
885 */
887
888 /**
889 * @ingroup RobotManage
890 * \chinese
891 * 获取机器人操作模式
892 *
893 * @return 机器人操作模式
894 *
895 * @throws arcs::common_interface::AuboException
896 *
897 * @par Python函数原型
898 * getOperationalMode(self: pyaubo_sdk.RobotManage) ->
899 * arcs::common_interface::OperationalModeType
900 *
901 * @par Lua函数原型
902 * getOperationalMode() -> number
903 *
904 * @par Lua示例
905 * num = getOperationalMode()
906 *
907 * @par JSON-RPC请求示例
908 * {"jsonrpc":"2.0","method":"rob1.RobotManage.getOperationalMode","params":[],"id":1}
909 *
910 * @par JSON-RPC响应示例
911 * {"id":1,"jsonrpc":"2.0","result":"Manual"}
912 *
913 * @par C++示例
914 * @code
915 * auto rpc_cli = std::make_shared<RpcClient>();
916 * auto robot_name = rpc_cli->getRobotNames().front();
917 * OperationalModeType mode =
918 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->getOperationalMode();
919 * @endcode
920 * \endchinese
921 * \english
922 * Get the robot operational mode
923 *
924 * @return Robot operational mode
925 *
926 * @throws arcs::common_interface::AuboException
927 *
928 * @par Python function prototype
929 * getOperationalMode(self: pyaubo_sdk.RobotManage) ->
930 * arcs::common_interface::OperationalModeType
931 *
932 * @par Lua function prototype
933 * getOperationalMode() -> number
934 *
935 * @par Lua example
936 * num = getOperationalMode()
937 *
938 * @par JSON-RPC request example
939 * {"jsonrpc":"2.0","method":"rob1.RobotManage.getOperationalMode","params":[],"id":1}
940 *
941 * @par JSON-RPC response example
942 * {"id":1,"jsonrpc":"2.0","result":"Manual"}
943 *
944 * @par C++ example
945 * @code
946 * auto rpc_cli = std::make_shared<RpcClient>();
947 * auto robot_name = rpc_cli->getRobotNames().front();
948 * OperationalModeType mode =
949 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->getOperationalMode();
950 * @endcode
951 * \endenglish
952 */
954
955 /**
956 * @ingroup RobotManage
957 * \chinese
958 * 获取控制模式
959 *
960 * @return 控制模式
961 *
962 * @throws arcs::common_interface::AuboException
963 *
964 * @par Python函数原型
965 * getRobotControlMode(self: pyaubo_sdk.RobotManage) ->
966 * arcs::common_interface::RobotControlModeType
967 *
968 * @par Lua函数原型
969 * getRobotControlMode() -> number
970 *
971 * @par Lua示例
972 * num = getRobotControlMode()
973 *
974 * @par JSON-RPC请求示例
975 * {"jsonrpc":"2.0","method":"rob1.RobotManage.getRobotControlMode","params":[],"id":1}
976 *
977 * @par JSON-RPC响应示例
978 * {"id":1,"jsonrpc":"2.0","result":"Position"}
979 *
980 * @par C++示例
981 * @code
982 * auto rpc_cli = std::make_shared<RpcClient>();
983 * auto robot_name = rpc_cli->getRobotNames().front();
984 * RobotControlModeType mode =
985 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->getRobotControlMode();
986 * @endcode
987 * \endchinese
988 * \english
989 * Get the control mode
990 *
991 * @return Control mode
992 *
993 * @throws arcs::common_interface::AuboException
994 *
995 * @par Python function prototype
996 * getRobotControlMode(self: pyaubo_sdk.RobotManage) ->
997 * arcs::common_interface::RobotControlModeType
998 *
999 * @par Lua function prototype
1000 * getRobotControlMode() -> number
1001 *
1002 * @par Lua example
1003 * num = getRobotControlMode()
1004 *
1005 * @par JSON-RPC request example
1006 * {"jsonrpc":"2.0","method":"rob1.RobotManage.getRobotControlMode","params":[],"id":1}
1007 *
1008 * @par JSON-RPC response example
1009 * {"id":1,"jsonrpc":"2.0","result":"Position"}
1010 *
1011 * @par C++ example
1012 * @code
1013 * auto rpc_cli = std::make_shared<RpcClient>();
1014 * auto robot_name = rpc_cli->getRobotNames().front();
1015 * RobotControlModeType mode =
1016 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->getRobotControlMode();
1017 * @endcode
1018 * \endenglish
1019 */
1021
1022 /**
1023 * @ingroup RobotManage
1024 * \chinese
1025 * 是否使能了拖动示教模式
1026 *
1027 * @return 使能返回true; 反之返回false
1028 *
1029 * @throws arcs::common_interface::AuboException
1030 *
1031 * @par Python函数原型
1032 * isFreedriveEnabled(self: pyaubo_sdk.RobotManage) -> bool
1033 *
1034 * @par Lua函数原型
1035 * isFreedriveEnabled() -> boolean
1036 *
1037 * @par Lua示例
1038 * FreedriveEnabled = isFreedriveEnabled()
1039 *
1040 * @par JSON-RPC请求示例
1041 * {"jsonrpc":"2.0","method":"rob1.RobotManage.isFreedriveEnabled","params":[],"id":1}
1042 *
1043 * @par JSON-RPC响应示例
1044 * {"id":1,"jsonrpc":"2.0","result":false}
1045 *
1046 * @par C++示例
1047 * @code
1048 * auto rpc_cli = std::make_shared<RpcClient>();
1049 * auto robot_name = rpc_cli->getRobotNames().front();
1050 * bool isEnabled =
1051 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->isFreedriveEnabled();
1052 * @endcode
1053 * \endchinese
1054 * \english
1055 * Whether the freedrive mode is enabled
1056 *
1057 * @return Returns true if enabled; otherwise returns false
1058 *
1059 * @throws arcs::common_interface::AuboException
1060 *
1061 * @par Python function prototype
1062 * isFreedriveEnabled(self: pyaubo_sdk.RobotManage) -> bool
1063 *
1064 * @par Lua function prototype
1065 * isFreedriveEnabled() -> boolean
1066 *
1067 * @par Lua example
1068 * FreedriveEnabled = isFreedriveEnabled()
1069 *
1070 * @par JSON-RPC request example
1071 * {"jsonrpc":"2.0","method":"rob1.RobotManage.isFreedriveEnabled","params":[],"id":1}
1072 *
1073 * @par JSON-RPC response example
1074 * {"id":1,"jsonrpc":"2.0","result":false}
1075 *
1076 * @par C++ example
1077 * @code
1078 * auto rpc_cli = std::make_shared<RpcClient>();
1079 * auto robot_name = rpc_cli->getRobotNames().front();
1080 * bool isEnabled =
1081 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->isFreedriveEnabled();
1082 * @endcode
1083 * \endenglish
1084 */
1086
1087 /**
1088 * @ingroup RobotManage
1089 * \chinese
1090 * 是否使能了反向驱动模式
1091 *
1092 * @return 使能返回true; 反之返回false
1093 *
1094 * @throws arcs::common_interface::AuboException
1095 *
1096 * @par Python函数原型
1097 * isBackdriveEnabled(self: pyaubo_sdk.RobotManage) -> bool
1098 *
1099 * @par Lua函数原型
1100 * isBackdriveEnabled() -> boolean
1101 *
1102 * @par Lua示例
1103 * BackdriveEnabled = isBackdriveEnabled()
1104 *
1105 * @par JSON-RPC请求示例
1106 * {"jsonrpc":"2.0","method":"rob1.RobotManage.isBackdriveEnabled","params":[],"id":1}
1107 *
1108 * @par JSON-RPC响应示例
1109 * {"id":1,"jsonrpc":"2.0","result":false}
1110 *
1111 * @par C++示例
1112 * @code
1113 * auto rpc_cli = std::make_shared<RpcClient>();
1114 * auto robot_name = rpc_cli->getRobotNames().front();
1115 * bool isEnabled =
1116 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->isBackdriveEnabled();
1117 * @endcode
1118 * \endchinese
1119 * \english
1120 * Whether the backdrive mode is enabled
1121 *
1122 * @return Returns true if enabled; otherwise returns false
1123 *
1124 * @throws arcs::common_interface::AuboException
1125 *
1126 * @par Python function prototype
1127 * isBackdriveEnabled(self: pyaubo_sdk.RobotManage) -> bool
1128 *
1129 * @par Lua function prototype
1130 * isBackdriveEnabled() -> boolean
1131 *
1132 * @par Lua example
1133 * BackdriveEnabled = isBackdriveEnabled()
1134 *
1135 * @par JSON-RPC request example
1136 * {"jsonrpc":"2.0","method":"rob1.RobotManage.isBackdriveEnabled","params":[],"id":1}
1137 *
1138 * @par JSON-RPC response example
1139 * {"id":1,"jsonrpc":"2.0","result":false}
1140 *
1141 * @par C++ example
1142 * @code
1143 * auto rpc_cli = std::make_shared<RpcClient>();
1144 * auto robot_name = rpc_cli->getRobotNames().front();
1145 * bool isEnabled =
1146 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->isBackdriveEnabled();
1147 * @endcode
1148 * \endenglish
1149 */
1151
1152 /**
1153 * @ingroup RobotManage
1154 * \chinese
1155 * 是否使能了仿真模式
1156 *
1157 * @return 使能返回true; 反之返回false
1158 *
1159 * @throws arcs::common_interface::AuboException
1160 *
1161 * @par Python函数原型
1162 * isSimulationEnabled(self: pyaubo_sdk.RobotManage) -> bool
1163 *
1164 * @par Lua函数原型
1165 * isSimulationEnabled() -> boolean
1166 *
1167 * @par Lua示例
1168 * SimulationEnabled = isSimulationEnabled()
1169 *
1170 * @par JSON-RPC请求示例
1171 * {"jsonrpc":"2.0","method":"rob1.RobotManage.isSimulationEnabled","params":[],"id":1}
1172 *
1173 * @par JSON-RPC响应示例
1174 * {"id":1,"jsonrpc":"2.0","result":true}
1175 *
1176 * @par C++示例
1177 * @code
1178 * auto rpc_cli = std::make_shared<RpcClient>();
1179 * auto robot_name = rpc_cli->getRobotNames().front();
1180 * bool isEnabled =
1181 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->isSimulationEnabled();
1182 * @endcode
1183 * \endchinese
1184 * \english
1185 * Whether the simulation mode is enabled
1186 *
1187 * @return Returns true if enabled; otherwise returns false
1188 *
1189 * @throws arcs::common_interface::AuboException
1190 *
1191 * @par Python function prototype
1192 * isSimulationEnabled(self: pyaubo_sdk.RobotManage) -> bool
1193 *
1194 * @par Lua function prototype
1195 * isSimulationEnabled() -> boolean
1196 *
1197 * @par Lua example
1198 * SimulationEnabled = isSimulationEnabled()
1199 *
1200 * @par JSON-RPC request example
1201 * {"jsonrpc":"2.0","method":"rob1.RobotManage.isSimulationEnabled","params":[],"id":1}
1202 *
1203 * @par JSON-RPC response example
1204 * {"id":1,"jsonrpc":"2.0","result":true}
1205 *
1206 * @par C++ example
1207 * @code
1208 * auto rpc_cli = std::make_shared<RpcClient>();
1209 * auto robot_name = rpc_cli->getRobotNames().front();
1210 * bool isEnabled =
1211 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->isSimulationEnabled();
1212 * @endcode
1213 * \endenglish
1214 */
1216
1217 /**
1218 * @ingroup RobotManage
1219 * \chinese
1220 * 清除防护停机,包括碰撞停机
1221 *
1222 * @return 成功返回0;失败返回错误码
1223 * AUBO_BUSY
1224 * AUBO_BAD_STATE
1225 * -AUBO_BAD_STATE
1226 *
1227 * @throws arcs::common_interface::AuboException
1228 *
1229 * @par Python函数原型
1230 * setUnlockProtectiveStop(self: pyaubo_sdk.RobotManage) -> int
1231 *
1232 * @par Lua函数原型
1233 * setUnlockProtectiveStop() -> number
1234 *
1235 * @par Lua示例
1236 * num = setUnlockProtectiveStop()
1237 *
1238 * @par JSON-RPC请求示例
1239 * {"jsonrpc":"2.0","method":"rob1.RobotManage.setUnlockProtectiveStop","params":[],"id":1}
1240 *
1241 * @par JSON-RPC响应示例
1242 * {"id":1,"jsonrpc":"2.0","result":0}
1243 *
1244 * @par C++示例
1245 * @code
1246 * auto rpc_cli = std::make_shared<RpcClient>();
1247 * auto robot_name = rpc_cli->getRobotNames().front();
1248 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->setUnlockProtectiveStop();
1249 * @endcode
1250 * \endchinese
1251 * \english
1252 * Clear protective stop, including collision stop
1253 *
1254 * @return Returns 0 on success; error code on failure
1255 * AUBO_BUSY
1256 * AUBO_BAD_STATE
1257 * -AUBO_BAD_STATE
1258 *
1259 * @throws arcs::common_interface::AuboException
1260 *
1261 * @par Python function prototype
1262 * setUnlockProtectiveStop(self: pyaubo_sdk.RobotManage) -> int
1263 *
1264 * @par Lua function prototype
1265 * setUnlockProtectiveStop() -> number
1266 *
1267 * @par Lua example
1268 * num = setUnlockProtectiveStop()
1269 *
1270 * @par JSON-RPC request example
1271 * {"jsonrpc":"2.0","method":"rob1.RobotManage.setUnlockProtectiveStop","params":[],"id":1}
1272 *
1273 * @par JSON-RPC response example
1274 * {"id":1,"jsonrpc":"2.0","result":0}
1275 *
1276 * @par C++ example
1277 * @code
1278 * auto rpc_cli = std::make_shared<RpcClient>();
1279 * auto robot_name = rpc_cli->getRobotNames().front();
1280 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->setUnlockProtectiveStop();
1281 * @endcode
1282 * \endenglish
1283 */
1285
1286 /**
1287 * @ingroup RobotManage
1288 * \chinese
1289 * 重置安全接口板,一般在机器人断电之后需要重置时调用,比如机器人急停、故障等之后
1290 *
1291 * @return 成功返回0; 失败返回错误码
1292 * AUBO_BUSY
1293 * AUBO_BAD_STATE
1294 * -AUBO_BAD_STATE
1295 *
1296 * @throws arcs::common_interface::AuboException
1297 *
1298 * @par Python函数原型
1299 * restartInterfaceBoard(self: pyaubo_sdk.RobotManage) -> int
1300 *
1301 * @par Lua函数原型
1302 * restartInterfaceBoard() -> number
1303 *
1304 * @par Lua示例
1305 * num = restartInterfaceBoard()
1306 *
1307 * @par JSON-RPC请求示例
1308 * {"jsonrpc":"2.0","method":"rob1.RobotManage.restartInterfaceBoard","params":[],"id":1}
1309 *
1310 * @par JSON-RPC响应示例
1311 * {"id":1,"jsonrpc":"2.0","result":0}
1312 *
1313 * @par C++示例
1314 * @code
1315 * auto rpc_cli = std::make_shared<RpcClient>();
1316 * auto robot_name = rpc_cli->getRobotNames().front();
1317 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->restartInterfaceBoard();
1318 * @endcode
1319 * \endchinese
1320 * \english
1321 * Reset the safety interface board, usually called after the robot is
1322 * powered off and needs to be reset, such as after emergency stop or fault.
1323 *
1324 * @return Returns 0 on success; error code on failure
1325 * AUBO_BUSY
1326 * AUBO_BAD_STATE
1327 * -AUBO_BAD_STATE
1328 *
1329 * @throws arcs::common_interface::AuboException
1330 *
1331 * @par Python function prototype
1332 * restartInterfaceBoard(self: pyaubo_sdk.RobotManage) -> int
1333 *
1334 * @par Lua function prototype
1335 * restartInterfaceBoard() -> number
1336 *
1337 * @par Lua example
1338 * num = restartInterfaceBoard()
1339 *
1340 * @par JSON-RPC request example
1341 * {"jsonrpc":"2.0","method":"rob1.RobotManage.restartInterfaceBoard","params":[],"id":1}
1342 *
1343 * @par JSON-RPC response example
1344 * {"id":1,"jsonrpc":"2.0","result":0}
1345 *
1346 * @par C++ example
1347 * @code
1348 * auto rpc_cli = std::make_shared<RpcClient>();
1349 * auto robot_name = rpc_cli->getRobotNames().front();
1350 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->restartInterfaceBoard();
1351 * @endcode
1352 * \endenglish
1353 */
1355
1356 /**
1357 * @ingroup RobotManage
1358 * \chinese
1359 * 释放并清空指定内存缓存的记录数据
1360 *
1361 * @param name
1362 * 缓存名称
1363 *
1364 * @return 成功返回0;失败返回错误码(<0)
1365 *
1366 * @throws arcs::common_interface::AuboException
1367 *
1368 * @par Lua函数原型
1369 * recordCacheFree(name: string) -> nil
1370 *
1371 * @par Lua示例
1372 * recordCacheFree("rec")
1373 *
1374 * \endchinese
1375 * \english
1376 * Free and clear recorded data of the specified memory cache
1377 *
1378 * @param name
1379 * Cache name
1380 *
1381 * @return Returns 0 on success; negative error code on failure
1382 *
1383 * @throws arcs::common_interface::AuboException
1384 *
1385 * @par Lua function prototype
1386 * recordCacheFree(name: string) -> nil
1387 *
1388 * @par Lua example
1389 * recordCacheFree("rec")
1390 *
1391 * \endenglish
1392 */
1393 int recordCacheFree(const std::string &name);
1394
1395 /**
1396 * @ingroup RobotManage
1397 * \chinese
1398 * 开始实时轨迹的内存缓存记录(不落盘)
1399 *
1400 * @param name
1401 * 缓存名称(用于索引内存中的记录数据)。空字符串将返回参数错误。
1402 *
1403 * @return 成功返回0;失败返回错误码(<0)
1404 *
1405 * @throws arcs::common_interface::AuboException
1406 *
1407 * @par Lua函数原型
1408 * startRecordCache(name: string) -> nil
1409 *
1410 * @par Lua示例
1411 * startRecordCache("rec")
1412 *
1413 * \endchinese
1414 * \english
1415 * Start real-time trajectory recording to memory cache (no file output)
1416 *
1417 * @param name
1418 * Cache name used to index recorded data in memory. Empty string returns
1419 * invalid argument.
1420 *
1421 * @return Returns 0 on success; negative error code on failure
1422 *
1423 * @throws arcs::common_interface::AuboException
1424 *
1425 * @par Lua function prototype
1426 * startRecordCache(name: string) -> nil
1427 *
1428 * @par Lua example
1429 * startRecordCache("rec")
1430 *
1431 * \endenglish
1432 */
1433 int startRecordCache(const std::string &name);
1434
1435 /**
1436 * @ingroup RobotManage
1437 * \chinese
1438 * 停止当前实时轨迹内存缓存记录
1439 *
1440 * @return 成功返回0;失败返回错误码(<0)
1441 *
1442 * @throws arcs::common_interface::AuboException
1443 *
1444 * @par Lua函数原型
1445 * stopRecordCache() -> nil
1446 *
1447 * @par Lua示例
1448 * stopRecordCache()
1449 *
1450 * \endchinese
1451 * \english
1452 * Stop current real-time trajectory recording to memory cache
1453 *
1454 * @return Returns 0 on success; negative error code on failure
1455 *
1456 * @throws arcs::common_interface::AuboException
1457 *
1458 * @par Lua function prototype
1459 * stopRecordCache() -> nil
1460 *
1461 * @par Lua example
1462 * stopRecordCache()
1463 *
1464 * \endenglish
1465 */
1467
1468 /**
1469 * @ingroup RobotManage
1470 * \chinese
1471 * 暂停/恢复当前实时轨迹内存缓存记录
1472 *
1473 * @param pause
1474 * true:暂停缓存记录;false:恢复缓存记录
1475 *
1476 * @return 成功返回0;失败返回错误码(<0)
1477 *
1478 * @throws arcs::common_interface::AuboException
1479 *
1480 * @par Lua函数原型
1481 * pauseRecordCache(pause: boolean) -> nil
1482 *
1483 * @par Lua示例
1484 * pauseRecordCache(true) -- 暂停
1485 * pauseRecordCache(false) -- 恢复
1486 *
1487 * \endchinese
1488 * \english
1489 * Pause or resume current real-time trajectory recording to memory cache
1490 *
1491 * @param pause
1492 * true to pause cache recording; false to resume cache recording
1493 *
1494 * @return Returns 0 on success; negative error code on failure
1495 *
1496 * @throws arcs::common_interface::AuboException
1497 *
1498 * @par Lua function prototype
1499 * pauseRecordCache(pause: boolean) -> nil
1500 *
1501 * @par Lua example
1502 * pauseRecordCache(true) -- pause
1503 * pauseRecordCache(false) -- resume
1504 *
1505 * \endenglish
1506 */
1507 int pauseRecordCache(bool pause);
1508
1509 /**
1510 * @ingroup RobotManage
1511 * \chinese
1512 * 获取指定内存缓存的记录数据
1513 *
1514 * @param name
1515 * 缓存名称
1516 *
1517 * @param frames
1518 * 获取帧数上限:
1519 * - frames=0:获取全部已记录帧(1帧=1周期)
1520 * - frames>0:最多获取最近 frames 帧
1521 *
1522 * @return 成功返回获取到的帧数(>=0);失败返回错误码(<0)
1523 *
1524 * @throws arcs::common_interface::AuboException
1525 *
1526 * @par Lua函数原型
1527 * getRecordCache(name: string, frames: number = 0) -> number
1528 *
1529 * @par Lua示例
1530 * n = getRecordCache("rec") -- 获取全部,返回帧数
1531 * n = getRecordCache("rec", 2000) -- 获取最近2000帧,返回帧数
1532 *
1533 * \endchinese
1534 * \english
1535 * Get recorded data from the specified memory cache
1536 *
1537 * @param name
1538 * Cache name
1539 *
1540 * @param frames
1541 * Frame limit:
1542 * - frames=0: get all recorded frames (1 frame = 1 control cycle)
1543 * - frames>0: get up to the latest 'frames' frames
1544 *
1545 * @return Returns the number of frames fetched (>=0) on success;
1546 * negative error code on failure
1547 *
1548 * @throws arcs::common_interface::AuboException
1549 *
1550 * @par Lua function prototype
1551 * getRecordCache(name: string, frames: number = 0) -> number
1552 *
1553 * @par Lua example
1554 * n = getRecordCache("rec") -- all frames, returns count
1555 * n = getRecordCache("rec", 2000) -- latest 2000 frames, returns count
1556 *
1557 * \endenglish
1558 */
1559 int getRecordCache(const std::string &name, size_t frames = 0);
1560
1561 /**
1562 * @ingroup RobotManage
1563 * \chinese
1564 * 开始实时轨迹的记录
1565 *
1566 * @param file_name
1567 *
1568 * @return 成功返回0;失败返回错误码
1569 * AUBO_BUSY
1570 * AUBO_BAD_STATE
1571 * -AUBO_INVL_ARGUMENT
1572 * -AUBO_BAD_STATE
1573 *
1574 * @throws arcs::common_interface::AuboException
1575 *
1576 * @par Lua函数原型
1577 * startRecord(fiel_name: string) -> nil
1578 *
1579 * @par Lua示例
1580 * startRecord("traje.csv")
1581 *
1582 * \endchinese
1583 * \english
1584 * Start real-time trajectory recording
1585 *
1586 * @param file_name
1587 *
1588 * @return Returns 0 on success; error code on failure
1589 * AUBO_BUSY
1590 * AUBO_BAD_STATE
1591 * -AUBO_INVL_ARGUMENT
1592 * -AUBO_BAD_STATE
1593 *
1594 * @throws arcs::common_interface::AuboException
1595 *
1596 * @par Lua function prototype
1597 * startRecord(fiel_name: string) -> nil
1598 *
1599 * @par Lua example
1600 * startRecord("traje.csv")
1601 *
1602 * \endenglish
1603 */
1604 int startRecord(const std::string &file_name);
1605
1606 /**
1607 * @ingroup RobotManage
1608 * \chinese
1609 * 停止实时记录
1610 *
1611 * @return 成功返回0;失败返回错误码
1612 * AUBO_BUSY
1613 * AUBO_BAD_STATE
1614 * -AUBO_BAD_STATE
1615 *
1616 * @throws arcs::common_interface::AuboException
1617 *
1618 * @par Lua函数原型
1619 * stopRecord() -> nil
1620 *
1621 * @par Lua示例
1622 * stopRecord()
1623 *
1624 * @par JSON-RPC请求示例
1625 * {"jsonrpc":"2.0","method":"rob1.RobotManage.stopRecord","params":[],"id":1}
1626 *
1627 * @par JSON-RPC响应示例
1628 * {"id":1,"jsonrpc":"2.0","result":0}
1629 *
1630 * \endchinese
1631 * \english
1632 * Stop real-time recording
1633 *
1634 * @return Returns 0 on success; error code on failure
1635 * AUBO_BUSY
1636 * AUBO_BAD_STATE
1637 * -AUBO_BAD_STATE
1638 *
1639 * @throws arcs::common_interface::AuboException
1640 *
1641 * @par Lua function prototype
1642 * stopRecord() -> nil
1643 *
1644 * @par Lua example
1645 * stopRecord()
1646 *
1647 * @par JSON-RPC request example
1648 * {"jsonrpc":"2.0","method":"rob1.RobotManage.stopRecord","params":[],"id":1}
1649 *
1650 * @par JSON-RPC response example
1651 * {"id":1,"jsonrpc":"2.0","result":0}
1652 *
1653 * \endenglish
1654 */
1656
1657 /**
1658 * @ingroup RobotManage
1659 * \chinese
1660 * 暂停实时记录
1661 *
1662 * @param pause
1663 *
1664 * @return 成功返回0;失败返回错误码
1665 * AUBO_BUSY
1666 * AUBO_BAD_STATE
1667 * -AUBO_BAD_STATE
1668 *
1669 * @throws arcs::common_interface::AuboException
1670 *
1671 * @par JSON-RPC请求示例
1672 * {"jsonrpc":"2.0","method":"rob1.RobotManage.pauseRecord","params":[true],"id":1}
1673 *
1674 * @par JSON-RPC响应示例
1675 * {"id":1,"jsonrpc":"2.0","result":0}
1676 *
1677 * \endchinese
1678 * \english
1679 * Pause real-time recording
1680 *
1681 * @param pause
1682 *
1683 * @return Returns 0 on success; error code on failure
1684 * AUBO_BUSY
1685 * AUBO_BAD_STATE
1686 * -AUBO_BAD_STATE
1687 *
1688 * @throws arcs::common_interface::AuboException
1689 *
1690 * @par JSON-RPC request example
1691 * {"jsonrpc":"2.0","method":"rob1.RobotManage.pauseRecord","params":[true],"id":1}
1692 *
1693 * @par JSON-RPC response example
1694 * {"id":1,"jsonrpc":"2.0","result":0}
1695 *
1696 * \endenglish
1697 */
1698 int pauseRecord(bool pause);
1699
1700 /**
1701 * @ingroup RobotManage
1702 * \chinese
1703 * 发起机器人进入/退出联动模式请求,
1704 * 只有操作模式为自动或者无时,才能使能联动模式
1705 *
1706 * @param enable
1707 *
1708 * @return 成功返回0; 失败返回错误码
1709 * AUBO_BUSY
1710 * AUBO_REQUEST_IGNORE
1711 * -AUBO_BAD_STATE
1712 *
1713 * @throws arcs::common_interface::AuboException
1714 *
1715 * @par Python函数原型
1716 * setLinkModeEnable(self: pyaubo_sdk.RobotManage, arg0: bool) -> int
1717 *
1718 * @par Lua函数原型
1719 * setLinkModeEnable(enable: boolean) -> number
1720 *
1721 * @par Lua示例
1722 * num = setLinkModeEnable(true)
1723 *
1724 * @par JSON-RPC请求示例
1725 * {"jsonrpc":"2.0","method":"rob1.RobotManage.setLinkModeEnable","params":[true],"id":1}
1726 *
1727 * @par JSON-RPC响应示例
1728 * {"id":1,"jsonrpc":"2.0","result":0}
1729 *
1730 * @par C++示例
1731 * @code
1732 * auto rpc_cli = std::make_shared<RpcClient>();
1733 * auto robot_name = rpc_cli->getRobotNames().front();
1734 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->setLinkModeEnable(true);
1735 * @endcode
1736 * \endchinese
1737 * \english
1738 * Initiate robot enter/exit link mode request.
1739 * Link mode can only be enabled when the operation mode is Automatic or
1740 * None.
1741 *
1742 * @param enable
1743 *
1744 * @return Returns 0 on success; error code on failure
1745 * AUBO_BUSY
1746 * AUBO_REQUEST_IGNORE
1747 * -AUBO_BAD_STATE
1748 *
1749 * @throws arcs::common_interface::AuboException
1750 *
1751 * @par Python function prototype
1752 * setLinkModeEnable(self: pyaubo_sdk.RobotManage, arg0: bool) -> int
1753 *
1754 * @par Lua function prototype
1755 * setLinkModeEnable(enable: boolean) -> number
1756 *
1757 * @par Lua example
1758 * num = setLinkModeEnable(true)
1759 *
1760 * @par JSON-RPC request example
1761 * {"jsonrpc":"2.0","method":"rob1.RobotManage.setLinkModeEnable","params":[true],"id":1}
1762 *
1763 * @par JSON-RPC response example
1764 * {"id":1,"jsonrpc":"2.0","result":0}
1765 *
1766 * @par C++ example
1767 * @code
1768 * auto rpc_cli = std::make_shared<RpcClient>();
1769 * auto robot_name = rpc_cli->getRobotNames().front();
1770 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->setLinkModeEnable(true);
1771 * @endcode
1772 * \endenglish
1773 */
1774 int setLinkModeEnable(bool enable);
1775
1776 /**
1777 * @ingroup RobotManage
1778 * \chinese
1779 * 是否使能了联动模式,联动模式下用户可以通过外部IO控制机器人(用户可以对IO的功能进行配置)
1780 *
1781 * @return 使能返回true; 反之返回false
1782 *
1783 * @throws arcs::common_interface::AuboException
1784 *
1785 * @par Python函数原型
1786 * isLinkModeEnabled(self: pyaubo_sdk.RobotManage) -> bool
1787 *
1788 * @par Lua函数原型
1789 * isLinkModeEnabled() -> boolean
1790 *
1791 * @par Lua示例
1792 * LinkModeEnabled = isLinkModeEnabled()
1793 *
1794 * @par JSON-RPC请求示例
1795 * {"jsonrpc":"2.0","method":"rob1.RobotManage.isLinkModeEnabled","params":[],"id":1}
1796 *
1797 * @par JSON-RPC响应示例
1798 * {"id":1,"jsonrpc":"2.0","result":false}
1799 *
1800 * @par C++示例
1801 * @code
1802 * auto rpc_cli = std::make_shared<RpcClient>();
1803 * auto robot_name = rpc_cli->getRobotNames().front();
1804 * bool isEnabled =
1805 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->isLinkModeEnabled();
1806 * @endcode
1807 * \endchinese
1808 * \english
1809 * Whether the link mode is enabled. In link mode, users can control the
1810 * robot via external IO (users can configure the IO functions).
1811 *
1812 * @return Returns true if enabled; otherwise returns false
1813 *
1814 * @throws arcs::common_interface::AuboException
1815 *
1816 * @par Python function prototype
1817 * isLinkModeEnabled(self: pyaubo_sdk.RobotManage) -> bool
1818 *
1819 * @par Lua function prototype
1820 * isLinkModeEnabled() -> boolean
1821 *
1822 * @par Lua example
1823 * LinkModeEnabled = isLinkModeEnabled()
1824 *
1825 * @par JSON-RPC request example
1826 * {"jsonrpc":"2.0","method":"rob1.RobotManage.isLinkModeEnabled","params":[],"id":1}
1827 *
1828 * @par JSON-RPC response example
1829 * {"id":1,"jsonrpc":"2.0","result":false}
1830 *
1831 * @par C++ example
1832 * @code
1833 * auto rpc_cli = std::make_shared<RpcClient>();
1834 * auto robot_name = rpc_cli->getRobotNames().front();
1835 * bool isEnabled =
1836 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->isLinkModeEnabled();
1837 * @endcode
1838 * \endenglish
1839 */
1841
1842 /**
1843 * @ingroup RobotManage
1844 * \chinese
1845 * 手动触发生成诊断文件
1846 *
1847 * @return 指令下发成功返回0; 失败返回错误码。 \n
1848 * -AUBO_BAD_STATE: 运行时(RuntimeMachine)的当前状态不是Stopped,
1849 * 固件升级请求被拒绝。AUBO_BAD_STATE的值是1。 \n
1850 * -AUBO_TIMEOUT: 超时。AUBO_TIMEOUT的值是4。 \n
1851 *
1852 * @throws arcs::common_interface::AuboException
1853 *
1854 * @par Python函数原型
1855 * generateDiagnoseFile(self: pyaubo_sdk.RobotManage, arg0: str) -> int
1856 *
1857 * @par Lua函数原型
1858 * generateDiagnoseFile(reason: string) -> nil
1859 *
1860 * @par Lua示例
1861 * generateDiagnoseFile("reason")
1862 *
1863 * @par JSON-RPC请求示例
1864 * {"jsonrpc":"2.0","method":"rob1.RobotManage.generateDiagnoseFile","params":["reason"],"id":1}
1865 *
1866 * @par JSON-RPC响应示例
1867 * {"id":1,"jsonrpc":"2.0","result":false}
1868 *
1869 * @par C++示例
1870 * @code
1871 * auto rpc_cli = std::make_shared<RpcClient>();
1872 * auto robot_name = rpc_cli->getRobotNames().front();
1873 * bool isEnabled =
1874 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->generateDiagnoseFile("reason");
1875 * @endcode
1876 * \endchinese
1877 * \english
1878 * Manually trigger the generation of a diagnostic file
1879 *
1880 * @return Returns 0 if the command is successfully issued; error code on
1881 * failure. \n -AUBO_BAD_STATE: The current state of the RuntimeMachine is
1882 * not Stopped, the firmware upgrade request is rejected. The value of
1883 * AUBO_BAD_STATE is 1. \n -AUBO_TIMEOUT: Timeout. The value of AUBO_TIMEOUT
1884 * is 4. \n
1885 *
1886 * @throws arcs::common_interface::AuboException
1887 *
1888 * @par Python function prototype
1889 * generateDiagnoseFile(self: pyaubo_sdk.RobotManage, arg0: str) -> int
1890 *
1891 * @par Lua function prototype
1892 * generateDiagnoseFile(reason: string) -> nil
1893 *
1894 * @par Lua example
1895 * generateDiagnoseFile("reason")
1896 *
1897 * @par JSON-RPC request example
1898 * {"jsonrpc":"2.0","method":"rob1.RobotManage.generateDiagnoseFile","params":["reason"],"id":1}
1899 *
1900 * @par JSON-RPC response example
1901 * {"id":1,"jsonrpc":"2.0","result":false}
1902 *
1903 * @par C++ example
1904 * @code
1905 * auto rpc_cli = std::make_shared<RpcClient>();
1906 * auto robot_name = rpc_cli->getRobotNames().front();
1907 * bool isEnabled =
1908 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->generateDiagnoseFile("reason");
1909 * @endcode
1910 * \endenglish
1911 */
1912 int generateDiagnoseFile(const std::string &reason);
1913
1914protected:
1915 void *d_;
1916};
1917using RobotManagePtr = std::shared_ptr<RobotManage>;
1918} // namespace common_interface
1919} // namespace arcs
1920
1921#endif // AUBO_SDK_ROBOT_CONTROL_INTERFACE_H
int setUnlockProtectiveStop()
Clear protective stop, including collision stop
int exitHandguideMode()
Exit hand-guiding mode
int startup()
Initiate robot startup request
int backdrive(bool enable)
Initiate robot backdrive request
int lockRobotBrake()
Initiate robot brake lock request
int handguideMode(const std::vector< int > &freeAxes, const std::vector< double > &feature)
Advanced hand-guiding mode
int stopRecord()
Stop real-time recording
int stopRecordCache()
Stop current real-time trajectory recording to memory cache
std::vector< double > getHandguideFeature()
Get the drag reference coordinate system
int poweroff()
Initiate robot power-off request
bool isHandguideEnabled()
Get the hand-guiding enable status
int setHandguideParams(const std::vector< int > &freeAxes, const std::vector< double > &feature)
Advanced hand-guiding mode
int startRecordCache(const std::string &name)
Start real-time trajectory recording to memory cache (no file output)
int generateDiagnoseFile(const std::string &reason)
Manually trigger the generation of a diagnostic file
int setOperationalMode(OperationalModeType mode)
Set the robot operational mode
int releaseRobotBrake()
Initiate robot brake release request
OperationalModeType getOperationalMode()
Get the robot operational mode
bool isBackdriveEnabled()
Whether the backdrive mode is enabled
RobotControlModeType getRobotControlMode()
Get the control mode
int setSim(bool enable)
Initiate robot enter/exit simulation mode request
int getHandguideTrigger()
Get the trigger source of the hand-guiding device
int freedrive(bool enable)
Initiate robot freedrive request This interface is deprecated after software version 0....
int poweron()
Initiate robot power-on request
int pauseRecordCache(bool pause)
Pause or resume current real-time trajectory recording to memory cache
bool isFreedriveEnabled()
Whether the freedrive mode is enabled
int getRecordCache(const std::string &name, size_t frames=0)
Get recorded data from the specified memory cache
int startRecord(const std::string &file_name)
Start real-time trajectory recording
bool isSimulationEnabled()
Whether the simulation mode is enabled
int pauseRecord(bool pause)
Pause real-time recording
int recordCacheFree(const std::string &name)
Free and clear recorded data of the specified memory cache
int getHandguideStatus()
Get the status of the hand-guiding device (whether it is in a singular space)
int restartInterfaceBoard()
Reset the safety interface board, usually called after the robot is powered off and needs to be reset...
int setLinkModeEnable(bool enable)
Initiate robot enter/exit link mode request.
std::vector< int > getHandguideFreeAxes()
Get Axes that can be moved
bool isLinkModeEnabled()
Whether the link mode is enabled.
std::shared_ptr< RobotManage > RobotManagePtr
RobotControlModeType
Robot Control Mode.
Definition type_def.h:588
OperationalModeType
Operational Mode.
Definition type_def.h:580
enum type definitions