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