AUBO SDK  0.26.0
载入中...
搜索中...
未找到
runtime_machine.h
浏览该文件的文档.
1/** @file runtime_machine.h
2 * @brief Script interpreter runtime interface,
3 * allows pausing the script interpreter and setting/removing breakpoints.
4 */
5#ifndef AUBO_SDK_RUNTIME_MACHINE_INTERFACE_H
6#define AUBO_SDK_RUNTIME_MACHINE_INTERFACE_H
7
8#include <memory>
9#include <aubo/global_config.h>
10#include <aubo/type_def.h>
11
12namespace arcs {
13namespace common_interface {
14
15/**
16 * The RuntimeMachine class
17 */
18class ARCS_ABI_EXPORT RuntimeMachine
19{
20public:
22 virtual ~RuntimeMachine();
23
24 /**
25 * \chinese
26 * 返回 task_id
27 *
28 * @par JSON-RPC请求示例
29 * {"jsonrpc":"2.0","method":"RuntimeMachine.newTask","params":[false],"id":1}
30 *
31 * @par JSON-RPC响应示例
32 * {"id":1,"jsonrpc":"2.0","result":26}
33 * \endchinese
34 * \english
35 * Returns the task_id
36 *
37 * @par JSON-RPC Request Example
38 * {"jsonrpc":"2.0","method":"RuntimeMachine.newTask","params":[false],"id":1}
39 *
40 * @par JSON-RPC Response Example
41 * {"id":1,"jsonrpc":"2.0","result":26}
42 * \endenglish
43 */
44 int newTask(bool daemon = false);
45
46 /**
47 * \chinese
48 * 删除 task,会终止正在执行的运动
49 *
50 * @par JSON-RPC请求示例
51 * {"jsonrpc":"2.0","method":"RuntimeMachine.deleteTask","params":[26],"id":1}
52 *
53 * @par JSON-RPC响应示例
54 * {"id":1,"jsonrpc":"2.0","result":0}
55 *
56 * \endchinese
57 * \english
58 * Delete a task, which will terminate any ongoing motion.
59 *
60 * @par JSON-RPC Request Example
61 * {"jsonrpc":"2.0","method":"RuntimeMachine.deleteTask","params":[26],"id":1}
62 *
63 * @par JSON-RPC Response Example
64 * {"id":1,"jsonrpc":"2.0","result":0}
65 *
66 * \endenglish
67 */
68 int deleteTask(int tid);
69
70 /**
71 * \chinese
72 * 等待 task 自然结束
73 *
74 * @param tid
75 * @return
76 *
77 * @par JSON-RPC请求示例
78 * {"jsonrpc":"2.0","method":"RuntimeMachine.detachTask","params":[26],"id":1}
79 *
80 * @par JSON-RPC响应示例
81 * {"id":1,"jsonrpc":"2.0","result":0}
82 *
83 * \endchinese
84 * \english
85 * Wait for the task to finish naturally
86 *
87 * @param tid
88 * @return
89 *
90 * @par JSON-RPC Request Example
91 * {"jsonrpc":"2.0","method":"RuntimeMachine.detachTask","params":[26],"id":1}
92 *
93 * @par JSON-RPC Response Example
94 * {"id":1,"jsonrpc":"2.0","result":0}
95 *
96 * \endenglish
97 */
98 int detachTask(int tid);
99
100 /**
101 * \chinese
102 * 判断任务是否存活
103 *
104 * @param tid
105 * @return
106 *
107 * @par JSON-RPC请求示例
108 * {"jsonrpc":"2.0","method":"RuntimeMachine.isTaskAlive","params":[26],"id":1}
109 *
110 * @par JSON-RPC响应示例
111 * {"id":1,"jsonrpc":"2.0","result":true}
112 *
113 * \endchinese
114 * \english
115 * Check if the task is alive
116 *
117 * @param tid
118 * @return
119 *
120 * @par JSON-RPC Request Example
121 * {"jsonrpc":"2.0","method":"RuntimeMachine.isTaskAlive","params":[26],"id":1}
122 *
123 * @par JSON-RPC Response Example
124 * {"id":1,"jsonrpc":"2.0","result":true}
125 *
126 * \endenglish
127 */
128 bool isTaskAlive(int tid);
129
130 /**
131 * \chinese
132 * 获取任务中缓存的指令的数量
133 *
134 * @param tid
135 * @return
136 * \endchinese
137 * \english
138 * Get the number of cached instructions in the task
139 *
140 * @param tid
141 * @return
142 * \endenglish
143 */
144 int getTaskQueueSize(int tid);
145
146 /**
147 * \chinese
148 * 切换当前线程,切换之后接下来的指令将被插入切换后的线程中
149 *
150 * @param tid
151 * @return
152 *
153 * @par JSON-RPC请求示例
154 * {"jsonrpc":"2.0","method":"RuntimeMachine.switchTask","params":[26],"id":1}
155 *
156 * @par JSON-RPC响应示例
157 * {"id":1,"jsonrpc":"2.0","result":0}
158 *
159 * \endchinese
160 * \english
161 * Switch the current thread. After switching, subsequent instructions will
162 * be inserted into the switched thread.
163 *
164 * @param tid
165 * @return
166 *
167 * @par JSON-RPC Request Example
168 * {"jsonrpc":"2.0","method":"RuntimeMachine.switchTask","params":[26],"id":1}
169 *
170 * @par JSON-RPC Response Example
171 * {"id":1,"jsonrpc":"2.0","result":0}
172 *
173 * \endenglish
174 */
175 int switchTask(int tid);
176
177 /**
178 * \chinese
179 * 标记记下来的指令的行号和注释
180 *
181 * @param lineno
182 * @param comment
183 * @return
184 *
185 * @par JSON-RPC请求示例
186 * {"jsonrpc":"2.0","method":"RuntimeMachine.setLabel","params":[5,"moveJoint"],"id":1}
187 *
188 * @par JSON-RPC响应示例
189 * {"id":1,"jsonrpc":"2.0","result":0}
190 *
191 * \endchinese
192 * \english
193 * Mark the line number and comment of the recorded instruction
194 *
195 * @param lineno
196 * @param comment
197 * @return
198 *
199 * @par JSON-RPC Request Example
200 * {"jsonrpc":"2.0","method":"RuntimeMachine.setLabel","params":[5,"moveJoint"],"id":1}
201 *
202 * @par JSON-RPC Response Example
203 * {"id":1,"jsonrpc":"2.0","result":0}
204 *
205 * \endenglish
206 */
207 int setLabel(int lineno, const std::string &comment);
208
209 /**
210 * \chinese
211 * 向aubo_control日志中添加注释
212 * 使用 setLabel 替换
213 *
214 * @param tid 指令的线程ID
215 * @param lineno 行号
216 * @param comment 注释
217 * @return
218 *
219 * @par Python函数原型
220 * setPlanContext(self: pyaubo_sdk.RuntimeMachine, arg0: int, arg1: int,
221 * arg2: str) -> int
222 *
223 * @par Lua函数原型
224 * setPlanContext(tid: number, lineno: number, comment: string) -> number
225 *
226 * @par JSON-RPC请求示例
227 * {"jsonrpc":"2.0","method":"RuntimeMachine.setPlanContext","params":[26,3,"moveJoint"],"id":1}
228 *
229 * @par JSON-RPC响应示例
230 * {"id":1,"jsonrpc":"2.0","result":0}
231 *
232 * \endchinese
233 * \english
234 * Add a comment to the aubo_control log
235 * Use setLabel instead
236 *
237 * @param tid Thread ID of the instruction
238 * @param lineno Line number
239 * @param comment Comment
240 * @return
241 *
242 * @par Python function prototype
243 * setPlanContext(self: pyaubo_sdk.RuntimeMachine, arg0: int, arg1: int,
244 * arg2: str) -> int
245 *
246 * @par Lua function prototype
247 * setPlanContext(tid: number, lineno: number, comment: string) -> number
248 *
249 * @par JSON-RPC Request Example
250 * {"jsonrpc":"2.0","method":"RuntimeMachine.setPlanContext","params":[26,3,"moveJoint"],"id":1}
251 *
252 * @par JSON-RPC Response Example
253 * {"id":1,"jsonrpc":"2.0","result":0}
254 *
255 * \endenglish
256 */
257 ARCS_DEPRECATED int setPlanContext(int tid, int lineno,
258 const std::string &comment);
259
260 /**
261 * \chinese
262 * 空操作
263 *
264 * @return
265 *
266 * @par JSON-RPC请求示例
267 * {"jsonrpc":"2.0","method":"RuntimeMachine.nop","params":[],"id":1}
268 *
269 * @par JSON-RPC响应示例
270 * {"id":1,"jsonrpc":"2.0","result":0}
271 *
272 * \endchinese
273 * \english
274 * No operation
275 *
276 * @return
277 *
278 * @par JSON-RPC Request Example
279 * {"jsonrpc":"2.0","method":"RuntimeMachine.nop","params":[],"id":1}
280 *
281 * @par JSON-RPC Response Example
282 * {"id":1,"jsonrpc":"2.0","result":0}
283 *
284 * \endenglish
285 */
286 int nop();
287
288 /**
289 * \chinese
290 * 获取耗时的接口(INST)执行状态, 如 setPersistentParameters
291 *
292 * @return 指令名字, 执行状态
293 * 执行状态: EXECUTING/FINISHED
294 *
295 * @par Python函数原型
296 * getExecutionStatus(self: pyaubo_sdk.RuntimeMachine) -> Tuple[str, str,
297 * int]
298 *
299 * @par Lua函数原型
300 * getExecutionStatus() -> string, string, number
301 *
302 * @par JSON-RPC请求示例
303 * {"jsonrpc":"2.0","method":"RuntimeMachine.getExecutionStatus","params":[],"id":1}
304 *
305 * @par JSON-RPC响应示例
306 * {"id":1,"jsonrpc":"2.0","result":["confirmSafetyParameters","FINISHED"]}
307 *
308 * \endchinese
309 * \english
310 * Get the execution status of time-consuming interfaces (INST), such as
311 * setPersistentParameters
312 *
313 * @return Instruction name, execution status
314 * Execution status: EXECUTING/FINISHED
315 *
316 * @par Python function prototype
317 * getExecutionStatus(self: pyaubo_sdk.RuntimeMachine) -> Tuple[str, str,
318 * int]
319 *
320 * @par Lua function prototype
321 * getExecutionStatus() -> string, string, number
322 *
323 * @par JSON-RPC Request Example
324 * {"jsonrpc":"2.0","method":"RuntimeMachine.getExecutionStatus","params":[],"id":1}
325 *
326 * @par JSON-RPC Response Example
327 * {"id":1,"jsonrpc":"2.0","result":["confirmSafetyParameters","FINISHED"]}
328 *
329 * \endenglish
330 */
331 std::tuple<std::string, std::string> getExecutionStatus();
332 std::tuple<std::string, std::string, int> getExecutionStatus1();
333
334 /**
335 * \chinese
336 * 跳转到指定行号
337 *
338 * @param lineno
339 * @return
340 *
341 * @par Python函数原型
342 * gotoLine(self: pyaubo_sdk.RuntimeMachine, arg0: int) -> int
343 *
344 * @par Lua函数原型
345 * gotoLine(lineno: number) -> number
346 *
347 * @par JSON-RPC请求示例
348 * {"jsonrpc":"2.0","method":"RuntimeMachine.gotoLine","params":[10],"id":1}
349 *
350 * @par JSON-RPC响应示例
351 * {"id":1,"jsonrpc":"2.0","result":0}
352 *
353 * \endchinese
354 * \english
355 * Jump to the specified line number
356 *
357 * @param lineno
358 * @return
359 *
360 * @par Python function prototype
361 * gotoLine(self: pyaubo_sdk.RuntimeMachine, arg0: int) -> int
362 *
363 * @par Lua function prototype
364 * gotoLine(lineno: number) -> number
365 *
366 * @par JSON-RPC Request Example
367 * {"jsonrpc":"2.0","method":"RuntimeMachine.gotoLine","params":[10],"id":1}
368 *
369 * @par JSON-RPC Response Example
370 * {"id":1,"jsonrpc":"2.0","result":0}
371 *
372 * \endenglish
373 */
374 int gotoLine(int lineno);
375
376 /**
377 * \chinese
378 * 获取当前运行上下文
379 *
380 * @param tid 任务编号
381 * 如果指定(不是-1),返回对应任务的运行上下文;如果不指定(是-1),返回正在运行的线程的运行上下文
382 *
383 * @return
384 *
385 * @par Python函数原型
386 * getPlanContext(self: pyaubo_sdk.RuntimeMachine) -> Tuple[int, int, str]
387 *
388 * @par Lua函数原型
389 * getPlanContext() -> number
390 *
391 * @par JSON-RPC请求示例
392 * {"jsonrpc":"2.0","method":"RuntimeMachine.getPlanContext","params":[-1],"id":1}
393 *
394 * @par JSON-RPC响应示例
395 * {"id":1,"jsonrpc":"2.0","result":[-1,0,""]}
396 *
397 * \endchinese
398 * \english
399 * Get the current runtime context
400 *
401 * @param tid Task ID
402 * If specified (not -1), returns the runtime context of the corresponding
403 * task; if not specified (is -1), returns the runtime context of the
404 * currently running thread
405 *
406 * @return
407 *
408 * @par Python function prototype
409 * getPlanContext(self: pyaubo_sdk.RuntimeMachine) -> Tuple[int, int, str]
410 *
411 * @par Lua function prototype
412 * getPlanContext() -> number
413 *
414 * @par JSON-RPC Request Example
415 * {"jsonrpc":"2.0","method":"RuntimeMachine.getPlanContext","params":[-1],"id":1}
416 *
417 * @par JSON-RPC Response Example
418 * {"id":1,"jsonrpc":"2.0","result":[-1,0,""]}
419 *
420 * \endenglish
421 */
422 std::tuple<int, int, std::string> getPlanContext(int tid = -1);
423
424 /**
425 * \chinese
426 * 获取提前运行规划器的上下文信息
427 *
428 * @param tid 任务编号
429 * 如果指定(不是-1),返回对应任务运行规划器的上下文信息;如果不指定(是-1),返回正在运行的线程运行规划器的上下文信息
430 *
431 * @return
432 *
433 * @par JSON-RPC请求示例
434 * {"jsonrpc":"2.0","method":"RuntimeMachine.getAdvancePlanContext","params":[-1],"id":1}
435 *
436 * @par JSON-RPC响应示例
437 * {"id":1,"jsonrpc":"2.0","result":[-1,-1,""]}
438 *
439 * \endchinese
440 * \english
441 * Get the context information of the advance planner
442 *
443 * @param tid Task ID
444 * If specified (not -1), returns the context information of the advance
445 * planner for the corresponding task; if not specified (is -1), returns the
446 * context information of the advance planner for the currently running
447 * thread
448 *
449 * @return
450 *
451 * @par JSON-RPC Request Example
452 * {"jsonrpc":"2.0","method":"RuntimeMachine.getAdvancePlanContext","params":[-1],"id":1}
453 *
454 * @par JSON-RPC Response Example
455 * {"id":1,"jsonrpc":"2.0","result":[-1,-1,""]}
456 *
457 * \endenglish
458 */
459 std::tuple<int, int, std::string> getAdvancePlanContext(int tid = -1);
460
461 /**
462 * \chinese
463 * 获取AdvanceRun的程序指针
464 *
465 * @return
466 *
467 * @par JSON-RPC请求示例
468 * {"jsonrpc":"2.0","method":"RuntimeMachine.getAdvancePtr","params":[-1],"id":1}
469 *
470 * @par JSON-RPC响应示例
471 * {"id":1,"jsonrpc":"2.0","result":-1}
472 *
473 * \endchinese
474 * \english
475 * Get the program pointer of AdvanceRun
476 *
477 * @return
478 *
479 * @par JSON-RPC Request Example
480 * {"jsonrpc":"2.0","method":"RuntimeMachine.getAdvancePtr","params":[-1],"id":1}
481 *
482 * @par JSON-RPC Response Example
483 * {"id":1,"jsonrpc":"2.0","result":-1}
484 *
485 * \endenglish
486 */
487 int getAdvancePtr(int tid = -1);
488
489 /**
490 * \chinese
491 * 获取机器人运动的程序指针
492 *
493 * @param tid 任务编号
494 * 如果指定(不是-1),返回对应任务的程序指针;如果不指定(是-1),返回正在运行线程的程序指针
495 *
496 * @return
497 *
498 * @par JSON-RPC请求示例
499 * {"jsonrpc":"2.0","method":"RuntimeMachine.getMainPtr","params":[-1],"id":1}
500 *
501 * @par JSON-RPC响应示例
502 * {"id":1,"jsonrpc":"2.0","result":-1}
503 *
504 * \endchinese
505 * \english
506 * Get the program pointer of robot motion
507 *
508 * @param tid Task ID
509 * If specified (not -1), returns the program pointer of the corresponding
510 * task; if not specified (is -1), returns the program pointer of the
511 * currently running thread
512 *
513 * @return
514 *
515 * @par JSON-RPC Request Example
516 * {"jsonrpc":"2.0","method":"RuntimeMachine.getMainPtr","params":[-1],"id":1}
517 *
518 * @par JSON-RPC Response Example
519 * {"id":1,"jsonrpc":"2.0","result":-1}
520 *
521 * \endenglish
522 */
523 int getMainPtr(int tid = -1);
524
525 /**
526 * \chinese
527 * 获取最近解释过的指令指针
528 *
529 * @param tid
530 * @return
531 *
532 * @par JSON-RPC请求示例
533 * {"jsonrpc":"2.0","method":"RuntimeMachine.getInterpPtr","params":[26],"id":1}
534 *
535 * @par JSON-RPC响应示例
536 * {"id":1,"jsonrpc":"2.0","result":-1}
537 *
538 * \endchinese
539 * \english
540 * Get the pointer of the most recently interpreted instruction
541 *
542 * @param tid
543 * @return
544 *
545 * @par JSON-RPC Request Example
546 * {"jsonrpc":"2.0","method":"RuntimeMachine.getInterpPtr","params":[26],"id":1}
547 *
548 * @par JSON-RPC Response Example
549 * {"id":1,"jsonrpc":"2.0","result":-1}
550 *
551 * \endenglish
552 */
553 int getInterpPtr(int tid);
554
555 /**
556 * \chinese
557 * 加载本地工程文件
558 * Lua 脚本,只需要给出文件名字,不需要后缀,需要从 ${ARCS_WS}/program
559 * 目录中查找
560 *
561 * @param program
562 * @return
563 *
564 * @par JSON-RPC请求示例
565 * {"jsonrpc":"2.0","method":"RuntimeMachine.loadProgram","params":["demo"],"id":1}
566 *
567 * @par JSON-RPC响应示例
568 * {"id":1,"jsonrpc":"2.0","result":0}
569 *
570 * \endchinese
571 * \english
572 * Load a local project file.
573 * For Lua scripts, only the file name is required (no extension), and it
574 * will be searched in the ${ARCS_WS}/program directory.
575 *
576 * @param program
577 * @return
578 *
579 * @par JSON-RPC Request Example
580 * {"jsonrpc":"2.0","method":"RuntimeMachine.loadProgram","params":["demo"],"id":1}
581 *
582 * @par JSON-RPC Response Example
583 * {"id":1,"jsonrpc":"2.0","result":0}
584 *
585 * \endenglish
586 */
587 int loadProgram(const std::string &program);
588
589 /**
590 * \chinese
591 * 预加载工程文件
592 *
593 * @param index 0~99 工程索引号
594 * @param program 工程名字
595 * @return
596 * \endchinese
597 * \english
598 * Preload project file
599 *
600 * @param index Project index number (0~99)
601 * @param program Project name
602 * @return
603 * \endenglish
604 */
605 int preloadProgram(int index, const std::string &program);
606
607 /**
608 * \chinese
609 * 获取预加载工程文件名字,如果没有加载或者超出索引范围则返回空字符串
610 *
611 * @param index 0~99 工程索引号
612 * @return 工程文件名字
613 * \endchinese
614 * \english
615 * Get the name of the preloaded project file. Returns an empty string if
616 * not loaded or index is out of range.
617 *
618 * @param index Project index number (0~99)
619 * @return Project file name
620 * \endenglish
621 */
622 std::string getPreloadProgram(int index);
623
624 /**
625 * \chinese
626 * 清除所有已预加载的工程文件
627 * 调用此方法将释放所有通过 preloadProgram
628 * 预加载的工程索引及其关联的工程名称
629 *
630 * @return 成功返回0;
631 * \endchinese
632 * \english
633 * Clear all preloaded project files.
634 * Calling this method will release all project indices and their associated
635 * program names that were previously preloaded via preloadProgram.
636 *
637 * @return Returns 0 on success;
638 * \endenglish
639 */
641
642 /**
643 * \chinese
644 * 运行已经加载的工程文件
645 *
646 * @return
647 *
648 * @par JSON-RPC请求示例
649 * {"jsonrpc":"2.0","method":"RuntimeMachine.runProgram","params":[],"id":1}
650 *
651 * @par JSON-RPC响应示例
652 * {"id":1,"jsonrpc":"2.0","result":0}
653 *
654 * \endchinese
655 * \english
656 * Run the already loaded project file
657 *
658 * @return
659 *
660 * @par JSON-RPC Request Example
661 * {"jsonrpc":"2.0","method":"RuntimeMachine.runProgram","params":[],"id":1}
662 *
663 * @par JSON-RPC Response Example
664 * {"id":1,"jsonrpc":"2.0","result":0}
665 *
666 * \endenglish
667 */
669
670 /**
671 * \chinese
672 * 开始运行时
673 *
674 * @return
675 *
676 * @par Python函数原型
677 * start(self: pyaubo_sdk.RuntimeMachine) -> int
678 *
679 * @par Lua函数原型
680 * start() -> number
681 *
682 * @par JSON-RPC请求示例
683 * {"jsonrpc":"2.0","method":"RuntimeMachine.start","params":[],"id":1}
684 *
685 * @par JSON-RPC响应示例
686 * {"id":1,"jsonrpc":"2.0","result":0}
687 *
688 * \endchinese
689 * \english
690 * Start the runtime
691 *
692 * @return
693 *
694 * @par Python function prototype
695 * start(self: pyaubo_sdk.RuntimeMachine) -> int
696 *
697 * @par Lua function prototype
698 * start() -> number
699 *
700 * @par JSON-RPC Request Example
701 * {"jsonrpc":"2.0","method":"RuntimeMachine.start","params":[],"id":1}
702 *
703 * @par JSON-RPC Response Example
704 * {"id":1,"jsonrpc":"2.0","result":0}
705 *
706 * \endenglish
707 */
708 int start();
709
710 /**
711 * \chinese
712 * 停止运行时即脚本运行,无法停止运行时状态为 Stopped 时的机器人运动
713 *
714 * 如果考虑停止机器人所有运动,可以调用 RuntimeMachine::abort 接口
715 *
716 * @return
717 *
718 * @par Python函数原型
719 * stop(self: pyaubo_sdk.RuntimeMachine) -> int
720 *
721 * @par Lua函数原型
722 * stop() -> number
723 *
724 * @par JSON-RPC请求示例
725 * {"jsonrpc":"2.0","method":"RuntimeMachine.stop","params":[],"id":1}
726 *
727 * @par JSON-RPC响应示例
728 * {"id":1,"jsonrpc":"2.0","result":0}
729 *
730 * \endchinese
731 * \english
732 * Stop the runtime, i.e., stop script execution. Cannot stop robot motion
733 * when the runtime state is Stopped.
734 *
735 * If you want to stop all robot motion, use the RuntimeMachine::abort
736 * interface.
737 *
738 * @return
739 *
740 * @par Python function prototype
741 * stop(self: pyaubo_sdk.RuntimeMachine) -> int
742 *
743 * @par Lua function prototype
744 * stop() -> number
745 *
746 * @par JSON-RPC Request Example
747 * {"jsonrpc":"2.0","method":"RuntimeMachine.stop","params":[],"id":1}
748 *
749 * @par JSON-RPC Response Example
750 * {"id":1,"jsonrpc":"2.0","result":0}
751 *
752 * \endenglish
753 */
754 int stop();
755
756 /**
757 * \chinese
758 * 终止机器人运行.
759 *
760 * 如果只是考虑停止运行时,可以调用 RuntimeMachine::stop 接口
761 *
762 * 如果脚本运行时处于 Running 状态,则终止运行时;如果运行时处于 Stopped
763 * 且机器人正在移动,则停止机器人移动;如果此时力控开启了,则机器人停止力控
764 *
765 * @return
766 *
767 * @par Python函数原型
768 * abort(self: pyaubo_sdk.RuntimeMachine) -> int
769 *
770 * @par Lua函数原型
771 * abort() -> number
772 *
773 * @par JSON-RPC请求示例
774 * {"jsonrpc":"2.0","method":"RuntimeMachine.abort","params":[],"id":1}
775 *
776 * @par JSON-RPC响应示例
777 * {"id":1,"jsonrpc":"2.0","result":0}
778 *
779 * \endchinese
780 * \english
781 * Abort robot operation.
782 *
783 * If you only want to stop the runtime, you can call the
784 * RuntimeMachine::stop interface.
785 *
786 * If the script runtime is in the Running state, aborts the runtime; if the
787 * runtime is Stopped and the robot is moving, stops the robot motion; if
788 * force control is enabled, stops force control.
789 *
790 * @return
791 *
792 * @par Python function prototype
793 * abort(self: pyaubo_sdk.RuntimeMachine) -> int
794 *
795 * @par Lua function prototype
796 * abort() -> number
797 *
798 * @par JSON-RPC Request Example
799 * {"jsonrpc":"2.0","method":"RuntimeMachine.abort","params":[],"id":1}
800 *
801 * @par JSON-RPC Response Example
802 * {"id":1,"jsonrpc":"2.0","result":0}
803 *
804 * \endenglish
805 */
806 int abort();
807
808 /**
809 * \chinese
810 * 暂停解释器
811 *
812 * @return
813 *
814 * @par Python函数原型
815 * pause(self: pyaubo_sdk.RuntimeMachine) -> int
816 *
817 * @par Lua函数原型
818 * pause() -> number
819 *
820 * @par JSON-RPC请求示例
821 * {"jsonrpc":"2.0","method":"RuntimeMachine.pause","params":[],"id":1}
822 *
823 * @par JSON-RPC响应示例
824 * {"id":1,"jsonrpc":"2.0","result":0}
825 *
826 * \endchinese
827 * \english
828 * Pause the interpreter
829 *
830 * @return
831 *
832 * @par Python function prototype
833 * pause(self: pyaubo_sdk.RuntimeMachine) -> int
834 *
835 * @par Lua function prototype
836 * pause() -> number
837 *
838 * @par JSON-RPC Request Example
839 * {"jsonrpc":"2.0","method":"RuntimeMachine.pause","params":[],"id":1}
840 *
841 * @par JSON-RPC Response Example
842 * {"id":1,"jsonrpc":"2.0","result":0}
843 *
844 * \endenglish
845 */
846 int pause();
847
848 /**
849 * \chinese
850 * 单步运行
851 *
852 * @return
853 *
854 * @par Python函数原型
855 * step(self: pyaubo_sdk.RuntimeMachine) -> int
856 *
857 * @par Lua函数原型
858 * step() -> number
859 *
860 * @par JSON-RPC请求示例
861 * {"jsonrpc":"2.0","method":"RuntimeMachine.step","params":[],"id":1}
862 *
863 * @par JSON-RPC响应示例
864 * {"id":1,"jsonrpc":"2.0","result":0}
865 *
866 * \endchinese
867 * \english
868 * Execute a single step
869 *
870 * @return
871 *
872 * @par Python function prototype
873 * step(self: pyaubo_sdk.RuntimeMachine) -> int
874 *
875 * @par Lua function prototype
876 * step() -> number
877 *
878 * @par JSON-RPC Request Example
879 * {"jsonrpc":"2.0","method":"RuntimeMachine.step","params":[],"id":1}
880 *
881 * @par JSON-RPC Response Example
882 * {"id":1,"jsonrpc":"2.0","result":0}
883 *
884 * \endenglish
885 */
886 int step();
887
888 /**
889 * \chinese
890 * 恢复解释器
891 *
892 * @return
893 *
894 * @par Python函数原型
895 * resume(self: pyaubo_sdk.RuntimeMachine) -> int
896 *
897 * @par Lua函数原型
898 * resume() -> number
899 *
900 * @par JSON-RPC请求示例
901 * {"jsonrpc":"2.0","method":"RuntimeMachine.resume","params":[],"id":1}
902 *
903 * @par JSON-RPC响应示例
904 * {"id":1,"jsonrpc":"2.0","result":0}
905 *
906 * \endchinese
907 * \english
908 * Resume the interpreter
909 *
910 * @return
911 *
912 * @par Python function prototype
913 * resume(self: pyaubo_sdk.RuntimeMachine) -> int
914 *
915 * @par Lua function prototype
916 * resume() -> number
917 *
918 * @par JSON-RPC Request Example
919 * {"jsonrpc":"2.0","method":"RuntimeMachine.resume","params":[],"id":1}
920 *
921 * @par JSON-RPC Response Example
922 * {"id":1,"jsonrpc":"2.0","result":0}
923 *
924 * \endenglish
925 */
926 int resume();
927
928 /**
929 * \chinese
930 * 恢复解释器(不检查当前点和暂停点距离)
931 *
932 * @return
933 *
934 * @par Python函数原型
935 * arbitraryResume(self: pyaubo_sdk.RuntimeMachine) -> int
936 *
937 * @par Lua函数原型
938 * arbitraryResume() -> number
939 *
940 * @par JSON-RPC请求示例
941 * {"jsonrpc":"2.0","method":"RuntimeMachine.arbitraryResume","params":[],"id":1}
942 *
943 * @par JSON-RPC响应示例
944 * {"id":1,"jsonrpc":"2.0","result":0}
945 *
946 * \endchinese
947 * \english
948 * Resume the interpreter
949 *
950 * @return
951 *
952 * @par Python function prototype
953 * arbitraryResume(self: pyaubo_sdk.RuntimeMachine) -> int
954 *
955 * @par Lua function prototype
956 * arbitraryResume() -> number
957 *
958 * @par JSON-RPC Request Example
959 * {"jsonrpc":"2.0","method":"RuntimeMachine.arbitraryResume","params":[],"id":1}
960 *
961 * @par JSON-RPC Response Example
962 * {"id":1,"jsonrpc":"2.0","result":0}
963 *
964 * \endenglish
965 */
967
968 /**
969 * \chinese
970 * 恢复解释器之前等待恢复前之前的序列完成
971 *
972 * @param wait
973 * @return
974 *
975 * @par JSON-RPC请求示例
976 * {"jsonrpc":"2.0","method":"RuntimeMachine.setResumeWait","params":[true],"id":1}
977 *
978 * @par JSON-RPC响应示例
979 * {"id":1,"jsonrpc":"2.0","result":0}
980 *
981 * \endchinese
982 * \english
983 * Wait for the previous sequence to complete before resuming the
984 * interpreter
985 *
986 * @param wait
987 * @return
988 *
989 * @par JSON-RPC Request Example
990 * {"jsonrpc":"2.0","method":"RuntimeMachine.setResumeWait","params":[true],"id":1}
991 *
992 * @par JSON-RPC Response Example
993 * {"id":1,"jsonrpc":"2.0","result":0}
994 *
995 * \endenglish
996 */
997 int setResumeWait(bool wait);
998
999 /**
1000 * \chinese
1001 * 获取规划器的状态
1002 *
1003 * @return
1004 *
1005 * @par Python函数原型
1006 * getStatus(self: pyaubo_sdk.RuntimeMachine) ->
1007 * arcs::common_interface::RuntimeState
1008 *
1009 * @par Lua函数原型
1010 * getStatus() -> number
1011 *
1012 * @par JSON-RPC请求示例
1013 * {"jsonrpc":"2.0","method":"RuntimeMachine.getStatus","params":[],"id":1}
1014 *
1015 * @par JSON-RPC响应示例
1016 * {"id":1,"jsonrpc":"2.0","result":"Running"}
1017 *
1018 * \endchinese
1019 * \english
1020 * Get the status of the planner
1021 *
1022 * @return
1023 *
1024 * @par Python function prototype
1025 * getStatus(self: pyaubo_sdk.RuntimeMachine) ->
1026 * arcs::common_interface::RuntimeState
1027 *
1028 * @par Lua function prototype
1029 * getStatus() -> number
1030 *
1031 * @par JSON-RPC Request Example
1032 * {"jsonrpc":"2.0","method":"RuntimeMachine.getStatus","params":[],"id":1}
1033 *
1034 * @par JSON-RPC Response Example
1035 * {"id":1,"jsonrpc":"2.0","result":"Running"}
1036 *
1037 * \endenglish
1038 */
1039 ARCS_DEPRECATED RuntimeState getStatus();
1041
1042 /**
1043 * \chinese
1044 * 设置断点
1045 *
1046 * @param lineno
1047 * @return
1048 *
1049 * @par Python函数原型
1050 * setBreakPoint(self: pyaubo_sdk.RuntimeMachine, arg0: int) -> int
1051 *
1052 * @par Lua函数原型
1053 * setBreakPoint(lineno: number) -> number
1054 *
1055 * @par JSON-RPC请求示例
1056 * {"jsonrpc":"2.0","method":"RuntimeMachine.setBreakPoint","params":[15],"id":1}
1057 *
1058 * @par JSON-RPC响应示例
1059 * {"id":1,"jsonrpc":"2.0","result":0}
1060 *
1061 * \endchinese
1062 * \english
1063 * Set a breakpoint
1064 *
1065 * @param lineno
1066 * @return
1067 *
1068 * @par Python function prototype
1069 * setBreakPoint(self: pyaubo_sdk.RuntimeMachine, arg0: int) -> int
1070 *
1071 * @par Lua function prototype
1072 * setBreakPoint(lineno: number) -> number
1073 *
1074 * @par JSON-RPC Request Example
1075 * {"jsonrpc":"2.0","method":"RuntimeMachine.setBreakPoint","params":[15],"id":1}
1076 *
1077 * @par JSON-RPC Response Example
1078 * {"id":1,"jsonrpc":"2.0","result":0}
1079 *
1080 * \endenglish
1081 */
1082 int setBreakPoint(int lineno);
1083
1084 /**
1085 * \chinese
1086 * 移除断点
1087 *
1088 * @param lineno
1089 * @return
1090 *
1091 * @par Python函数原型
1092 * removeBreakPoint(self: pyaubo_sdk.RuntimeMachine, arg0: int) -> int
1093 *
1094 * @par Lua函数原型
1095 * removeBreakPoint(lineno: number) -> number
1096 *
1097 * @par JSON-RPC请求示例
1098 * {"jsonrpc":"2.0","method":"RuntimeMachine.removeBreakPoint","params":[15],"id":1}
1099 *
1100 * @par JSON-RPC响应示例
1101 * {"id":1,"jsonrpc":"2.0","result":0}
1102 *
1103 * \endchinese
1104 * \english
1105 * Remove a breakpoint
1106 *
1107 * @param lineno
1108 * @return
1109 *
1110 * @par Python function prototype
1111 * removeBreakPoint(self: pyaubo_sdk.RuntimeMachine, arg0: int) -> int
1112 *
1113 * @par Lua function prototype
1114 * removeBreakPoint(lineno: number) -> number
1115 *
1116 * @par JSON-RPC Request Example
1117 * {"jsonrpc":"2.0","method":"RuntimeMachine.removeBreakPoint","params":[15],"id":1}
1118 *
1119 * @par JSON-RPC Response Example
1120 * {"id":1,"jsonrpc":"2.0","result":0}
1121 *
1122 * \endenglish
1123 */
1124 int removeBreakPoint(int lineno);
1125
1126 /**
1127 * \chinese
1128 * 清除所有断点
1129 *
1130 * @return
1131 *
1132 * @par Python函数原型
1133 * clearBreakPoints(self: pyaubo_sdk.RuntimeMachine) -> int
1134 *
1135 * @par Lua函数原型
1136 * clearBreakPoints() -> number
1137 *
1138 * @par JSON-RPC请求示例
1139 * {"jsonrpc":"2.0","method":"RuntimeMachine.clearBreakPoints","params":[],"id":1}
1140 *
1141 * @par JSON-RPC响应示例
1142 * {"id":1,"jsonrpc":"2.0","result":0}
1143 *
1144 * \endchinese
1145 * \english
1146 * Clear all breakpoints
1147 *
1148 * @return
1149 *
1150 * @par Python function prototype
1151 * clearBreakPoints(self: pyaubo_sdk.RuntimeMachine) -> int
1152 *
1153 * @par Lua function prototype
1154 * clearBreakPoints() -> number
1155 *
1156 * @par JSON-RPC Request Example
1157 * {"jsonrpc":"2.0","method":"RuntimeMachine.clearBreakPoints","params":[],"id":1}
1158 *
1159 * @par JSON-RPC Response Example
1160 * {"id":1,"jsonrpc":"2.0","result":0}
1161 *
1162 * \endenglish
1163 */
1165
1166 /**
1167 * \chinese
1168 * 定时器开始
1169 *
1170 * @param name
1171 * @return
1172 *
1173 * @par Python函数原型
1174 * timerStart(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
1175 *
1176 * @par Lua函数原型
1177 * timerStart(name: string) -> nil
1178 *
1179 * @par JSON-RPC请求示例
1180 * {"jsonrpc":"2.0","method":"RuntimeMachine.timerStart","params":["timer"],"id":1}
1181 *
1182 * @par JSON-RPC响应示例
1183 * {"id":1,"jsonrpc":"2.0","result":0}
1184 *
1185 * \endchinese
1186 * \english
1187 * Start the timer
1188 *
1189 * @param name
1190 * @return
1191 *
1192 * @par Python function prototype
1193 * timerStart(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
1194 *
1195 * @par Lua function prototype
1196 * timerStart(name: string) -> nil
1197 *
1198 * @par JSON-RPC Request Example
1199 * {"jsonrpc":"2.0","method":"RuntimeMachine.timerStart","params":["timer"],"id":1}
1200 *
1201 * @par JSON-RPC Response Example
1202 * {"id":1,"jsonrpc":"2.0","result":0}
1203 *
1204 * \endenglish
1205 */
1206 int timerStart(const std::string &name);
1207
1208 /**
1209 * \chinese
1210 * 定时器结束
1211 *
1212 * @param name
1213 * @return
1214 *
1215 * @par Python函数原型
1216 * timerStop(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
1217 *
1218 * @par Lua函数原型
1219 * timerStop(name: string) -> nil
1220 *
1221 * @par JSON-RPC请求示例
1222 * {"jsonrpc":"2.0","method":"RuntimeMachine.timerStop","params":["timer"],"id":1}
1223 *
1224 * @par JSON-RPC响应示例
1225 * {"id":1,"jsonrpc":"2.0","result":0}
1226 *
1227 * \endchinese
1228 * \english
1229 * Stop the timer
1230 *
1231 * @param name
1232 * @return
1233 *
1234 * @par Python function prototype
1235 * timerStop(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
1236 *
1237 * @par Lua function prototype
1238 * timerStop(name: string) -> nil
1239 *
1240 * @par JSON-RPC Request Example
1241 * {"jsonrpc":"2.0","method":"RuntimeMachine.timerStop","params":["timer"],"id":1}
1242 *
1243 * @par JSON-RPC Response Example
1244 * {"id":1,"jsonrpc":"2.0","result":0}
1245 *
1246 * \endenglish
1247 */
1248 int timerStop(const std::string &name);
1249
1250 /**
1251 * \chinese
1252 * 定时器重置
1253 *
1254 * @param name
1255 * @return
1256 *
1257 * @par Python函数原型
1258 * timerReset(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
1259 *
1260 * @par Lua函数原型
1261 * timerReset(name: string) -> nil
1262 *
1263 * @par JSON-RPC请求示例
1264 * {"jsonrpc":"2.0","method":"RuntimeMachine.timerReset","params":["timer"],"id":1}
1265 *
1266 * @par JSON-RPC响应示例
1267 * {"id":1,"jsonrpc":"2.0","result":0}
1268 *
1269 * \endchinese
1270 * \english
1271 * Reset the timer
1272 *
1273 * @param name
1274 * @return
1275 *
1276 * @par Python function prototype
1277 * timerReset(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
1278 *
1279 * @par Lua function prototype
1280 * timerReset(name: string) -> nil
1281 *
1282 * @par JSON-RPC Request Example
1283 * {"jsonrpc":"2.0","method":"RuntimeMachine.timerReset","params":["timer"],"id":1}
1284 *
1285 * @par JSON-RPC Response Example
1286 * {"id":1,"jsonrpc":"2.0","result":0}
1287 *
1288 * \endenglish
1289 */
1290 int timerReset(const std::string &name);
1291
1292 /**
1293 * \chinese
1294 * 定时器删除
1295 *
1296 * @param name
1297 * @return
1298 *
1299 * @par Python函数原型
1300 * timerDelete(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
1301 *
1302 * @par Lua函数原型
1303 * timerDelete(name: string) -> nil
1304 *
1305 * @par JSON-RPC请求示例
1306 * {"jsonrpc":"2.0","method":"RuntimeMachine.timerDelete","params":["timer"],"id":1}
1307 *
1308 * @par JSON-RPC响应示例
1309 * {"id":1,"jsonrpc":"2.0","result":0}
1310 *
1311 * \endchinese
1312 * \english
1313 * Delete the timer
1314 *
1315 * @param name
1316 * @return
1317 *
1318 * @par Python function prototype
1319 * timerDelete(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
1320 *
1321 * @par Lua function prototype
1322 * timerDelete(name: string) -> nil
1323 *
1324 * @par JSON-RPC Request Example
1325 * {"jsonrpc":"2.0","method":"RuntimeMachine.timerDelete","params":["timer"],"id":1}
1326 *
1327 * @par JSON-RPC Response Example
1328 * {"id":1,"jsonrpc":"2.0","result":0}
1329 *
1330 * \endenglish
1331 */
1332 int timerDelete(const std::string &name);
1333
1334 /**
1335 * \chinese
1336 * 获取定时器数值
1337 *
1338 * @param name
1339 * @return
1340 *
1341 * @par Python函数原型
1342 * getTimer(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> float
1343 *
1344 * @par Lua函数原型
1345 * getTimer(name: string) -> number
1346 *
1347 * @par JSON-RPC请求示例
1348 * {"jsonrpc":"2.0","method":"RuntimeMachine.getTimer","params":["timer"],"id":1}
1349 *
1350 * @par JSON-RPC响应示例
1351 * {"id":1,"jsonrpc":"2.0","result":25.409769612}
1352 *
1353 * \endchinese
1354 * \english
1355 * Get the timer value
1356 *
1357 * @param name
1358 * @return
1359 *
1360 * @par Python function prototype
1361 * getTimer(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> float
1362 *
1363 * @par Lua function prototype
1364 * getTimer(name: string) -> number
1365 *
1366 * @par JSON-RPC Request Example
1367 * {"jsonrpc":"2.0","method":"RuntimeMachine.getTimer","params":["timer"],"id":1}
1368 *
1369 * @par JSON-RPC Response Example
1370 * {"id":1,"jsonrpc":"2.0","result":25.409769612}
1371 *
1372 * \endenglish
1373 */
1374 double getTimer(const std::string &name);
1375
1376 /**
1377 * \chinese
1378 * 开始配置触发
1379 *
1380 * @param distance
1381 * @param delay
1382 * @return
1383 *
1384 * @par JSON-RPC请求示例
1385 * {"jsonrpc":"2.0","method":"RuntimeMachine.triggBegin","params":[],"id":1}
1386 *
1387 * @par JSON-RPC响应示例
1388 * {"id":1,"jsonrpc":"2.0","result":0}
1389 *
1390 * \endchinese
1391 * \english
1392 * Start configuring trigger
1393 *
1394 * @param distance
1395 * @param delay
1396 * @return
1397 *
1398 * @par JSON-RPC Request Example
1399 * {"jsonrpc":"2.0","method":"RuntimeMachine.triggBegin","params":[],"id":1}
1400 *
1401 * @par JSON-RPC Response Example
1402 * {"id":1,"jsonrpc":"2.0","result":0}
1403 *
1404 * \endenglish
1405 */
1406 int triggBegin(double distance, double delay);
1407
1408 /**
1409 * \chinese
1410 * 终止配置触发
1411 *
1412 * @return
1413 *
1414 * @par JSON-RPC请求示例
1415 * {"jsonrpc":"2.0","method":"RuntimeMachine.triggEnd","params":[],"id":1}
1416 *
1417 * @par JSON-RPC响应示例
1418 * {"id":1,"jsonrpc":"2.0","result":0}
1419 *
1420 * \endchinese
1421 * \english
1422 * End configuring trigger
1423 *
1424 * @return
1425 *
1426 * @par JSON-RPC Request Example
1427 * {"jsonrpc":"2.0","method":"RuntimeMachine.triggEnd","params":[],"id":1}
1428 *
1429 * @par JSON-RPC Response Example
1430 * {"id":1,"jsonrpc":"2.0","result":0}
1431 *
1432 * \endenglish
1433 */
1435
1436 /**
1437 * \chinese
1438 * 返回自动分配的中断号
1439 *
1440 * @param distance
1441 * @param delay
1442 * @param intnum
1443 * @return
1444 * \endchinese
1445 * \english
1446 * Returns the automatically assigned interrupt number
1447 *
1448 * @param distance
1449 * @param delay
1450 * @param intnum
1451 * @return
1452 * \endenglish
1453 */
1454 int triggInterrupt(double distance, double delay);
1455
1456 /**
1457 * \chinese
1458 * 获取所有的中断号列表
1459 *
1460 * @return
1461 *
1462 * @par JSON-RPC请求示例
1463 * {"jsonrpc":"2.0","method":"RuntimeMachine.getTriggInterrupts","params":[],"id":1}
1464 *
1465 * @par JSON-RPC响应示例
1466 * {"id":1,"jsonrpc":"2.0","result":[]}
1467 *
1468 * \endchinese
1469 * \english
1470 * Get the list of all interrupt numbers
1471 *
1472 * @return
1473 *
1474 * @par JSON-RPC Request Example
1475 * {"jsonrpc":"2.0","method":"RuntimeMachine.getTriggInterrupts","params":[],"id":1}
1476 *
1477 * @par JSON-RPC Response Example
1478 * {"id":1,"jsonrpc":"2.0","result":[]}
1479 *
1480 * \endenglish
1481 */
1482 std::vector<int> getTriggInterrupts();
1483
1484protected:
1485 void *d_;
1486};
1487
1488using RuntimeMachinePtr = std::shared_ptr<RuntimeMachine>;
1489
1490} // namespace common_interface
1491} // namespace arcs
1492#endif // AUBO_SDK_RUNTIME_MACHINE_H
int arbitraryResume()
恢复解释器(不检查当前点和暂停点距离)
int timerStop(const std::string &name)
定时器结束
int preloadProgram(int index, const std::string &program)
预加载工程文件
double getTimer(const std::string &name)
获取定时器数值
int switchTask(int tid)
切换当前线程,切换之后接下来的指令将被插入切换后的线程中
std::tuple< int, int, std::string > getPlanContext(int tid=-1)
获取当前运行上下文
int abort()
终止机器人运行.
std::string getPreloadProgram(int index)
获取预加载工程文件名字,如果没有加载或者超出索引范围则返回空字符串
int gotoLine(int lineno)
跳转到指定行号
int detachTask(int tid)
等待 task 自然结束
int runProgram()
运行已经加载的工程文件
int timerReset(const std::string &name)
定时器重置
std::tuple< int, int, std::string > getAdvancePlanContext(int tid=-1)
获取提前运行规划器的上下文信息
ARCS_DEPRECATED int setPlanContext(int tid, int lineno, const std::string &comment)
向aubo_control日志中添加注释 使用 setLabel 替换
int triggBegin(double distance, double delay)
开始配置触发
int getAdvancePtr(int tid=-1)
获取AdvanceRun的程序指针
int triggEnd()
终止配置触发
int removeBreakPoint(int lineno)
移除断点
int clearBreakPoints()
清除所有断点
std::tuple< std::string, std::string, int > getExecutionStatus1()
int setBreakPoint(int lineno)
设置断点
int setResumeWait(bool wait)
恢复解释器之前等待恢复前之前的序列完成
int loadProgram(const std::string &program)
加载本地工程文件 Lua 脚本,只需要给出文件名字,不需要后缀,需要从 ${ARCS_WS}/program 目录中查找
ARCS_DEPRECATED RuntimeState getStatus()
获取规划器的状态
int getInterpPtr(int tid)
获取最近解释过的指令指针
int clearPreloadPrograms()
清除所有已预加载的工程文件 调用此方法将释放所有通过 preloadProgram 预加载的工程索引及其关联的工程名称
int getTaskQueueSize(int tid)
获取任务中缓存的指令的数量
std::vector< int > getTriggInterrupts()
获取所有的中断号列表
int deleteTask(int tid)
删除 task,会终止正在执行的运动
int newTask(bool daemon=false)
返回 task_id
int triggInterrupt(double distance, double delay)
返回自动分配的中断号
int timerDelete(const std::string &name)
定时器删除
int getMainPtr(int tid=-1)
获取机器人运动的程序指针
int timerStart(const std::string &name)
定时器开始
std::tuple< std::string, std::string > getExecutionStatus()
获取耗时的接口(INST)执行状态, 如 setPersistentParameters
bool isTaskAlive(int tid)
判断任务是否存活
int setLabel(int lineno, const std::string &comment)
标记记下来的指令的行号和注释
int stop()
停止运行时即脚本运行,无法停止运行时状态为 Stopped 时的机器人运动
std::shared_ptr< RuntimeMachine > RuntimeMachinePtr
数据类型的定义