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
523 * the TCP coordinate system
524 *
525 * @return Returns 0 on success; error code on failure
526 * AUBO_BUSY
527 * AUBO_BAD_STATE
528 * -AUBO_INVL_ARGUMENT
529 * -AUBO_BAD_STATE
530 *
531 * @throws arcs::common_interface::AuboException
532 * \endenglish
533 */
534 int setHandguideParams(const std::vector<int> &freeAxes,
535 const std::vector<double> &feature);
536
537
538 /**
539 * \chinese
540 * 获取拖动轴
541 * \endchinese
542 *
543 * \english
544 * Get Axes that can be moved
545 * \endenglish
546 */
547 std::vector<int> getHandguideFreeAxes();
548
549 /**
550 * \chinese
551 * 获取拖动参考坐标系
552 * \endchinese
553 *
554 * \english
555 * Get the drag reference coordinate system
556 * \endenglish
557 */
558 std::vector<double> getHandguideFeature();
559
560 /**
561 * \chinese
562 * 高阶拖动示教
563 *
564 * @param freeAxes 可以拖动的轴 0-不能拖动 1-可以拖动
565 * @param feature 如果维度为0,代表基于 TCP 坐标系拖动
566 *
567 * @return 成功返回0; 失败返回错误码
568 * AUBO_BUSY
569 * AUBO_BAD_STATE
570 * -AUBO_INVL_ARGUMENT
571 * -AUBO_BAD_STATE
572 *
573 * @throws arcs::common_interface::AuboException
574 * \endchinese
575 *
576 * \english
577 * Advanced hand-guiding mode
578 *
579 * @param freeAxes Axes that can be moved: 0-cannot move, 1-can move
580 * @param feature If the dimension is 0, it means hand-guiding based on the TCP coordinate system
581 *
582 * @return Returns 0 on success; error code on failure
583 * AUBO_BUSY
584 * AUBO_BAD_STATE
585 * -AUBO_INVL_ARGUMENT
586 * -AUBO_BAD_STATE
587 *
588 * @throws arcs::common_interface::AuboException
589 * \endenglish
590 */
591 int handguideMode(const std::vector<int> &freeAxes,
592 const std::vector<double> &feature);
593
594 /**
595 * \chinese
596 * 退出拖动示教
597 *
598 * @note 暂未实现
599 *
600 * @return 成功返回0; 失败返回错误码
601 * AUBO_BUSY
602 * AUBO_BAD_STATE
603 * -AUBO_BAD_STATE
604 *
605 * @throws arcs::common_interface::AuboException
606 * \endchinese
607 *
608 * \english
609 * Exit hand-guiding mode
610 *
611 * @note Not implemented yet
612 *
613 * @return Returns 0 on success; error code on failure
614 * AUBO_BUSY
615 * AUBO_BAD_STATE
616 * -AUBO_BAD_STATE
617 *
618 * @throws arcs::common_interface::AuboException
619 * \endenglish
620 */
622
623 /**
624 * \chinese
625 * 获取拖动示教器的状态(是否处于奇异空间)
626 *
627 * @note 暂未实现
628 *
629 * @return
630 * • 0 - 正常操作.
631 * • 1 - 接近奇异空间.
632 * • 2 - 极其接近奇异点,将产生较大的拖动阻尼.
633 *
634 * @throws arcs::common_interface::AuboException
635 * \endchinese
636 *
637 * \english
638 * Get the status of the hand-guiding device (whether it is in a singular space)
639 *
640 * @note Not implemented yet
641 *
642 * @return
643 * • 0 - Normal operation.
644 * • 1 - Approaching singular space.
645 * • 2 - Extremely close to a singularity, large hand-guiding damping will occur.
646 *
647 * @throws arcs::common_interface::AuboException
648 * \endenglish
649 */
651
652 /**
653 * \chinese
654 * 获取拖动示教器触发源
655 *
656 * @note 暂未实现
657 *
658 * @return
659 *
660 * @throws arcs::common_interface::AuboException
661 * \endchinese
662 *
663 * \english
664 * Get the trigger source of the hand-guiding device
665 *
666 * @note Not implemented yet
667 *
668 * @return
669 *
670 * @throws arcs::common_interface::AuboException
671 * \endenglish
672 */
674
675 /**
676 * \chinese
677 * 获取拖动示教使能状态
678 *
679 * @return 使能返回true; 失能返回false
680 *
681 * @throws arcs::common_interface::AuboException
682 *
683 * @par Lua函数原型
684 * isHandguideEnabled() -> boolean
685 *
686 * @par Lua示例
687 * Handguide = isHandguideEnabled()
688 *
689 * @par JSON-RPC请求示例
690 * {"jsonrpc":"2.0","method":"rob1.RobotManage.isHandguideEnabled","params":[],"id":1}
691 *
692 * @par JSON-RPC响应示例
693 * {"id":1,"jsonrpc":"2.0","result":false}
694 *
695 * \endchinese
696 * \english
697 * Get the hand-guiding enable status
698 *
699 * @return Returns true if enabled; false if disabled
700 *
701 * @throws arcs::common_interface::AuboException
702 *
703 * @par Lua function prototype
704 * isHandguideEnabled() -> boolean
705 *
706 * @par Lua example
707 * Handguide = isHandguideEnabled()
708 *
709 * @par JSON-RPC request example
710 * {"jsonrpc":"2.0","method":"rob1.RobotManage.isHandguideEnabled","params":[],"id":1}
711 *
712 * @par JSON-RPC response example
713 * {"id":1,"jsonrpc":"2.0","result":false}
714 *
715 * \endenglish
716 */
718
719 /**
720 * \chinese
721 * 发起机器人进入/退出仿真模式请求
722 *
723 * @param enable
724 *
725 * @return 成功返回0;失败返回错误码
726 * AUBO_BUSY
727 * AUBO_BAD_STATE
728 * -AUBO_INVL_ARGUMENT
729 * -AUBO_BAD_STATE
730 *
731 * @throws arcs::common_interface::AuboException
732 *
733 * @par Python函数原型
734 * setSim(self: pyaubo_sdk.RobotManage, arg0: bool) -> int
735 *
736 * @par Lua函数原型
737 * setSim(enable: boolean) -> number
738 *
739 * @par Lua示例
740 * num = setSim(true)
741 *
742 * @par JSON-RPC请求示例
743 * {"jsonrpc":"2.0","method":"rob1.RobotManage.setSim","params":[true],"id":1}
744 *
745 * @par JSON-RPC响应示例
746 * {"id":1,"jsonrpc":"2.0","result":0}
747 *
748 * @par C++示例
749 * @code
750 * auto rpc_cli = std::make_shared<RpcClient>();
751 * auto robot_name = rpc_cli->getRobotNames().front();
752 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->setSim(true);
753 * @endcode
754 * \endchinese
755 *
756 * \english
757 * Initiate robot enter/exit simulation mode request
758 *
759 * @param enable
760 *
761 * @return Returns 0 on success; error code on failure
762 * AUBO_BUSY
763 * AUBO_BAD_STATE
764 * -AUBO_INVL_ARGUMENT
765 * -AUBO_BAD_STATE
766 *
767 * @throws arcs::common_interface::AuboException
768 *
769 * @par Python function prototype
770 * setSim(self: pyaubo_sdk.RobotManage, arg0: bool) -> int
771 *
772 * @par Lua function prototype
773 * setSim(enable: boolean) -> number
774 *
775 * @par Lua example
776 * num = setSim(true)
777 *
778 * @par JSON-RPC request example
779 * {"jsonrpc":"2.0","method":"rob1.RobotManage.setSim","params":[true],"id":1}
780 *
781 * @par JSON-RPC response example
782 * {"id":1,"jsonrpc":"2.0","result":0}
783 *
784 * @par C++ example
785 * @code
786 * auto rpc_cli = std::make_shared<RpcClient>();
787 * auto robot_name = rpc_cli->getRobotNames().front();
788 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->setSim(true);
789 * @endcode
790 * \endenglish
791 */
792 int setSim(bool enable);
793
794 /**
795 * \chinese
796 * 设置机器人操作模式
797 *
798 * @param mode 操作模式
799 *
800 * @return 成功返回0; 失败返回错误码
801 * -AUBO_BAD_STATE
802 *
803 * @throws arcs::common_interface::AuboException
804 *
805 * @par Python函数原型
806 * setOperationalMode(self: pyaubo_sdk.RobotManage, arg0:
807 * arcs::common_interface::OperationalModeType) -> int
808 *
809 * @par Lua函数原型
810 * setOperationalMode(mode: number) -> number
811 *
812 * @par Lua示例
813 * num = setOperationalMode("Manual")
814 *
815 * @par JSON-RPC请求示例
816 * {"jsonrpc":"2.0","method":"rob1.RobotManage.setOperationalMode","params":["Manual"],"id":1}
817 *
818 * @par JSON-RPC响应示例
819 * {"id":1,"jsonrpc":"2.0","result":0}
820 *
821 * @par C++示例
822 * @code
823 * auto rpc_cli = std::make_shared<RpcClient>();
824 * auto robot_name = rpc_cli->getRobotNames().front();
825 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->setOperationalMode(OperationalModeType::Automatic);
826 * @endcode
827 * \endchinese
828 * \english
829 * Set the robot operational mode
830 *
831 * @param mode Operational mode
832 *
833 * @return Returns 0 on success; error code on failure
834 * -AUBO_BAD_STATE
835 *
836 * @throws arcs::common_interface::AuboException
837 *
838 * @par Python function prototype
839 * setOperationalMode(self: pyaubo_sdk.RobotManage, arg0:
840 * arcs::common_interface::OperationalModeType) -> int
841 *
842 * @par Lua function prototype
843 * setOperationalMode(mode: number) -> number
844 *
845 * @par Lua example
846 * num = setOperationalMode("Manual")
847 *
848 * @par JSON-RPC request example
849 * {"jsonrpc":"2.0","method":"rob1.RobotManage.setOperationalMode","params":["Manual"],"id":1}
850 *
851 * @par JSON-RPC response example
852 * {"id":1,"jsonrpc":"2.0","result":0}
853 *
854 * @par C++ example
855 * @code
856 * auto rpc_cli = std::make_shared<RpcClient>();
857 * auto robot_name = rpc_cli->getRobotNames().front();
858 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->setOperationalMode(OperationalModeType::Automatic);
859 * @endcode
860 * \endenglish
861 */
863
864 /**
865 * \chinese
866 * 获取机器人操作模式
867 *
868 * @return 机器人操作模式
869 *
870 * @throws arcs::common_interface::AuboException
871 *
872 * @par Python函数原型
873 * getOperationalMode(self: pyaubo_sdk.RobotManage) -> arcs::common_interface::OperationalModeType
874 *
875 * @par Lua函数原型
876 * getOperationalMode() -> number
877 *
878 * @par Lua示例
879 * num = getOperationalMode()
880 *
881 * @par JSON-RPC请求示例
882 * {"jsonrpc":"2.0","method":"rob1.RobotManage.getOperationalMode","params":[],"id":1}
883 *
884 * @par JSON-RPC响应示例
885 * {"id":1,"jsonrpc":"2.0","result":"Manual"}
886 *
887 * @par C++示例
888 * @code
889 * auto rpc_cli = std::make_shared<RpcClient>();
890 * auto robot_name = rpc_cli->getRobotNames().front();
891 * OperationalModeType mode =
892 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->getOperationalMode();
893 * @endcode
894 * \endchinese
895 * \english
896 * Get the robot operational mode
897 *
898 * @return Robot operational mode
899 *
900 * @throws arcs::common_interface::AuboException
901 *
902 * @par Python function prototype
903 * getOperationalMode(self: pyaubo_sdk.RobotManage) -> arcs::common_interface::OperationalModeType
904 *
905 * @par Lua function prototype
906 * getOperationalMode() -> number
907 *
908 * @par Lua example
909 * num = getOperationalMode()
910 *
911 * @par JSON-RPC request example
912 * {"jsonrpc":"2.0","method":"rob1.RobotManage.getOperationalMode","params":[],"id":1}
913 *
914 * @par JSON-RPC response example
915 * {"id":1,"jsonrpc":"2.0","result":"Manual"}
916 *
917 * @par C++ example
918 * @code
919 * auto rpc_cli = std::make_shared<RpcClient>();
920 * auto robot_name = rpc_cli->getRobotNames().front();
921 * OperationalModeType mode =
922 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->getOperationalMode();
923 * @endcode
924 * \endenglish
925 */
927
928 /**
929 * \chinese
930 * 获取控制模式
931 *
932 * @return 控制模式
933 *
934 * @throws arcs::common_interface::AuboException
935 *
936 * @par Python函数原型
937 * getRobotControlMode(self: pyaubo_sdk.RobotManage) -> arcs::common_interface::RobotControlModeType
938 *
939 * @par Lua函数原型
940 * getRobotControlMode() -> number
941 *
942 * @par Lua示例
943 * num = getRobotControlMode()
944 *
945 * @par JSON-RPC请求示例
946 * {"jsonrpc":"2.0","method":"rob1.RobotManage.getRobotControlMode","params":[],"id":1}
947 *
948 * @par JSON-RPC响应示例
949 * {"id":1,"jsonrpc":"2.0","result":"Position"}
950 *
951 * @par C++示例
952 * @code
953 * auto rpc_cli = std::make_shared<RpcClient>();
954 * auto robot_name = rpc_cli->getRobotNames().front();
955 * RobotControlModeType mode =
956 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->getRobotControlMode();
957 * @endcode
958 * \endchinese
959 * \english
960 * Get the control mode
961 *
962 * @return Control mode
963 *
964 * @throws arcs::common_interface::AuboException
965 *
966 * @par Python function prototype
967 * getRobotControlMode(self: pyaubo_sdk.RobotManage) -> arcs::common_interface::RobotControlModeType
968 *
969 * @par Lua function prototype
970 * getRobotControlMode() -> number
971 *
972 * @par Lua example
973 * num = getRobotControlMode()
974 *
975 * @par JSON-RPC request example
976 * {"jsonrpc":"2.0","method":"rob1.RobotManage.getRobotControlMode","params":[],"id":1}
977 *
978 * @par JSON-RPC response example
979 * {"id":1,"jsonrpc":"2.0","result":"Position"}
980 *
981 * @par C++ example
982 * @code
983 * auto rpc_cli = std::make_shared<RpcClient>();
984 * auto robot_name = rpc_cli->getRobotNames().front();
985 * RobotControlModeType mode =
986 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->getRobotControlMode();
987 * @endcode
988 * \endenglish
989 */
991
992 /**
993 * \chinese
994 * 是否使能了拖动示教模式
995 *
996 * @return 使能返回true; 反之返回false
997 *
998 * @throws arcs::common_interface::AuboException
999 *
1000 * @par Python函数原型
1001 * isFreedriveEnabled(self: pyaubo_sdk.RobotManage) -> bool
1002 *
1003 * @par Lua函数原型
1004 * isFreedriveEnabled() -> boolean
1005 *
1006 * @par Lua示例
1007 * FreedriveEnabled = isFreedriveEnabled()
1008 *
1009 * @par JSON-RPC请求示例
1010 * {"jsonrpc":"2.0","method":"rob1.RobotManage.isFreedriveEnabled","params":[],"id":1}
1011 *
1012 * @par JSON-RPC响应示例
1013 * {"id":1,"jsonrpc":"2.0","result":false}
1014 *
1015 * @par C++示例
1016 * @code
1017 * auto rpc_cli = std::make_shared<RpcClient>();
1018 * auto robot_name = rpc_cli->getRobotNames().front();
1019 * bool isEnabled =
1020 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->isFreedriveEnabled();
1021 * @endcode
1022 * \endchinese
1023 * \english
1024 * Whether the freedrive mode is enabled
1025 *
1026 * @return Returns true if enabled; otherwise returns false
1027 *
1028 * @throws arcs::common_interface::AuboException
1029 *
1030 * @par Python function prototype
1031 * isFreedriveEnabled(self: pyaubo_sdk.RobotManage) -> bool
1032 *
1033 * @par Lua function prototype
1034 * isFreedriveEnabled() -> boolean
1035 *
1036 * @par Lua example
1037 * FreedriveEnabled = isFreedriveEnabled()
1038 *
1039 * @par JSON-RPC request example
1040 * {"jsonrpc":"2.0","method":"rob1.RobotManage.isFreedriveEnabled","params":[],"id":1}
1041 *
1042 * @par JSON-RPC response example
1043 * {"id":1,"jsonrpc":"2.0","result":false}
1044 *
1045 * @par C++ example
1046 * @code
1047 * auto rpc_cli = std::make_shared<RpcClient>();
1048 * auto robot_name = rpc_cli->getRobotNames().front();
1049 * bool isEnabled =
1050 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->isFreedriveEnabled();
1051 * @endcode
1052 * \endenglish
1053 */
1055
1056 /**
1057 * \chinese
1058 * 是否使能了反向驱动模式
1059 *
1060 * @return 使能返回true; 反之返回false
1061 *
1062 * @throws arcs::common_interface::AuboException
1063 *
1064 * @par Python函数原型
1065 * isBackdriveEnabled(self: pyaubo_sdk.RobotManage) -> bool
1066 *
1067 * @par Lua函数原型
1068 * isBackdriveEnabled() -> boolean
1069 *
1070 * @par Lua示例
1071 * BackdriveEnabled = isBackdriveEnabled()
1072 *
1073 * @par JSON-RPC请求示例
1074 * {"jsonrpc":"2.0","method":"rob1.RobotManage.isBackdriveEnabled","params":[],"id":1}
1075 *
1076 * @par JSON-RPC响应示例
1077 * {"id":1,"jsonrpc":"2.0","result":false}
1078 *
1079 * @par C++示例
1080 * @code
1081 * auto rpc_cli = std::make_shared<RpcClient>();
1082 * auto robot_name = rpc_cli->getRobotNames().front();
1083 * bool isEnabled =
1084 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->isBackdriveEnabled();
1085 * @endcode
1086 * \endchinese
1087 * \english
1088 * Whether the backdrive mode is enabled
1089 *
1090 * @return Returns true if enabled; otherwise returns false
1091 *
1092 * @throws arcs::common_interface::AuboException
1093 *
1094 * @par Python function prototype
1095 * isBackdriveEnabled(self: pyaubo_sdk.RobotManage) -> bool
1096 *
1097 * @par Lua function prototype
1098 * isBackdriveEnabled() -> boolean
1099 *
1100 * @par Lua example
1101 * BackdriveEnabled = isBackdriveEnabled()
1102 *
1103 * @par JSON-RPC request example
1104 * {"jsonrpc":"2.0","method":"rob1.RobotManage.isBackdriveEnabled","params":[],"id":1}
1105 *
1106 * @par JSON-RPC response example
1107 * {"id":1,"jsonrpc":"2.0","result":false}
1108 *
1109 * @par C++ example
1110 * @code
1111 * auto rpc_cli = std::make_shared<RpcClient>();
1112 * auto robot_name = rpc_cli->getRobotNames().front();
1113 * bool isEnabled =
1114 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->isBackdriveEnabled();
1115 * @endcode
1116 * \endenglish
1117 */
1119
1120 /**
1121 * \chinese
1122 * 是否使能了仿真模式
1123 *
1124 * @return 使能返回true; 反之返回false
1125 *
1126 * @throws arcs::common_interface::AuboException
1127 *
1128 * @par Python函数原型
1129 * isSimulationEnabled(self: pyaubo_sdk.RobotManage) -> bool
1130 *
1131 * @par Lua函数原型
1132 * isSimulationEnabled() -> boolean
1133 *
1134 * @par Lua示例
1135 * SimulationEnabled = isSimulationEnabled()
1136 *
1137 * @par JSON-RPC请求示例
1138 * {"jsonrpc":"2.0","method":"rob1.RobotManage.isSimulationEnabled","params":[],"id":1}
1139 *
1140 * @par JSON-RPC响应示例
1141 * {"id":1,"jsonrpc":"2.0","result":true}
1142 *
1143 * @par C++示例
1144 * @code
1145 * auto rpc_cli = std::make_shared<RpcClient>();
1146 * auto robot_name = rpc_cli->getRobotNames().front();
1147 * bool isEnabled =
1148 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->isSimulationEnabled();
1149 * @endcode
1150 * \endchinese
1151 * \english
1152 * Whether the simulation mode is enabled
1153 *
1154 * @return Returns true if enabled; otherwise returns false
1155 *
1156 * @throws arcs::common_interface::AuboException
1157 *
1158 * @par Python function prototype
1159 * isSimulationEnabled(self: pyaubo_sdk.RobotManage) -> bool
1160 *
1161 * @par Lua function prototype
1162 * isSimulationEnabled() -> boolean
1163 *
1164 * @par Lua example
1165 * SimulationEnabled = isSimulationEnabled()
1166 *
1167 * @par JSON-RPC request example
1168 * {"jsonrpc":"2.0","method":"rob1.RobotManage.isSimulationEnabled","params":[],"id":1}
1169 *
1170 * @par JSON-RPC response example
1171 * {"id":1,"jsonrpc":"2.0","result":true}
1172 *
1173 * @par C++ example
1174 * @code
1175 * auto rpc_cli = std::make_shared<RpcClient>();
1176 * auto robot_name = rpc_cli->getRobotNames().front();
1177 * bool isEnabled =
1178 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->isSimulationEnabled();
1179 * @endcode
1180 * \endenglish
1181 */
1183
1184 /**
1185 * \chinese
1186 * 清除防护停机,包括碰撞停机
1187 *
1188 * @return 成功返回0;失败返回错误码
1189 * AUBO_BUSY
1190 * AUBO_BAD_STATE
1191 * -AUBO_BAD_STATE
1192 *
1193 * @throws arcs::common_interface::AuboException
1194 *
1195 * @par Python函数原型
1196 * setUnlockProtectiveStop(self: pyaubo_sdk.RobotManage) -> int
1197 *
1198 * @par Lua函数原型
1199 * setUnlockProtectiveStop() -> number
1200 *
1201 * @par Lua示例
1202 * num = setUnlockProtectiveStop()
1203 *
1204 * @par JSON-RPC请求示例
1205 * {"jsonrpc":"2.0","method":"rob1.RobotManage.setUnlockProtectiveStop","params":[],"id":1}
1206 *
1207 * @par JSON-RPC响应示例
1208 * {"id":1,"jsonrpc":"2.0","result":0}
1209 *
1210 * @par C++示例
1211 * @code
1212 * auto rpc_cli = std::make_shared<RpcClient>();
1213 * auto robot_name = rpc_cli->getRobotNames().front();
1214 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->setUnlockProtectiveStop();
1215 * @endcode
1216 * \endchinese
1217 * \english
1218 * Clear protective stop, including collision stop
1219 *
1220 * @return Returns 0 on success; error code on failure
1221 * AUBO_BUSY
1222 * AUBO_BAD_STATE
1223 * -AUBO_BAD_STATE
1224 *
1225 * @throws arcs::common_interface::AuboException
1226 *
1227 * @par Python function prototype
1228 * setUnlockProtectiveStop(self: pyaubo_sdk.RobotManage) -> int
1229 *
1230 * @par Lua function prototype
1231 * setUnlockProtectiveStop() -> number
1232 *
1233 * @par Lua example
1234 * num = setUnlockProtectiveStop()
1235 *
1236 * @par JSON-RPC request example
1237 * {"jsonrpc":"2.0","method":"rob1.RobotManage.setUnlockProtectiveStop","params":[],"id":1}
1238 *
1239 * @par JSON-RPC response example
1240 * {"id":1,"jsonrpc":"2.0","result":0}
1241 *
1242 * @par C++ example
1243 * @code
1244 * auto rpc_cli = std::make_shared<RpcClient>();
1245 * auto robot_name = rpc_cli->getRobotNames().front();
1246 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->setUnlockProtectiveStop();
1247 * @endcode
1248 * \endenglish
1249 */
1251
1252 /**
1253 * \chinese
1254 * 重置安全接口板,一般在机器人断电之后需要重置时调用,比如机器人急停、故障等之后
1255 *
1256 * @return 成功返回0; 失败返回错误码
1257 * AUBO_BUSY
1258 * AUBO_BAD_STATE
1259 * -AUBO_BAD_STATE
1260 *
1261 * @throws arcs::common_interface::AuboException
1262 *
1263 * @par Python函数原型
1264 * restartInterfaceBoard(self: pyaubo_sdk.RobotManage) -> int
1265 *
1266 * @par Lua函数原型
1267 * restartInterfaceBoard() -> number
1268 *
1269 * @par Lua示例
1270 * num = restartInterfaceBoard()
1271 *
1272 * @par JSON-RPC请求示例
1273 * {"jsonrpc":"2.0","method":"rob1.RobotManage.restartInterfaceBoard","params":[],"id":1}
1274 *
1275 * @par JSON-RPC响应示例
1276 * {"id":1,"jsonrpc":"2.0","result":0}
1277 *
1278 * @par C++示例
1279 * @code
1280 * auto rpc_cli = std::make_shared<RpcClient>();
1281 * auto robot_name = rpc_cli->getRobotNames().front();
1282 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->restartInterfaceBoard();
1283 * @endcode
1284 * \endchinese
1285 * \english
1286 * 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.
1287 *
1288 * @return Returns 0 on success; error code on failure
1289 * AUBO_BUSY
1290 * AUBO_BAD_STATE
1291 * -AUBO_BAD_STATE
1292 *
1293 * @throws arcs::common_interface::AuboException
1294 *
1295 * @par Python function prototype
1296 * restartInterfaceBoard(self: pyaubo_sdk.RobotManage) -> int
1297 *
1298 * @par Lua function prototype
1299 * restartInterfaceBoard() -> number
1300 *
1301 * @par Lua example
1302 * num = restartInterfaceBoard()
1303 *
1304 * @par JSON-RPC request example
1305 * {"jsonrpc":"2.0","method":"rob1.RobotManage.restartInterfaceBoard","params":[],"id":1}
1306 *
1307 * @par JSON-RPC response example
1308 * {"id":1,"jsonrpc":"2.0","result":0}
1309 *
1310 * @par C++ example
1311 * @code
1312 * auto rpc_cli = std::make_shared<RpcClient>();
1313 * auto robot_name = rpc_cli->getRobotNames().front();
1314 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->restartInterfaceBoard();
1315 * @endcode
1316 * \endenglish
1317 */
1319
1320 /**
1321 * \chinese
1322 * 开始实时轨迹的记录
1323 *
1324 * @param file_name
1325 *
1326 * @return 成功返回0;失败返回错误码
1327 * AUBO_BUSY
1328 * AUBO_BAD_STATE
1329 * -AUBO_INVL_ARGUMENT
1330 * -AUBO_BAD_STATE
1331 *
1332 * @throws arcs::common_interface::AuboException
1333 *
1334 * @par Lua函数原型
1335 * startRecord(fiel_name: string) -> nil
1336 *
1337 * @par Lua示例
1338 * startRecord("traje.csv")
1339 *
1340 * \endchinese
1341 * \english
1342 * Start real-time trajectory recording
1343 *
1344 * @param file_name
1345 *
1346 * @return Returns 0 on success; error code on failure
1347 * AUBO_BUSY
1348 * AUBO_BAD_STATE
1349 * -AUBO_INVL_ARGUMENT
1350 * -AUBO_BAD_STATE
1351 *
1352 * @throws arcs::common_interface::AuboException
1353 *
1354 * @par Lua function prototype
1355 * startRecord(fiel_name: string) -> nil
1356 *
1357 * @par Lua example
1358 * startRecord("traje.csv")
1359 *
1360 * \endenglish
1361 */
1362 int startRecord(const std::string &file_name);
1363
1364 /**
1365 * \chinese
1366 * 停止实时记录
1367 *
1368 * @return 成功返回0;失败返回错误码
1369 * AUBO_BUSY
1370 * AUBO_BAD_STATE
1371 * -AUBO_BAD_STATE
1372 *
1373 * @throws arcs::common_interface::AuboException
1374 *
1375 * @par Lua函数原型
1376 * stopRecord() -> nil
1377 *
1378 * @par Lua示例
1379 * stopRecord()
1380 *
1381 * @par JSON-RPC请求示例
1382 * {"jsonrpc":"2.0","method":"rob1.RobotManage.stopRecord","params":[],"id":1}
1383 *
1384 * @par JSON-RPC响应示例
1385 * {"id":1,"jsonrpc":"2.0","result":0}
1386 *
1387 * \endchinese
1388 * \english
1389 * Stop real-time recording
1390 *
1391 * @return Returns 0 on success; error code on failure
1392 * AUBO_BUSY
1393 * AUBO_BAD_STATE
1394 * -AUBO_BAD_STATE
1395 *
1396 * @throws arcs::common_interface::AuboException
1397 *
1398 * @par Lua function prototype
1399 * stopRecord() -> nil
1400 *
1401 * @par Lua example
1402 * stopRecord()
1403 *
1404 * @par JSON-RPC request example
1405 * {"jsonrpc":"2.0","method":"rob1.RobotManage.stopRecord","params":[],"id":1}
1406 *
1407 * @par JSON-RPC response example
1408 * {"id":1,"jsonrpc":"2.0","result":0}
1409 *
1410 * \endenglish
1411 */
1413
1414 /**
1415 * \chinese
1416 * 暂停实时记录
1417 *
1418 * @param pause
1419 *
1420 * @return 成功返回0;失败返回错误码
1421 * AUBO_BUSY
1422 * AUBO_BAD_STATE
1423 * -AUBO_BAD_STATE
1424 *
1425 * @throws arcs::common_interface::AuboException
1426 *
1427 * @par JSON-RPC请求示例
1428 * {"jsonrpc":"2.0","method":"rob1.RobotManage.pauseRecord","params":[true],"id":1}
1429 *
1430 * @par JSON-RPC响应示例
1431 * {"id":1,"jsonrpc":"2.0","result":0}
1432 *
1433 * \endchinese
1434 * \english
1435 * Pause real-time recording
1436 *
1437 * @param pause
1438 *
1439 * @return Returns 0 on success; error code on failure
1440 * AUBO_BUSY
1441 * AUBO_BAD_STATE
1442 * -AUBO_BAD_STATE
1443 *
1444 * @throws arcs::common_interface::AuboException
1445 *
1446 * @par JSON-RPC request example
1447 * {"jsonrpc":"2.0","method":"rob1.RobotManage.pauseRecord","params":[true],"id":1}
1448 *
1449 * @par JSON-RPC response example
1450 * {"id":1,"jsonrpc":"2.0","result":0}
1451 *
1452 * \endenglish
1453 */
1454 int pauseRecord(bool pause);
1455
1456 /**
1457 * \chinese
1458 * 发起机器人进入/退出联动模式请求,
1459 * 只有操作模式为自动或者无时,才能使能联动模式
1460 *
1461 * @param enable
1462 *
1463 * @return 成功返回0; 失败返回错误码
1464 * AUBO_BUSY
1465 * AUBO_REQUEST_IGNORE
1466 * -AUBO_BAD_STATE
1467 *
1468 * @throws arcs::common_interface::AuboException
1469 *
1470 * @par Python函数原型
1471 * setLinkModeEnable(self: pyaubo_sdk.RobotManage, arg0: bool) -> int
1472 *
1473 * @par Lua函数原型
1474 * setLinkModeEnable(enable: boolean) -> number
1475 *
1476 * @par Lua示例
1477 * num = setLinkModeEnable(true)
1478 *
1479 * @par JSON-RPC请求示例
1480 * {"jsonrpc":"2.0","method":"rob1.RobotManage.setLinkModeEnable","params":[true],"id":1}
1481 *
1482 * @par JSON-RPC响应示例
1483 * {"id":1,"jsonrpc":"2.0","result":0}
1484 *
1485 * @par C++示例
1486 * @code
1487 * auto rpc_cli = std::make_shared<RpcClient>();
1488 * auto robot_name = rpc_cli->getRobotNames().front();
1489 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->setLinkModeEnable(true);
1490 * @endcode
1491 * \endchinese
1492 * \english
1493 * Initiate robot enter/exit link mode request.
1494 * Link mode can only be enabled when the operation mode is Automatic or None.
1495 *
1496 * @param enable
1497 *
1498 * @return Returns 0 on success; error code on failure
1499 * AUBO_BUSY
1500 * AUBO_REQUEST_IGNORE
1501 * -AUBO_BAD_STATE
1502 *
1503 * @throws arcs::common_interface::AuboException
1504 *
1505 * @par Python function prototype
1506 * setLinkModeEnable(self: pyaubo_sdk.RobotManage, arg0: bool) -> int
1507 *
1508 * @par Lua function prototype
1509 * setLinkModeEnable(enable: boolean) -> number
1510 *
1511 * @par Lua example
1512 * num = setLinkModeEnable(true)
1513 *
1514 * @par JSON-RPC request example
1515 * {"jsonrpc":"2.0","method":"rob1.RobotManage.setLinkModeEnable","params":[true],"id":1}
1516 *
1517 * @par JSON-RPC response example
1518 * {"id":1,"jsonrpc":"2.0","result":0}
1519 *
1520 * @par C++ example
1521 * @code
1522 * auto rpc_cli = std::make_shared<RpcClient>();
1523 * auto robot_name = rpc_cli->getRobotNames().front();
1524 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->setLinkModeEnable(true);
1525 * @endcode
1526 * \endenglish
1527 */
1528 int setLinkModeEnable(bool enable);
1529
1530 /**
1531 * \chinese
1532 * 是否使能了联动模式,联动模式下用户可以通过外部IO控制机器人(用户可以对IO的功能进行配置)
1533 *
1534 * @return 使能返回true; 反之返回false
1535 *
1536 * @throws arcs::common_interface::AuboException
1537 *
1538 * @par Python函数原型
1539 * isLinkModeEnabled(self: pyaubo_sdk.RobotManage) -> bool
1540 *
1541 * @par Lua函数原型
1542 * isLinkModeEnabled() -> boolean
1543 *
1544 * @par Lua示例
1545 * LinkModeEnabled = isLinkModeEnabled()
1546 *
1547 * @par JSON-RPC请求示例
1548 * {"jsonrpc":"2.0","method":"rob1.RobotManage.isLinkModeEnabled","params":[],"id":1}
1549 *
1550 * @par JSON-RPC响应示例
1551 * {"id":1,"jsonrpc":"2.0","result":false}
1552 *
1553 * @par C++示例
1554 * @code
1555 * auto rpc_cli = std::make_shared<RpcClient>();
1556 * auto robot_name = rpc_cli->getRobotNames().front();
1557 * bool isEnabled =
1558 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->isLinkModeEnabled();
1559 * @endcode
1560 * \endchinese
1561 * \english
1562 * Whether the link mode is enabled. In link mode, users can control the robot via external IO (users can configure the IO functions).
1563 *
1564 * @return Returns true if enabled; otherwise returns false
1565 *
1566 * @throws arcs::common_interface::AuboException
1567 *
1568 * @par Python function prototype
1569 * isLinkModeEnabled(self: pyaubo_sdk.RobotManage) -> bool
1570 *
1571 * @par Lua function prototype
1572 * isLinkModeEnabled() -> boolean
1573 *
1574 * @par Lua example
1575 * LinkModeEnabled = isLinkModeEnabled()
1576 *
1577 * @par JSON-RPC request example
1578 * {"jsonrpc":"2.0","method":"rob1.RobotManage.isLinkModeEnabled","params":[],"id":1}
1579 *
1580 * @par JSON-RPC response example
1581 * {"id":1,"jsonrpc":"2.0","result":false}
1582 *
1583 * @par C++ example
1584 * @code
1585 * auto rpc_cli = std::make_shared<RpcClient>();
1586 * auto robot_name = rpc_cli->getRobotNames().front();
1587 * bool isEnabled =
1588 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->isLinkModeEnabled();
1589 * @endcode
1590 * \endenglish
1591 */
1593
1594 /**
1595 * \chinese
1596 * 手动触发生成诊断文件
1597 *
1598 * @return 指令下发成功返回0; 失败返回错误码。 \n
1599 * -AUBO_BAD_STATE: 运行时(RuntimeMachine)的当前状态不是Stopped,
1600 * 固件升级请求被拒绝。AUBO_BAD_STATE的值是1。 \n
1601 * -AUBO_TIMEOUT: 超时。AUBO_TIMEOUT的值是4。 \n
1602 *
1603 * @throws arcs::common_interface::AuboException
1604 *
1605 * @par Python函数原型
1606 * generateDiagnoseFile(self: pyaubo_sdk.RobotManage, arg0: str) -> int
1607 *
1608 * @par Lua函数原型
1609 * generateDiagnoseFile(reason: string) -> nil
1610 *
1611 * @par Lua示例
1612 * generateDiagnoseFile("reason")
1613 *
1614 * @par JSON-RPC请求示例
1615 * {"jsonrpc":"2.0","method":"rob1.RobotManage.generateDiagnoseFile","params":["reason"],"id":1}
1616 *
1617 * @par JSON-RPC响应示例
1618 * {"id":1,"jsonrpc":"2.0","result":false}
1619 *
1620 * @par C++示例
1621 * @code
1622 * auto rpc_cli = std::make_shared<RpcClient>();
1623 * auto robot_name = rpc_cli->getRobotNames().front();
1624 * bool isEnabled =
1625 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->generateDiagnoseFile("reason");
1626 * @endcode
1627 * \endchinese
1628 * \english
1629 * Manually trigger the generation of a diagnostic file
1630 *
1631 * @return Returns 0 if the command is successfully issued; error code on failure. \n
1632 * -AUBO_BAD_STATE: The current state of the RuntimeMachine is not Stopped,
1633 * the firmware upgrade request is rejected. The value of AUBO_BAD_STATE is 1. \n
1634 * -AUBO_TIMEOUT: Timeout. The value of AUBO_TIMEOUT is 4. \n
1635 *
1636 * @throws arcs::common_interface::AuboException
1637 *
1638 * @par Python function prototype
1639 * generateDiagnoseFile(self: pyaubo_sdk.RobotManage, arg0: str) -> int
1640 *
1641 * @par Lua function prototype
1642 * generateDiagnoseFile(reason: string) -> nil
1643 *
1644 * @par Lua example
1645 * generateDiagnoseFile("reason")
1646 *
1647 * @par JSON-RPC request example
1648 * {"jsonrpc":"2.0","method":"rob1.RobotManage.generateDiagnoseFile","params":["reason"],"id":1}
1649 *
1650 * @par JSON-RPC response example
1651 * {"id":1,"jsonrpc":"2.0","result":false}
1652 *
1653 * @par C++ example
1654 * @code
1655 * auto rpc_cli = std::make_shared<RpcClient>();
1656 * auto robot_name = rpc_cli->getRobotNames().front();
1657 * bool isEnabled =
1658 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->generateDiagnoseFile("reason");
1659 * @endcode
1660 * \endenglish
1661 */
1662 int generateDiagnoseFile(const std::string &reason);
1663
1664protected:
1665 void *d_;
1666};
1667using RobotManagePtr = std::shared_ptr<RobotManage>;
1668} // namespace common_interface
1669} // namespace arcs
1670
1671#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()
停止实时记录
std::vector< double > getHandguideFeature()
获取拖动参考坐标系
int poweroff()
发起机器人断电请求
bool isHandguideEnabled()
获取拖动示教使能状态
int setHandguideParams(const std::vector< int > &freeAxes, const std::vector< double > &feature)
设置拖动示教参数
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)
发起机器人进入/退出联动模式请求, 只有操作模式为自动或者无时,才能使能联动模式
std::vector< int > getHandguideFreeAxes()
获取拖动轴
bool isLinkModeEnabled()
是否使能了联动模式,联动模式下用户可以通过外部IO控制机器人(用户可以对IO的功能进行配置)
RobotControlModeType
机器人控制模式
Definition type_def.h:572
std::shared_ptr< RobotManage > RobotManagePtr
OperationalModeType
操作模式
Definition type_def.h:564
数据类型的定义