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 *
628 * @return
629 *
630 * @par JSON-RPC请求示例
631 * {"jsonrpc":"2.0","method":"RuntimeMachine.runProgram","params":[],"id":1}
632 *
633 * @par JSON-RPC响应示例
634 * {"id":1,"jsonrpc":"2.0","result":0}
635 *
636 * \endchinese
637 * \english
638 * Run the already loaded project file
639 *
640 * @return
641 *
642 * @par JSON-RPC Request Example
643 * {"jsonrpc":"2.0","method":"RuntimeMachine.runProgram","params":[],"id":1}
644 *
645 * @par JSON-RPC Response Example
646 * {"id":1,"jsonrpc":"2.0","result":0}
647 *
648 * \endenglish
649 */
651
652 /**
653 * \chinese
654 * 开始运行时
655 *
656 * @return
657 *
658 * @par Python函数原型
659 * start(self: pyaubo_sdk.RuntimeMachine) -> int
660 *
661 * @par Lua函数原型
662 * start() -> number
663 *
664 * @par JSON-RPC请求示例
665 * {"jsonrpc":"2.0","method":"RuntimeMachine.start","params":[],"id":1}
666 *
667 * @par JSON-RPC响应示例
668 * {"id":1,"jsonrpc":"2.0","result":0}
669 *
670 * \endchinese
671 * \english
672 * Start the runtime
673 *
674 * @return
675 *
676 * @par Python function prototype
677 * start(self: pyaubo_sdk.RuntimeMachine) -> int
678 *
679 * @par Lua function prototype
680 * start() -> number
681 *
682 * @par JSON-RPC Request Example
683 * {"jsonrpc":"2.0","method":"RuntimeMachine.start","params":[],"id":1}
684 *
685 * @par JSON-RPC Response Example
686 * {"id":1,"jsonrpc":"2.0","result":0}
687 *
688 * \endenglish
689 */
690 int start();
691
692 /**
693 * \chinese
694 * 停止运行时即脚本运行,无法停止运行时状态为 Stopped 时的机器人运动
695 *
696 * 如果考虑停止机器人所有运动,可以调用 RuntimeMachine::abort 接口
697 *
698 * @return
699 *
700 * @par Python函数原型
701 * stop(self: pyaubo_sdk.RuntimeMachine) -> int
702 *
703 * @par Lua函数原型
704 * stop() -> number
705 *
706 * @par JSON-RPC请求示例
707 * {"jsonrpc":"2.0","method":"RuntimeMachine.stop","params":[],"id":1}
708 *
709 * @par JSON-RPC响应示例
710 * {"id":1,"jsonrpc":"2.0","result":0}
711 *
712 * \endchinese
713 * \english
714 * Stop the runtime, i.e., stop script execution. Cannot stop robot motion
715 * when the runtime state is Stopped.
716 *
717 * If you want to stop all robot motion, use the RuntimeMachine::abort
718 * interface.
719 *
720 * @return
721 *
722 * @par Python function prototype
723 * stop(self: pyaubo_sdk.RuntimeMachine) -> int
724 *
725 * @par Lua function prototype
726 * stop() -> number
727 *
728 * @par JSON-RPC Request Example
729 * {"jsonrpc":"2.0","method":"RuntimeMachine.stop","params":[],"id":1}
730 *
731 * @par JSON-RPC Response Example
732 * {"id":1,"jsonrpc":"2.0","result":0}
733 *
734 * \endenglish
735 */
736 int stop();
737
738 /**
739 * \chinese
740 * 终止机器人运行.
741 *
742 * 如果只是考虑停止运行时,可以调用 RuntimeMachine::stop 接口
743 *
744 * 如果脚本运行时处于 Running 状态,则终止运行时;如果运行时处于 Stopped
745 * 且机器人正在移动,则停止机器人移动;如果此时力控开启了,则机器人停止力控
746 *
747 * @return
748 *
749 * @par Python函数原型
750 * abort(self: pyaubo_sdk.RuntimeMachine) -> int
751 *
752 * @par Lua函数原型
753 * abort() -> number
754 *
755 * @par JSON-RPC请求示例
756 * {"jsonrpc":"2.0","method":"RuntimeMachine.abort","params":[],"id":1}
757 *
758 * @par JSON-RPC响应示例
759 * {"id":1,"jsonrpc":"2.0","result":0}
760 *
761 * \endchinese
762 * \english
763 * Abort robot operation.
764 *
765 * If you only want to stop the runtime, you can call the
766 * RuntimeMachine::stop interface.
767 *
768 * If the script runtime is in the Running state, aborts the runtime; if the
769 * runtime is Stopped and the robot is moving, stops the robot motion; if
770 * force control is enabled, stops force control.
771 *
772 * @return
773 *
774 * @par Python function prototype
775 * abort(self: pyaubo_sdk.RuntimeMachine) -> int
776 *
777 * @par Lua function prototype
778 * abort() -> number
779 *
780 * @par JSON-RPC Request Example
781 * {"jsonrpc":"2.0","method":"RuntimeMachine.abort","params":[],"id":1}
782 *
783 * @par JSON-RPC Response Example
784 * {"id":1,"jsonrpc":"2.0","result":0}
785 *
786 * \endenglish
787 */
788 int abort();
789
790 /**
791 * \chinese
792 * 暂停解释器
793 *
794 * @return
795 *
796 * @par Python函数原型
797 * pause(self: pyaubo_sdk.RuntimeMachine) -> int
798 *
799 * @par Lua函数原型
800 * pause() -> number
801 *
802 * @par JSON-RPC请求示例
803 * {"jsonrpc":"2.0","method":"RuntimeMachine.pause","params":[],"id":1}
804 *
805 * @par JSON-RPC响应示例
806 * {"id":1,"jsonrpc":"2.0","result":0}
807 *
808 * \endchinese
809 * \english
810 * Pause the interpreter
811 *
812 * @return
813 *
814 * @par Python function prototype
815 * pause(self: pyaubo_sdk.RuntimeMachine) -> int
816 *
817 * @par Lua function prototype
818 * pause() -> number
819 *
820 * @par JSON-RPC Request Example
821 * {"jsonrpc":"2.0","method":"RuntimeMachine.pause","params":[],"id":1}
822 *
823 * @par JSON-RPC Response Example
824 * {"id":1,"jsonrpc":"2.0","result":0}
825 *
826 * \endenglish
827 */
828 int pause();
829
830 /**
831 * \chinese
832 * 单步运行
833 *
834 * @return
835 *
836 * @par Python函数原型
837 * step(self: pyaubo_sdk.RuntimeMachine) -> int
838 *
839 * @par Lua函数原型
840 * step() -> number
841 *
842 * @par JSON-RPC请求示例
843 * {"jsonrpc":"2.0","method":"RuntimeMachine.step","params":[],"id":1}
844 *
845 * @par JSON-RPC响应示例
846 * {"id":1,"jsonrpc":"2.0","result":0}
847 *
848 * \endchinese
849 * \english
850 * Execute a single step
851 *
852 * @return
853 *
854 * @par Python function prototype
855 * step(self: pyaubo_sdk.RuntimeMachine) -> int
856 *
857 * @par Lua function prototype
858 * step() -> number
859 *
860 * @par JSON-RPC Request Example
861 * {"jsonrpc":"2.0","method":"RuntimeMachine.step","params":[],"id":1}
862 *
863 * @par JSON-RPC Response Example
864 * {"id":1,"jsonrpc":"2.0","result":0}
865 *
866 * \endenglish
867 */
868 int step();
869
870 /**
871 * \chinese
872 * 恢复解释器
873 *
874 * @return
875 *
876 * @par Python函数原型
877 * resume(self: pyaubo_sdk.RuntimeMachine) -> int
878 *
879 * @par Lua函数原型
880 * resume() -> number
881 *
882 * @par JSON-RPC请求示例
883 * {"jsonrpc":"2.0","method":"RuntimeMachine.resume","params":[],"id":1}
884 *
885 * @par JSON-RPC响应示例
886 * {"id":1,"jsonrpc":"2.0","result":0}
887 *
888 * \endchinese
889 * \english
890 * Resume the interpreter
891 *
892 * @return
893 *
894 * @par Python function prototype
895 * resume(self: pyaubo_sdk.RuntimeMachine) -> int
896 *
897 * @par Lua function prototype
898 * resume() -> number
899 *
900 * @par JSON-RPC Request Example
901 * {"jsonrpc":"2.0","method":"RuntimeMachine.resume","params":[],"id":1}
902 *
903 * @par JSON-RPC Response Example
904 * {"id":1,"jsonrpc":"2.0","result":0}
905 *
906 * \endenglish
907 */
908 int resume();
909
910 /**
911 * \chinese
912 * 恢复解释器(不检查当前点和暂停点距离)
913 *
914 * @return
915 *
916 * @par Python函数原型
917 * arbitraryResume(self: pyaubo_sdk.RuntimeMachine) -> int
918 *
919 * @par Lua函数原型
920 * arbitraryResume() -> number
921 *
922 * @par JSON-RPC请求示例
923 * {"jsonrpc":"2.0","method":"RuntimeMachine.arbitraryResume","params":[],"id":1}
924 *
925 * @par JSON-RPC响应示例
926 * {"id":1,"jsonrpc":"2.0","result":0}
927 *
928 * \endchinese
929 * \english
930 * Resume the interpreter
931 *
932 * @return
933 *
934 * @par Python function prototype
935 * arbitraryResume(self: pyaubo_sdk.RuntimeMachine) -> int
936 *
937 * @par Lua function prototype
938 * arbitraryResume() -> number
939 *
940 * @par JSON-RPC Request Example
941 * {"jsonrpc":"2.0","method":"RuntimeMachine.arbitraryResume","params":[],"id":1}
942 *
943 * @par JSON-RPC Response Example
944 * {"id":1,"jsonrpc":"2.0","result":0}
945 *
946 * \endenglish
947 */
949
950 /**
951 * \chinese
952 * 恢复解释器之前等待恢复前之前的序列完成
953 *
954 * @param wait
955 * @return
956 *
957 * @par JSON-RPC请求示例
958 * {"jsonrpc":"2.0","method":"RuntimeMachine.setResumeWait","params":[true],"id":1}
959 *
960 * @par JSON-RPC响应示例
961 * {"id":1,"jsonrpc":"2.0","result":0}
962 *
963 * \endchinese
964 * \english
965 * Wait for the previous sequence to complete before resuming the
966 * interpreter
967 *
968 * @param wait
969 * @return
970 *
971 * @par JSON-RPC Request Example
972 * {"jsonrpc":"2.0","method":"RuntimeMachine.setResumeWait","params":[true],"id":1}
973 *
974 * @par JSON-RPC Response Example
975 * {"id":1,"jsonrpc":"2.0","result":0}
976 *
977 * \endenglish
978 */
979 int setResumeWait(bool wait);
980
981 /**
982 * \chinese
983 * 获取规划器的状态
984 *
985 * @return
986 *
987 * @par Python函数原型
988 * getStatus(self: pyaubo_sdk.RuntimeMachine) ->
989 * arcs::common_interface::RuntimeState
990 *
991 * @par Lua函数原型
992 * getStatus() -> number
993 *
994 * @par JSON-RPC请求示例
995 * {"jsonrpc":"2.0","method":"RuntimeMachine.getStatus","params":[],"id":1}
996 *
997 * @par JSON-RPC响应示例
998 * {"id":1,"jsonrpc":"2.0","result":"Running"}
999 *
1000 * \endchinese
1001 * \english
1002 * Get the status of the planner
1003 *
1004 * @return
1005 *
1006 * @par Python function prototype
1007 * getStatus(self: pyaubo_sdk.RuntimeMachine) ->
1008 * arcs::common_interface::RuntimeState
1009 *
1010 * @par Lua function prototype
1011 * getStatus() -> number
1012 *
1013 * @par JSON-RPC Request Example
1014 * {"jsonrpc":"2.0","method":"RuntimeMachine.getStatus","params":[],"id":1}
1015 *
1016 * @par JSON-RPC Response Example
1017 * {"id":1,"jsonrpc":"2.0","result":"Running"}
1018 *
1019 * \endenglish
1020 */
1021 ARCS_DEPRECATED RuntimeState getStatus();
1023
1024 /**
1025 * \chinese
1026 * 设置断点
1027 *
1028 * @param lineno
1029 * @return
1030 *
1031 * @par Python函数原型
1032 * setBreakPoint(self: pyaubo_sdk.RuntimeMachine, arg0: int) -> int
1033 *
1034 * @par Lua函数原型
1035 * setBreakPoint(lineno: number) -> number
1036 *
1037 * @par JSON-RPC请求示例
1038 * {"jsonrpc":"2.0","method":"RuntimeMachine.setBreakPoint","params":[15],"id":1}
1039 *
1040 * @par JSON-RPC响应示例
1041 * {"id":1,"jsonrpc":"2.0","result":0}
1042 *
1043 * \endchinese
1044 * \english
1045 * Set a breakpoint
1046 *
1047 * @param lineno
1048 * @return
1049 *
1050 * @par Python function prototype
1051 * setBreakPoint(self: pyaubo_sdk.RuntimeMachine, arg0: int) -> int
1052 *
1053 * @par Lua function prototype
1054 * setBreakPoint(lineno: number) -> number
1055 *
1056 * @par JSON-RPC Request Example
1057 * {"jsonrpc":"2.0","method":"RuntimeMachine.setBreakPoint","params":[15],"id":1}
1058 *
1059 * @par JSON-RPC Response Example
1060 * {"id":1,"jsonrpc":"2.0","result":0}
1061 *
1062 * \endenglish
1063 */
1064 int setBreakPoint(int lineno);
1065
1066 /**
1067 * \chinese
1068 * 移除断点
1069 *
1070 * @param lineno
1071 * @return
1072 *
1073 * @par Python函数原型
1074 * removeBreakPoint(self: pyaubo_sdk.RuntimeMachine, arg0: int) -> int
1075 *
1076 * @par Lua函数原型
1077 * removeBreakPoint(lineno: number) -> number
1078 *
1079 * @par JSON-RPC请求示例
1080 * {"jsonrpc":"2.0","method":"RuntimeMachine.removeBreakPoint","params":[15],"id":1}
1081 *
1082 * @par JSON-RPC响应示例
1083 * {"id":1,"jsonrpc":"2.0","result":0}
1084 *
1085 * \endchinese
1086 * \english
1087 * Remove a breakpoint
1088 *
1089 * @param lineno
1090 * @return
1091 *
1092 * @par Python function prototype
1093 * removeBreakPoint(self: pyaubo_sdk.RuntimeMachine, arg0: int) -> int
1094 *
1095 * @par Lua function prototype
1096 * removeBreakPoint(lineno: number) -> number
1097 *
1098 * @par JSON-RPC Request Example
1099 * {"jsonrpc":"2.0","method":"RuntimeMachine.removeBreakPoint","params":[15],"id":1}
1100 *
1101 * @par JSON-RPC Response Example
1102 * {"id":1,"jsonrpc":"2.0","result":0}
1103 *
1104 * \endenglish
1105 */
1106 int removeBreakPoint(int lineno);
1107
1108 /**
1109 * \chinese
1110 * 清除所有断点
1111 *
1112 * @return
1113 *
1114 * @par Python函数原型
1115 * clearBreakPoints(self: pyaubo_sdk.RuntimeMachine) -> int
1116 *
1117 * @par Lua函数原型
1118 * clearBreakPoints() -> number
1119 *
1120 * @par JSON-RPC请求示例
1121 * {"jsonrpc":"2.0","method":"RuntimeMachine.clearBreakPoints","params":[],"id":1}
1122 *
1123 * @par JSON-RPC响应示例
1124 * {"id":1,"jsonrpc":"2.0","result":0}
1125 *
1126 * \endchinese
1127 * \english
1128 * Clear all breakpoints
1129 *
1130 * @return
1131 *
1132 * @par Python function prototype
1133 * clearBreakPoints(self: pyaubo_sdk.RuntimeMachine) -> int
1134 *
1135 * @par Lua function prototype
1136 * clearBreakPoints() -> number
1137 *
1138 * @par JSON-RPC Request Example
1139 * {"jsonrpc":"2.0","method":"RuntimeMachine.clearBreakPoints","params":[],"id":1}
1140 *
1141 * @par JSON-RPC Response Example
1142 * {"id":1,"jsonrpc":"2.0","result":0}
1143 *
1144 * \endenglish
1145 */
1147
1148 /**
1149 * \chinese
1150 * 定时器开始
1151 *
1152 * @param name
1153 * @return
1154 *
1155 * @par Python函数原型
1156 * timerStart(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
1157 *
1158 * @par Lua函数原型
1159 * timerStart(name: string) -> nil
1160 *
1161 * @par JSON-RPC请求示例
1162 * {"jsonrpc":"2.0","method":"RuntimeMachine.timerStart","params":["timer"],"id":1}
1163 *
1164 * @par JSON-RPC响应示例
1165 * {"id":1,"jsonrpc":"2.0","result":0}
1166 *
1167 * \endchinese
1168 * \english
1169 * Start the timer
1170 *
1171 * @param name
1172 * @return
1173 *
1174 * @par Python function prototype
1175 * timerStart(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
1176 *
1177 * @par Lua function prototype
1178 * timerStart(name: string) -> nil
1179 *
1180 * @par JSON-RPC Request Example
1181 * {"jsonrpc":"2.0","method":"RuntimeMachine.timerStart","params":["timer"],"id":1}
1182 *
1183 * @par JSON-RPC Response Example
1184 * {"id":1,"jsonrpc":"2.0","result":0}
1185 *
1186 * \endenglish
1187 */
1188 int timerStart(const std::string &name);
1189
1190 /**
1191 * \chinese
1192 * 定时器结束
1193 *
1194 * @param name
1195 * @return
1196 *
1197 * @par Python函数原型
1198 * timerStop(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
1199 *
1200 * @par Lua函数原型
1201 * timerStop(name: string) -> nil
1202 *
1203 * @par JSON-RPC请求示例
1204 * {"jsonrpc":"2.0","method":"RuntimeMachine.timerStop","params":["timer"],"id":1}
1205 *
1206 * @par JSON-RPC响应示例
1207 * {"id":1,"jsonrpc":"2.0","result":0}
1208 *
1209 * \endchinese
1210 * \english
1211 * Stop the timer
1212 *
1213 * @param name
1214 * @return
1215 *
1216 * @par Python function prototype
1217 * timerStop(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
1218 *
1219 * @par Lua function prototype
1220 * timerStop(name: string) -> nil
1221 *
1222 * @par JSON-RPC Request Example
1223 * {"jsonrpc":"2.0","method":"RuntimeMachine.timerStop","params":["timer"],"id":1}
1224 *
1225 * @par JSON-RPC Response Example
1226 * {"id":1,"jsonrpc":"2.0","result":0}
1227 *
1228 * \endenglish
1229 */
1230 int timerStop(const std::string &name);
1231
1232 /**
1233 * \chinese
1234 * 定时器重置
1235 *
1236 * @param name
1237 * @return
1238 *
1239 * @par Python函数原型
1240 * timerReset(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
1241 *
1242 * @par Lua函数原型
1243 * timerReset(name: string) -> nil
1244 *
1245 * @par JSON-RPC请求示例
1246 * {"jsonrpc":"2.0","method":"RuntimeMachine.timerReset","params":["timer"],"id":1}
1247 *
1248 * @par JSON-RPC响应示例
1249 * {"id":1,"jsonrpc":"2.0","result":0}
1250 *
1251 * \endchinese
1252 * \english
1253 * Reset the timer
1254 *
1255 * @param name
1256 * @return
1257 *
1258 * @par Python function prototype
1259 * timerReset(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
1260 *
1261 * @par Lua function prototype
1262 * timerReset(name: string) -> nil
1263 *
1264 * @par JSON-RPC Request Example
1265 * {"jsonrpc":"2.0","method":"RuntimeMachine.timerReset","params":["timer"],"id":1}
1266 *
1267 * @par JSON-RPC Response Example
1268 * {"id":1,"jsonrpc":"2.0","result":0}
1269 *
1270 * \endenglish
1271 */
1272 int timerReset(const std::string &name);
1273
1274 /**
1275 * \chinese
1276 * 定时器删除
1277 *
1278 * @param name
1279 * @return
1280 *
1281 * @par Python函数原型
1282 * timerDelete(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
1283 *
1284 * @par Lua函数原型
1285 * timerDelete(name: string) -> nil
1286 *
1287 * @par JSON-RPC请求示例
1288 * {"jsonrpc":"2.0","method":"RuntimeMachine.timerDelete","params":["timer"],"id":1}
1289 *
1290 * @par JSON-RPC响应示例
1291 * {"id":1,"jsonrpc":"2.0","result":0}
1292 *
1293 * \endchinese
1294 * \english
1295 * Delete the timer
1296 *
1297 * @param name
1298 * @return
1299 *
1300 * @par Python function prototype
1301 * timerDelete(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
1302 *
1303 * @par Lua function prototype
1304 * timerDelete(name: string) -> nil
1305 *
1306 * @par JSON-RPC Request Example
1307 * {"jsonrpc":"2.0","method":"RuntimeMachine.timerDelete","params":["timer"],"id":1}
1308 *
1309 * @par JSON-RPC Response Example
1310 * {"id":1,"jsonrpc":"2.0","result":0}
1311 *
1312 * \endenglish
1313 */
1314 int timerDelete(const std::string &name);
1315
1316 /**
1317 * \chinese
1318 * 获取定时器数值
1319 *
1320 * @param name
1321 * @return
1322 *
1323 * @par Python函数原型
1324 * getTimer(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> float
1325 *
1326 * @par Lua函数原型
1327 * getTimer(name: string) -> number
1328 *
1329 * @par JSON-RPC请求示例
1330 * {"jsonrpc":"2.0","method":"RuntimeMachine.getTimer","params":["timer"],"id":1}
1331 *
1332 * @par JSON-RPC响应示例
1333 * {"id":1,"jsonrpc":"2.0","result":25.409769612}
1334 *
1335 * \endchinese
1336 * \english
1337 * Get the timer value
1338 *
1339 * @param name
1340 * @return
1341 *
1342 * @par Python function prototype
1343 * getTimer(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> float
1344 *
1345 * @par Lua function prototype
1346 * getTimer(name: string) -> number
1347 *
1348 * @par JSON-RPC Request Example
1349 * {"jsonrpc":"2.0","method":"RuntimeMachine.getTimer","params":["timer"],"id":1}
1350 *
1351 * @par JSON-RPC Response Example
1352 * {"id":1,"jsonrpc":"2.0","result":25.409769612}
1353 *
1354 * \endenglish
1355 */
1356 double getTimer(const std::string &name);
1357
1358 /**
1359 * \chinese
1360 * 开始配置触发
1361 *
1362 * @param distance
1363 * @param delay
1364 * @return
1365 *
1366 * @par JSON-RPC请求示例
1367 * {"jsonrpc":"2.0","method":"RuntimeMachine.triggBegin","params":[],"id":1}
1368 *
1369 * @par JSON-RPC响应示例
1370 * {"id":1,"jsonrpc":"2.0","result":0}
1371 *
1372 * \endchinese
1373 * \english
1374 * Start configuring trigger
1375 *
1376 * @param distance
1377 * @param delay
1378 * @return
1379 *
1380 * @par JSON-RPC Request Example
1381 * {"jsonrpc":"2.0","method":"RuntimeMachine.triggBegin","params":[],"id":1}
1382 *
1383 * @par JSON-RPC Response Example
1384 * {"id":1,"jsonrpc":"2.0","result":0}
1385 *
1386 * \endenglish
1387 */
1388 int triggBegin(double distance, double delay);
1389
1390 /**
1391 * \chinese
1392 * 终止配置触发
1393 *
1394 * @return
1395 *
1396 * @par JSON-RPC请求示例
1397 * {"jsonrpc":"2.0","method":"RuntimeMachine.triggEnd","params":[],"id":1}
1398 *
1399 * @par JSON-RPC响应示例
1400 * {"id":1,"jsonrpc":"2.0","result":0}
1401 *
1402 * \endchinese
1403 * \english
1404 * End configuring trigger
1405 *
1406 * @return
1407 *
1408 * @par JSON-RPC Request Example
1409 * {"jsonrpc":"2.0","method":"RuntimeMachine.triggEnd","params":[],"id":1}
1410 *
1411 * @par JSON-RPC Response Example
1412 * {"id":1,"jsonrpc":"2.0","result":0}
1413 *
1414 * \endenglish
1415 */
1417
1418 /**
1419 * \chinese
1420 * 返回自动分配的中断号
1421 *
1422 * @param distance
1423 * @param delay
1424 * @param intnum
1425 * @return
1426 * \endchinese
1427 * \english
1428 * Returns the automatically assigned interrupt number
1429 *
1430 * @param distance
1431 * @param delay
1432 * @param intnum
1433 * @return
1434 * \endenglish
1435 */
1436 int triggInterrupt(double distance, double delay);
1437
1438 /**
1439 * \chinese
1440 * 获取所有的中断号列表
1441 *
1442 * @return
1443 *
1444 * @par JSON-RPC请求示例
1445 * {"jsonrpc":"2.0","method":"RuntimeMachine.getTriggInterrupts","params":[],"id":1}
1446 *
1447 * @par JSON-RPC响应示例
1448 * {"id":1,"jsonrpc":"2.0","result":[]}
1449 *
1450 * \endchinese
1451 * \english
1452 * Get the list of all interrupt numbers
1453 *
1454 * @return
1455 *
1456 * @par JSON-RPC Request Example
1457 * {"jsonrpc":"2.0","method":"RuntimeMachine.getTriggInterrupts","params":[],"id":1}
1458 *
1459 * @par JSON-RPC Response Example
1460 * {"id":1,"jsonrpc":"2.0","result":[]}
1461 *
1462 * \endenglish
1463 */
1464 std::vector<int> getTriggInterrupts();
1465
1466protected:
1467 void *d_;
1468};
1469
1470using RuntimeMachinePtr = std::shared_ptr<RuntimeMachine>;
1471
1472} // namespace common_interface
1473} // namespace arcs
1474#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 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
数据类型的定义