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