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
465 * handguideMode instead: 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 * \chinese
539 * 获取拖动轴
540 * \endchinese
541 *
542 * \english
543 * Get Axes that can be moved
544 * \endenglish
545 */
546 std::vector<int> getHandguideFreeAxes();
547
548 /**
549 * \chinese
550 * 获取拖动参考坐标系
551 * \endchinese
552 *
553 * \english
554 * Get the drag reference coordinate system
555 * \endenglish
556 */
557 std::vector<double> getHandguideFeature();
558
559 /**
560 * \chinese
561 * 高阶拖动示教
562 *
563 * @param freeAxes 可以拖动的轴 0-不能拖动 1-可以拖动
564 * @param feature 如果维度为0,代表基于 TCP 坐标系拖动
565 *
566 * @return 成功返回0; 失败返回错误码
567 * AUBO_BUSY
568 * AUBO_BAD_STATE
569 * -AUBO_INVL_ARGUMENT
570 * -AUBO_BAD_STATE
571 *
572 * @throws arcs::common_interface::AuboException
573 * \endchinese
574 *
575 * \english
576 * Advanced hand-guiding mode
577 *
578 * @param freeAxes Axes that can be moved: 0-cannot move, 1-can move
579 * @param feature If the dimension is 0, it means hand-guiding based on the
580 * 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 需 0.31.x 及以后软件版本
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 Requires software version 0.31.x or later
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
639 * space)
640 *
641 * @note Not implemented yet
642 *
643 * @return
644 * • 0 - Normal operation.
645 * • 1 - Approaching singular space.
646 * • 2 - Extremely close to a singularity, large hand-guiding damping will
647 * occur.
648 *
649 * @throws arcs::common_interface::AuboException
650 * \endenglish
651 */
653
654 /**
655 * \chinese
656 * 获取拖动示教器触发源
657 *
658 * @note 暂未实现
659 *
660 * @return
661 *
662 * @throws arcs::common_interface::AuboException
663 * \endchinese
664 *
665 * \english
666 * Get the trigger source of the hand-guiding device
667 *
668 * @note Not implemented yet
669 *
670 * @return
671 *
672 * @throws arcs::common_interface::AuboException
673 * \endenglish
674 */
676
677 /**
678 * \chinese
679 * 获取拖动示教使能状态
680 *
681 * @return 使能返回true; 失能返回false
682 *
683 * @throws arcs::common_interface::AuboException
684 *
685 * @par Lua函数原型
686 * isHandguideEnabled() -> boolean
687 *
688 * @par Lua示例
689 * Handguide = isHandguideEnabled()
690 *
691 * @par JSON-RPC请求示例
692 * {"jsonrpc":"2.0","method":"rob1.RobotManage.isHandguideEnabled","params":[],"id":1}
693 *
694 * @par JSON-RPC响应示例
695 * {"id":1,"jsonrpc":"2.0","result":false}
696 *
697 * \endchinese
698 * \english
699 * Get the hand-guiding enable status
700 *
701 * @return Returns true if enabled; false if disabled
702 *
703 * @throws arcs::common_interface::AuboException
704 *
705 * @par Lua function prototype
706 * isHandguideEnabled() -> boolean
707 *
708 * @par Lua example
709 * Handguide = isHandguideEnabled()
710 *
711 * @par JSON-RPC request example
712 * {"jsonrpc":"2.0","method":"rob1.RobotManage.isHandguideEnabled","params":[],"id":1}
713 *
714 * @par JSON-RPC response example
715 * {"id":1,"jsonrpc":"2.0","result":false}
716 *
717 * \endenglish
718 */
720
721 /**
722 * \chinese
723 * 发起机器人进入/退出仿真模式请求
724 *
725 * @param enable
726 *
727 * @return 成功返回0;失败返回错误码
728 * AUBO_BUSY
729 * AUBO_BAD_STATE
730 * -AUBO_INVL_ARGUMENT
731 * -AUBO_BAD_STATE
732 *
733 * @throws arcs::common_interface::AuboException
734 *
735 * @par Python函数原型
736 * setSim(self: pyaubo_sdk.RobotManage, arg0: bool) -> int
737 *
738 * @par Lua函数原型
739 * setSim(enable: boolean) -> number
740 *
741 * @par Lua示例
742 * num = setSim(true)
743 *
744 * @par JSON-RPC请求示例
745 * {"jsonrpc":"2.0","method":"rob1.RobotManage.setSim","params":[true],"id":1}
746 *
747 * @par JSON-RPC响应示例
748 * {"id":1,"jsonrpc":"2.0","result":0}
749 *
750 * @par C++示例
751 * @code
752 * auto rpc_cli = std::make_shared<RpcClient>();
753 * auto robot_name = rpc_cli->getRobotNames().front();
754 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->setSim(true);
755 * @endcode
756 * \endchinese
757 *
758 * \english
759 * Initiate robot enter/exit simulation mode request
760 *
761 * @param enable
762 *
763 * @return Returns 0 on success; error code on failure
764 * AUBO_BUSY
765 * AUBO_BAD_STATE
766 * -AUBO_INVL_ARGUMENT
767 * -AUBO_BAD_STATE
768 *
769 * @throws arcs::common_interface::AuboException
770 *
771 * @par Python function prototype
772 * setSim(self: pyaubo_sdk.RobotManage, arg0: bool) -> int
773 *
774 * @par Lua function prototype
775 * setSim(enable: boolean) -> number
776 *
777 * @par Lua example
778 * num = setSim(true)
779 *
780 * @par JSON-RPC request example
781 * {"jsonrpc":"2.0","method":"rob1.RobotManage.setSim","params":[true],"id":1}
782 *
783 * @par JSON-RPC response example
784 * {"id":1,"jsonrpc":"2.0","result":0}
785 *
786 * @par C++ example
787 * @code
788 * auto rpc_cli = std::make_shared<RpcClient>();
789 * auto robot_name = rpc_cli->getRobotNames().front();
790 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->setSim(true);
791 * @endcode
792 * \endenglish
793 */
794 int setSim(bool enable);
795
796 /**
797 * \chinese
798 * 设置机器人操作模式
799 *
800 * @param mode 操作模式
801 *
802 * @return 成功返回0; 失败返回错误码
803 * -AUBO_BAD_STATE
804 *
805 * @throws arcs::common_interface::AuboException
806 *
807 * @par Python函数原型
808 * setOperationalMode(self: pyaubo_sdk.RobotManage, arg0:
809 * arcs::common_interface::OperationalModeType) -> int
810 *
811 * @par Lua函数原型
812 * setOperationalMode(mode: number) -> number
813 *
814 * @par Lua示例
815 * num = setOperationalMode("Manual")
816 *
817 * @par JSON-RPC请求示例
818 * {"jsonrpc":"2.0","method":"rob1.RobotManage.setOperationalMode","params":["Manual"],"id":1}
819 *
820 * @par JSON-RPC响应示例
821 * {"id":1,"jsonrpc":"2.0","result":0}
822 *
823 * @par C++示例
824 * @code
825 * auto rpc_cli = std::make_shared<RpcClient>();
826 * auto robot_name = rpc_cli->getRobotNames().front();
827 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->setOperationalMode(OperationalModeType::Automatic);
828 * @endcode
829 * \endchinese
830 * \english
831 * Set the robot operational mode
832 *
833 * @param mode Operational mode
834 *
835 * @return Returns 0 on success; error code on failure
836 * -AUBO_BAD_STATE
837 *
838 * @throws arcs::common_interface::AuboException
839 *
840 * @par Python function prototype
841 * setOperationalMode(self: pyaubo_sdk.RobotManage, arg0:
842 * arcs::common_interface::OperationalModeType) -> int
843 *
844 * @par Lua function prototype
845 * setOperationalMode(mode: number) -> number
846 *
847 * @par Lua example
848 * num = setOperationalMode("Manual")
849 *
850 * @par JSON-RPC request example
851 * {"jsonrpc":"2.0","method":"rob1.RobotManage.setOperationalMode","params":["Manual"],"id":1}
852 *
853 * @par JSON-RPC response example
854 * {"id":1,"jsonrpc":"2.0","result":0}
855 *
856 * @par C++ example
857 * @code
858 * auto rpc_cli = std::make_shared<RpcClient>();
859 * auto robot_name = rpc_cli->getRobotNames().front();
860 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->setOperationalMode(OperationalModeType::Automatic);
861 * @endcode
862 * \endenglish
863 */
865
866 /**
867 * \chinese
868 * 获取机器人操作模式
869 *
870 * @return 机器人操作模式
871 *
872 * @throws arcs::common_interface::AuboException
873 *
874 * @par Python函数原型
875 * getOperationalMode(self: pyaubo_sdk.RobotManage) ->
876 * arcs::common_interface::OperationalModeType
877 *
878 * @par Lua函数原型
879 * getOperationalMode() -> number
880 *
881 * @par Lua示例
882 * num = getOperationalMode()
883 *
884 * @par JSON-RPC请求示例
885 * {"jsonrpc":"2.0","method":"rob1.RobotManage.getOperationalMode","params":[],"id":1}
886 *
887 * @par JSON-RPC响应示例
888 * {"id":1,"jsonrpc":"2.0","result":"Manual"}
889 *
890 * @par C++示例
891 * @code
892 * auto rpc_cli = std::make_shared<RpcClient>();
893 * auto robot_name = rpc_cli->getRobotNames().front();
894 * OperationalModeType mode =
895 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->getOperationalMode();
896 * @endcode
897 * \endchinese
898 * \english
899 * Get the robot operational mode
900 *
901 * @return Robot operational mode
902 *
903 * @throws arcs::common_interface::AuboException
904 *
905 * @par Python function prototype
906 * getOperationalMode(self: pyaubo_sdk.RobotManage) ->
907 * arcs::common_interface::OperationalModeType
908 *
909 * @par Lua function prototype
910 * getOperationalMode() -> number
911 *
912 * @par Lua example
913 * num = getOperationalMode()
914 *
915 * @par JSON-RPC request example
916 * {"jsonrpc":"2.0","method":"rob1.RobotManage.getOperationalMode","params":[],"id":1}
917 *
918 * @par JSON-RPC response example
919 * {"id":1,"jsonrpc":"2.0","result":"Manual"}
920 *
921 * @par C++ example
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 * \endenglish
929 */
931
932 /**
933 * \chinese
934 * 获取控制模式
935 *
936 * @return 控制模式
937 *
938 * @throws arcs::common_interface::AuboException
939 *
940 * @par Python函数原型
941 * getRobotControlMode(self: pyaubo_sdk.RobotManage) ->
942 * arcs::common_interface::RobotControlModeType
943 *
944 * @par Lua函数原型
945 * getRobotControlMode() -> number
946 *
947 * @par Lua示例
948 * num = getRobotControlMode()
949 *
950 * @par JSON-RPC请求示例
951 * {"jsonrpc":"2.0","method":"rob1.RobotManage.getRobotControlMode","params":[],"id":1}
952 *
953 * @par JSON-RPC响应示例
954 * {"id":1,"jsonrpc":"2.0","result":"Position"}
955 *
956 * @par C++示例
957 * @code
958 * auto rpc_cli = std::make_shared<RpcClient>();
959 * auto robot_name = rpc_cli->getRobotNames().front();
960 * RobotControlModeType mode =
961 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->getRobotControlMode();
962 * @endcode
963 * \endchinese
964 * \english
965 * Get the control mode
966 *
967 * @return Control mode
968 *
969 * @throws arcs::common_interface::AuboException
970 *
971 * @par Python function prototype
972 * getRobotControlMode(self: pyaubo_sdk.RobotManage) ->
973 * arcs::common_interface::RobotControlModeType
974 *
975 * @par Lua function prototype
976 * getRobotControlMode() -> number
977 *
978 * @par Lua example
979 * num = getRobotControlMode()
980 *
981 * @par JSON-RPC request example
982 * {"jsonrpc":"2.0","method":"rob1.RobotManage.getRobotControlMode","params":[],"id":1}
983 *
984 * @par JSON-RPC response example
985 * {"id":1,"jsonrpc":"2.0","result":"Position"}
986 *
987 * @par C++ example
988 * @code
989 * auto rpc_cli = std::make_shared<RpcClient>();
990 * auto robot_name = rpc_cli->getRobotNames().front();
991 * RobotControlModeType mode =
992 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->getRobotControlMode();
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 * isFreedriveEnabled(self: pyaubo_sdk.RobotManage) -> bool
1008 *
1009 * @par Lua函数原型
1010 * isFreedriveEnabled() -> boolean
1011 *
1012 * @par Lua示例
1013 * FreedriveEnabled = isFreedriveEnabled()
1014 *
1015 * @par JSON-RPC请求示例
1016 * {"jsonrpc":"2.0","method":"rob1.RobotManage.isFreedriveEnabled","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()->isFreedriveEnabled();
1027 * @endcode
1028 * \endchinese
1029 * \english
1030 * Whether the freedrive 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 * isFreedriveEnabled(self: pyaubo_sdk.RobotManage) -> bool
1038 *
1039 * @par Lua function prototype
1040 * isFreedriveEnabled() -> boolean
1041 *
1042 * @par Lua example
1043 * FreedriveEnabled = isFreedriveEnabled()
1044 *
1045 * @par JSON-RPC request example
1046 * {"jsonrpc":"2.0","method":"rob1.RobotManage.isFreedriveEnabled","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()->isFreedriveEnabled();
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 * isBackdriveEnabled(self: pyaubo_sdk.RobotManage) -> bool
1072 *
1073 * @par Lua函数原型
1074 * isBackdriveEnabled() -> boolean
1075 *
1076 * @par Lua示例
1077 * BackdriveEnabled = isBackdriveEnabled()
1078 *
1079 * @par JSON-RPC请求示例
1080 * {"jsonrpc":"2.0","method":"rob1.RobotManage.isBackdriveEnabled","params":[],"id":1}
1081 *
1082 * @par JSON-RPC响应示例
1083 * {"id":1,"jsonrpc":"2.0","result":false}
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()->isBackdriveEnabled();
1091 * @endcode
1092 * \endchinese
1093 * \english
1094 * Whether the backdrive 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 * isBackdriveEnabled(self: pyaubo_sdk.RobotManage) -> bool
1102 *
1103 * @par Lua function prototype
1104 * isBackdriveEnabled() -> boolean
1105 *
1106 * @par Lua example
1107 * BackdriveEnabled = isBackdriveEnabled()
1108 *
1109 * @par JSON-RPC request example
1110 * {"jsonrpc":"2.0","method":"rob1.RobotManage.isBackdriveEnabled","params":[],"id":1}
1111 *
1112 * @par JSON-RPC response example
1113 * {"id":1,"jsonrpc":"2.0","result":false}
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()->isBackdriveEnabled();
1121 * @endcode
1122 * \endenglish
1123 */
1125
1126 /**
1127 * \chinese
1128 * 是否使能了仿真模式
1129 *
1130 * @return 使能返回true; 反之返回false
1131 *
1132 * @throws arcs::common_interface::AuboException
1133 *
1134 * @par Python函数原型
1135 * isSimulationEnabled(self: pyaubo_sdk.RobotManage) -> bool
1136 *
1137 * @par Lua函数原型
1138 * isSimulationEnabled() -> boolean
1139 *
1140 * @par Lua示例
1141 * SimulationEnabled = isSimulationEnabled()
1142 *
1143 * @par JSON-RPC请求示例
1144 * {"jsonrpc":"2.0","method":"rob1.RobotManage.isSimulationEnabled","params":[],"id":1}
1145 *
1146 * @par JSON-RPC响应示例
1147 * {"id":1,"jsonrpc":"2.0","result":true}
1148 *
1149 * @par C++示例
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()->isSimulationEnabled();
1155 * @endcode
1156 * \endchinese
1157 * \english
1158 * Whether the simulation mode is enabled
1159 *
1160 * @return Returns true if enabled; otherwise returns false
1161 *
1162 * @throws arcs::common_interface::AuboException
1163 *
1164 * @par Python function prototype
1165 * isSimulationEnabled(self: pyaubo_sdk.RobotManage) -> bool
1166 *
1167 * @par Lua function prototype
1168 * isSimulationEnabled() -> boolean
1169 *
1170 * @par Lua example
1171 * SimulationEnabled = isSimulationEnabled()
1172 *
1173 * @par JSON-RPC request example
1174 * {"jsonrpc":"2.0","method":"rob1.RobotManage.isSimulationEnabled","params":[],"id":1}
1175 *
1176 * @par JSON-RPC response example
1177 * {"id":1,"jsonrpc":"2.0","result":true}
1178 *
1179 * @par C++ example
1180 * @code
1181 * auto rpc_cli = std::make_shared<RpcClient>();
1182 * auto robot_name = rpc_cli->getRobotNames().front();
1183 * bool isEnabled =
1184 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->isSimulationEnabled();
1185 * @endcode
1186 * \endenglish
1187 */
1189
1190 /**
1191 * \chinese
1192 * 清除防护停机,包括碰撞停机
1193 *
1194 * @return 成功返回0;失败返回错误码
1195 * AUBO_BUSY
1196 * AUBO_BAD_STATE
1197 * -AUBO_BAD_STATE
1198 *
1199 * @throws arcs::common_interface::AuboException
1200 *
1201 * @par Python函数原型
1202 * setUnlockProtectiveStop(self: pyaubo_sdk.RobotManage) -> int
1203 *
1204 * @par Lua函数原型
1205 * setUnlockProtectiveStop() -> number
1206 *
1207 * @par Lua示例
1208 * num = setUnlockProtectiveStop()
1209 *
1210 * @par JSON-RPC请求示例
1211 * {"jsonrpc":"2.0","method":"rob1.RobotManage.setUnlockProtectiveStop","params":[],"id":1}
1212 *
1213 * @par JSON-RPC响应示例
1214 * {"id":1,"jsonrpc":"2.0","result":0}
1215 *
1216 * @par C++示例
1217 * @code
1218 * auto rpc_cli = std::make_shared<RpcClient>();
1219 * auto robot_name = rpc_cli->getRobotNames().front();
1220 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->setUnlockProtectiveStop();
1221 * @endcode
1222 * \endchinese
1223 * \english
1224 * Clear protective stop, including collision stop
1225 *
1226 * @return Returns 0 on success; error code on failure
1227 * AUBO_BUSY
1228 * AUBO_BAD_STATE
1229 * -AUBO_BAD_STATE
1230 *
1231 * @throws arcs::common_interface::AuboException
1232 *
1233 * @par Python function prototype
1234 * setUnlockProtectiveStop(self: pyaubo_sdk.RobotManage) -> int
1235 *
1236 * @par Lua function prototype
1237 * setUnlockProtectiveStop() -> number
1238 *
1239 * @par Lua example
1240 * num = setUnlockProtectiveStop()
1241 *
1242 * @par JSON-RPC request example
1243 * {"jsonrpc":"2.0","method":"rob1.RobotManage.setUnlockProtectiveStop","params":[],"id":1}
1244 *
1245 * @par JSON-RPC response example
1246 * {"id":1,"jsonrpc":"2.0","result":0}
1247 *
1248 * @par C++ example
1249 * @code
1250 * auto rpc_cli = std::make_shared<RpcClient>();
1251 * auto robot_name = rpc_cli->getRobotNames().front();
1252 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->setUnlockProtectiveStop();
1253 * @endcode
1254 * \endenglish
1255 */
1257
1258 /**
1259 * \chinese
1260 * 重置安全接口板,一般在机器人断电之后需要重置时调用,比如机器人急停、故障等之后
1261 *
1262 * @return 成功返回0; 失败返回错误码
1263 * AUBO_BUSY
1264 * AUBO_BAD_STATE
1265 * -AUBO_BAD_STATE
1266 *
1267 * @throws arcs::common_interface::AuboException
1268 *
1269 * @par Python函数原型
1270 * restartInterfaceBoard(self: pyaubo_sdk.RobotManage) -> int
1271 *
1272 * @par Lua函数原型
1273 * restartInterfaceBoard() -> number
1274 *
1275 * @par Lua示例
1276 * num = restartInterfaceBoard()
1277 *
1278 * @par JSON-RPC请求示例
1279 * {"jsonrpc":"2.0","method":"rob1.RobotManage.restartInterfaceBoard","params":[],"id":1}
1280 *
1281 * @par JSON-RPC响应示例
1282 * {"id":1,"jsonrpc":"2.0","result":0}
1283 *
1284 * @par C++示例
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()->restartInterfaceBoard();
1289 * @endcode
1290 * \endchinese
1291 * \english
1292 * Reset the safety interface board, usually called after the robot is
1293 * powered off and needs to be reset, such as after emergency stop or fault.
1294 *
1295 * @return Returns 0 on success; error code on failure
1296 * AUBO_BUSY
1297 * AUBO_BAD_STATE
1298 * -AUBO_BAD_STATE
1299 *
1300 * @throws arcs::common_interface::AuboException
1301 *
1302 * @par Python function prototype
1303 * restartInterfaceBoard(self: pyaubo_sdk.RobotManage) -> int
1304 *
1305 * @par Lua function prototype
1306 * restartInterfaceBoard() -> number
1307 *
1308 * @par Lua example
1309 * num = restartInterfaceBoard()
1310 *
1311 * @par JSON-RPC request example
1312 * {"jsonrpc":"2.0","method":"rob1.RobotManage.restartInterfaceBoard","params":[],"id":1}
1313 *
1314 * @par JSON-RPC response example
1315 * {"id":1,"jsonrpc":"2.0","result":0}
1316 *
1317 * @par C++ example
1318 * @code
1319 * auto rpc_cli = std::make_shared<RpcClient>();
1320 * auto robot_name = rpc_cli->getRobotNames().front();
1321 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->restartInterfaceBoard();
1322 * @endcode
1323 * \endenglish
1324 */
1326
1327 /**
1328 * \chinese
1329 * 释放并清空指定内存缓存的记录数据
1330 *
1331 * @param name
1332 * 缓存名称
1333 *
1334 * @return 成功返回0;失败返回错误码(<0)
1335 *
1336 * @throws arcs::common_interface::AuboException
1337 *
1338 * @par Lua函数原型
1339 * recordCacheFree(name: string) -> nil
1340 *
1341 * @par Lua示例
1342 * recordCacheFree("rec")
1343 *
1344 * \endchinese
1345 * \english
1346 * Free and clear recorded data of the specified memory cache
1347 *
1348 * @param name
1349 * Cache name
1350 *
1351 * @return Returns 0 on success; negative error code on failure
1352 *
1353 * @throws arcs::common_interface::AuboException
1354 *
1355 * @par Lua function prototype
1356 * recordCacheFree(name: string) -> nil
1357 *
1358 * @par Lua example
1359 * recordCacheFree("rec")
1360 *
1361 * \endenglish
1362 */
1363 int recordCacheFree(const std::string &name);
1364
1365 /**
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 * startRecordCache(name: string) -> nil
1378 *
1379 * @par Lua示例
1380 * startRecordCache("rec")
1381 *
1382 * \endchinese
1383 * \english
1384 * Start real-time trajectory recording to memory cache (no file output)
1385 *
1386 * @param name
1387 * Cache name used to index recorded data in memory. Empty string returns
1388 * invalid argument.
1389 *
1390 * @return Returns 0 on success; negative error code on failure
1391 *
1392 * @throws arcs::common_interface::AuboException
1393 *
1394 * @par Lua function prototype
1395 * startRecordCache(name: string) -> nil
1396 *
1397 * @par Lua example
1398 * startRecordCache("rec")
1399 *
1400 * \endenglish
1401 */
1402 int startRecordCache(const std::string &name);
1403
1404 /**
1405 * \chinese
1406 * 停止当前实时轨迹内存缓存记录
1407 *
1408 * @return 成功返回0;失败返回错误码(<0)
1409 *
1410 * @throws arcs::common_interface::AuboException
1411 *
1412 * @par Lua函数原型
1413 * stopRecordCache() -> nil
1414 *
1415 * @par Lua示例
1416 * stopRecordCache()
1417 *
1418 * \endchinese
1419 * \english
1420 * Stop current real-time trajectory recording to memory cache
1421 *
1422 * @return Returns 0 on success; negative error code on failure
1423 *
1424 * @throws arcs::common_interface::AuboException
1425 *
1426 * @par Lua function prototype
1427 * stopRecordCache() -> nil
1428 *
1429 * @par Lua example
1430 * stopRecordCache()
1431 *
1432 * \endenglish
1433 */
1435
1436 /**
1437 * \chinese
1438 * 暂停/恢复当前实时轨迹内存缓存记录
1439 *
1440 * @param pause
1441 * true:暂停缓存记录;false:恢复缓存记录
1442 *
1443 * @return 成功返回0;失败返回错误码(<0)
1444 *
1445 * @throws arcs::common_interface::AuboException
1446 *
1447 * @par Lua函数原型
1448 * pauseRecordCache(pause: boolean) -> nil
1449 *
1450 * @par Lua示例
1451 * pauseRecordCache(true) -- 暂停
1452 * pauseRecordCache(false) -- 恢复
1453 *
1454 * \endchinese
1455 * \english
1456 * Pause or resume current real-time trajectory recording to memory cache
1457 *
1458 * @param pause
1459 * true to pause cache recording; false to resume cache recording
1460 *
1461 * @return Returns 0 on success; negative error code on failure
1462 *
1463 * @throws arcs::common_interface::AuboException
1464 *
1465 * @par Lua function prototype
1466 * pauseRecordCache(pause: boolean) -> nil
1467 *
1468 * @par Lua example
1469 * pauseRecordCache(true) -- pause
1470 * pauseRecordCache(false) -- resume
1471 *
1472 * \endenglish
1473 */
1474 int pauseRecordCache(bool pause);
1475
1476 /**
1477 * \chinese
1478 * 获取指定内存缓存的记录数据
1479 *
1480 * @param name
1481 * 缓存名称
1482 *
1483 * @param frames
1484 * 获取帧数上限:
1485 * - frames=0:获取全部已记录帧(1帧=1周期)
1486 * - frames>0:最多获取最近 frames 帧
1487 *
1488 * @return 成功返回获取到的帧数(>=0);失败返回错误码(<0)
1489 *
1490 * @throws arcs::common_interface::AuboException
1491 *
1492 * @par Lua函数原型
1493 * getRecordCache(name: string, frames: number = 0) -> number
1494 *
1495 * @par Lua示例
1496 * n = getRecordCache("rec") -- 获取全部,返回帧数
1497 * n = getRecordCache("rec", 2000) -- 获取最近2000帧,返回帧数
1498 *
1499 * \endchinese
1500 * \english
1501 * Get recorded data from the specified memory cache
1502 *
1503 * @param name
1504 * Cache name
1505 *
1506 * @param frames
1507 * Frame limit:
1508 * - frames=0: get all recorded frames (1 frame = 1 control cycle)
1509 * - frames>0: get up to the latest 'frames' frames
1510 *
1511 * @return Returns the number of frames fetched (>=0) on success;
1512 * negative error code on failure
1513 *
1514 * @throws arcs::common_interface::AuboException
1515 *
1516 * @par Lua function prototype
1517 * getRecordCache(name: string, frames: number = 0) -> number
1518 *
1519 * @par Lua example
1520 * n = getRecordCache("rec") -- all frames, returns count
1521 * n = getRecordCache("rec", 2000) -- latest 2000 frames, returns count
1522 *
1523 * \endenglish
1524 */
1525 int getRecordCache(const std::string &name, size_t frames = 0);
1526
1527 /**
1528 * \chinese
1529 * 开始实时轨迹的记录
1530 *
1531 * @param file_name
1532 *
1533 * @return 成功返回0;失败返回错误码
1534 * AUBO_BUSY
1535 * AUBO_BAD_STATE
1536 * -AUBO_INVL_ARGUMENT
1537 * -AUBO_BAD_STATE
1538 *
1539 * @throws arcs::common_interface::AuboException
1540 *
1541 * @par Lua函数原型
1542 * startRecord(fiel_name: string) -> nil
1543 *
1544 * @par Lua示例
1545 * startRecord("traje.csv")
1546 *
1547 * \endchinese
1548 * \english
1549 * Start real-time trajectory recording
1550 *
1551 * @param file_name
1552 *
1553 * @return Returns 0 on success; error code on failure
1554 * AUBO_BUSY
1555 * AUBO_BAD_STATE
1556 * -AUBO_INVL_ARGUMENT
1557 * -AUBO_BAD_STATE
1558 *
1559 * @throws arcs::common_interface::AuboException
1560 *
1561 * @par Lua function prototype
1562 * startRecord(fiel_name: string) -> nil
1563 *
1564 * @par Lua example
1565 * startRecord("traje.csv")
1566 *
1567 * \endenglish
1568 */
1569 int startRecord(const std::string &file_name);
1570
1571 /**
1572 * \chinese
1573 * 停止实时记录
1574 *
1575 * @return 成功返回0;失败返回错误码
1576 * AUBO_BUSY
1577 * AUBO_BAD_STATE
1578 * -AUBO_BAD_STATE
1579 *
1580 * @throws arcs::common_interface::AuboException
1581 *
1582 * @par Lua函数原型
1583 * stopRecord() -> nil
1584 *
1585 * @par Lua示例
1586 * stopRecord()
1587 *
1588 * @par JSON-RPC请求示例
1589 * {"jsonrpc":"2.0","method":"rob1.RobotManage.stopRecord","params":[],"id":1}
1590 *
1591 * @par JSON-RPC响应示例
1592 * {"id":1,"jsonrpc":"2.0","result":0}
1593 *
1594 * \endchinese
1595 * \english
1596 * Stop real-time recording
1597 *
1598 * @return Returns 0 on success; error code on failure
1599 * AUBO_BUSY
1600 * AUBO_BAD_STATE
1601 * -AUBO_BAD_STATE
1602 *
1603 * @throws arcs::common_interface::AuboException
1604 *
1605 * @par Lua function prototype
1606 * stopRecord() -> nil
1607 *
1608 * @par Lua example
1609 * stopRecord()
1610 *
1611 * @par JSON-RPC request example
1612 * {"jsonrpc":"2.0","method":"rob1.RobotManage.stopRecord","params":[],"id":1}
1613 *
1614 * @par JSON-RPC response example
1615 * {"id":1,"jsonrpc":"2.0","result":0}
1616 *
1617 * \endenglish
1618 */
1620
1621 /**
1622 * \chinese
1623 * 暂停实时记录
1624 *
1625 * @param pause
1626 *
1627 * @return 成功返回0;失败返回错误码
1628 * AUBO_BUSY
1629 * AUBO_BAD_STATE
1630 * -AUBO_BAD_STATE
1631 *
1632 * @throws arcs::common_interface::AuboException
1633 *
1634 * @par JSON-RPC请求示例
1635 * {"jsonrpc":"2.0","method":"rob1.RobotManage.pauseRecord","params":[true],"id":1}
1636 *
1637 * @par JSON-RPC响应示例
1638 * {"id":1,"jsonrpc":"2.0","result":0}
1639 *
1640 * \endchinese
1641 * \english
1642 * Pause real-time recording
1643 *
1644 * @param pause
1645 *
1646 * @return Returns 0 on success; error code on failure
1647 * AUBO_BUSY
1648 * AUBO_BAD_STATE
1649 * -AUBO_BAD_STATE
1650 *
1651 * @throws arcs::common_interface::AuboException
1652 *
1653 * @par JSON-RPC request example
1654 * {"jsonrpc":"2.0","method":"rob1.RobotManage.pauseRecord","params":[true],"id":1}
1655 *
1656 * @par JSON-RPC response example
1657 * {"id":1,"jsonrpc":"2.0","result":0}
1658 *
1659 * \endenglish
1660 */
1661 int pauseRecord(bool pause);
1662
1663 /**
1664 * \chinese
1665 * 发起机器人进入/退出联动模式请求,
1666 * 只有操作模式为自动或者无时,才能使能联动模式
1667 *
1668 * @param enable
1669 *
1670 * @return 成功返回0; 失败返回错误码
1671 * AUBO_BUSY
1672 * AUBO_REQUEST_IGNORE
1673 * -AUBO_BAD_STATE
1674 *
1675 * @throws arcs::common_interface::AuboException
1676 *
1677 * @par Python函数原型
1678 * setLinkModeEnable(self: pyaubo_sdk.RobotManage, arg0: bool) -> int
1679 *
1680 * @par Lua函数原型
1681 * setLinkModeEnable(enable: boolean) -> number
1682 *
1683 * @par Lua示例
1684 * num = setLinkModeEnable(true)
1685 *
1686 * @par JSON-RPC请求示例
1687 * {"jsonrpc":"2.0","method":"rob1.RobotManage.setLinkModeEnable","params":[true],"id":1}
1688 *
1689 * @par JSON-RPC响应示例
1690 * {"id":1,"jsonrpc":"2.0","result":0}
1691 *
1692 * @par C++示例
1693 * @code
1694 * auto rpc_cli = std::make_shared<RpcClient>();
1695 * auto robot_name = rpc_cli->getRobotNames().front();
1696 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->setLinkModeEnable(true);
1697 * @endcode
1698 * \endchinese
1699 * \english
1700 * Initiate robot enter/exit link mode request.
1701 * Link mode can only be enabled when the operation mode is Automatic or
1702 * None.
1703 *
1704 * @param enable
1705 *
1706 * @return Returns 0 on success; error code on failure
1707 * AUBO_BUSY
1708 * AUBO_REQUEST_IGNORE
1709 * -AUBO_BAD_STATE
1710 *
1711 * @throws arcs::common_interface::AuboException
1712 *
1713 * @par Python function prototype
1714 * setLinkModeEnable(self: pyaubo_sdk.RobotManage, arg0: bool) -> int
1715 *
1716 * @par Lua function prototype
1717 * setLinkModeEnable(enable: boolean) -> number
1718 *
1719 * @par Lua example
1720 * num = setLinkModeEnable(true)
1721 *
1722 * @par JSON-RPC request example
1723 * {"jsonrpc":"2.0","method":"rob1.RobotManage.setLinkModeEnable","params":[true],"id":1}
1724 *
1725 * @par JSON-RPC response example
1726 * {"id":1,"jsonrpc":"2.0","result":0}
1727 *
1728 * @par C++ example
1729 * @code
1730 * auto rpc_cli = std::make_shared<RpcClient>();
1731 * auto robot_name = rpc_cli->getRobotNames().front();
1732 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->setLinkModeEnable(true);
1733 * @endcode
1734 * \endenglish
1735 */
1736 int setLinkModeEnable(bool enable);
1737
1738 /**
1739 * \chinese
1740 * 是否使能了联动模式,联动模式下用户可以通过外部IO控制机器人(用户可以对IO的功能进行配置)
1741 *
1742 * @return 使能返回true; 反之返回false
1743 *
1744 * @throws arcs::common_interface::AuboException
1745 *
1746 * @par Python函数原型
1747 * isLinkModeEnabled(self: pyaubo_sdk.RobotManage) -> bool
1748 *
1749 * @par Lua函数原型
1750 * isLinkModeEnabled() -> boolean
1751 *
1752 * @par Lua示例
1753 * LinkModeEnabled = isLinkModeEnabled()
1754 *
1755 * @par JSON-RPC请求示例
1756 * {"jsonrpc":"2.0","method":"rob1.RobotManage.isLinkModeEnabled","params":[],"id":1}
1757 *
1758 * @par JSON-RPC响应示例
1759 * {"id":1,"jsonrpc":"2.0","result":false}
1760 *
1761 * @par C++示例
1762 * @code
1763 * auto rpc_cli = std::make_shared<RpcClient>();
1764 * auto robot_name = rpc_cli->getRobotNames().front();
1765 * bool isEnabled =
1766 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->isLinkModeEnabled();
1767 * @endcode
1768 * \endchinese
1769 * \english
1770 * Whether the link mode is enabled. In link mode, users can control the
1771 * robot via external IO (users can configure the IO functions).
1772 *
1773 * @return Returns true if enabled; otherwise returns false
1774 *
1775 * @throws arcs::common_interface::AuboException
1776 *
1777 * @par Python function prototype
1778 * isLinkModeEnabled(self: pyaubo_sdk.RobotManage) -> bool
1779 *
1780 * @par Lua function prototype
1781 * isLinkModeEnabled() -> boolean
1782 *
1783 * @par Lua example
1784 * LinkModeEnabled = isLinkModeEnabled()
1785 *
1786 * @par JSON-RPC request example
1787 * {"jsonrpc":"2.0","method":"rob1.RobotManage.isLinkModeEnabled","params":[],"id":1}
1788 *
1789 * @par JSON-RPC response example
1790 * {"id":1,"jsonrpc":"2.0","result":false}
1791 *
1792 * @par C++ example
1793 * @code
1794 * auto rpc_cli = std::make_shared<RpcClient>();
1795 * auto robot_name = rpc_cli->getRobotNames().front();
1796 * bool isEnabled =
1797 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->isLinkModeEnabled();
1798 * @endcode
1799 * \endenglish
1800 */
1802
1803 /**
1804 * \chinese
1805 * 手动触发生成诊断文件
1806 *
1807 * @return 指令下发成功返回0; 失败返回错误码。 \n
1808 * -AUBO_BAD_STATE: 运行时(RuntimeMachine)的当前状态不是Stopped,
1809 * 固件升级请求被拒绝。AUBO_BAD_STATE的值是1。 \n
1810 * -AUBO_TIMEOUT: 超时。AUBO_TIMEOUT的值是4。 \n
1811 *
1812 * @throws arcs::common_interface::AuboException
1813 *
1814 * @par Python函数原型
1815 * generateDiagnoseFile(self: pyaubo_sdk.RobotManage, arg0: str) -> int
1816 *
1817 * @par Lua函数原型
1818 * generateDiagnoseFile(reason: string) -> nil
1819 *
1820 * @par Lua示例
1821 * generateDiagnoseFile("reason")
1822 *
1823 * @par JSON-RPC请求示例
1824 * {"jsonrpc":"2.0","method":"rob1.RobotManage.generateDiagnoseFile","params":["reason"],"id":1}
1825 *
1826 * @par JSON-RPC响应示例
1827 * {"id":1,"jsonrpc":"2.0","result":false}
1828 *
1829 * @par C++示例
1830 * @code
1831 * auto rpc_cli = std::make_shared<RpcClient>();
1832 * auto robot_name = rpc_cli->getRobotNames().front();
1833 * bool isEnabled =
1834 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->generateDiagnoseFile("reason");
1835 * @endcode
1836 * \endchinese
1837 * \english
1838 * Manually trigger the generation of a diagnostic file
1839 *
1840 * @return Returns 0 if the command is successfully issued; error code on
1841 * failure. \n -AUBO_BAD_STATE: The current state of the RuntimeMachine is
1842 * not Stopped, the firmware upgrade request is rejected. The value of
1843 * AUBO_BAD_STATE is 1. \n -AUBO_TIMEOUT: Timeout. The value of AUBO_TIMEOUT
1844 * is 4. \n
1845 *
1846 * @throws arcs::common_interface::AuboException
1847 *
1848 * @par Python function prototype
1849 * generateDiagnoseFile(self: pyaubo_sdk.RobotManage, arg0: str) -> int
1850 *
1851 * @par Lua function prototype
1852 * generateDiagnoseFile(reason: string) -> nil
1853 *
1854 * @par Lua example
1855 * generateDiagnoseFile("reason")
1856 *
1857 * @par JSON-RPC request example
1858 * {"jsonrpc":"2.0","method":"rob1.RobotManage.generateDiagnoseFile","params":["reason"],"id":1}
1859 *
1860 * @par JSON-RPC response example
1861 * {"id":1,"jsonrpc":"2.0","result":false}
1862 *
1863 * @par C++ example
1864 * @code
1865 * auto rpc_cli = std::make_shared<RpcClient>();
1866 * auto robot_name = rpc_cli->getRobotNames().front();
1867 * bool isEnabled =
1868 * rpc_cli->getRobotInterface(robot_name)->getRobotManage()->generateDiagnoseFile("reason");
1869 * @endcode
1870 * \endenglish
1871 */
1872 int generateDiagnoseFile(const std::string &reason);
1873
1874protected:
1875 void *d_;
1876};
1877using RobotManagePtr = std::shared_ptr<RobotManage>;
1878} // namespace common_interface
1879} // namespace arcs
1880
1881#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的功能进行配置)
RobotControlModeType
机器人控制模式
Definition type_def.h:572
std::shared_ptr< RobotManage > RobotManagePtr
OperationalModeType
操作模式
Definition type_def.h:564
数据类型的定义