ARCS SDK API  0.25.0
载入中...
搜索中...
未找到
robot_config.h
浏览该文件的文档.
1/** @file robot_config.h
2 * @brief 获取机器人配置接口,如获取DH参数、碰撞等级、安装位姿等等
3 */
4#ifndef AUBO_SDK_ROBOT_CONFIG_H
5#define AUBO_SDK_ROBOT_CONFIG_H
6
7#include <vector>
8#include <unordered_map>
9
10#include <aubo/global_config.h>
11#include <aubo/type_def.h>
12
13namespace arcs {
14namespace common_interface {
15
16class ARCS_ABI_EXPORT RobotConfig
17{
18public:
20 virtual ~RobotConfig();
21
22 /**
23 * 获取机器人的名字
24 *
25 * @return 返回机器人的名字
26 *
27 * @throws arcs::common_interface::AuboException
28 *
29 * @par Python函数原型
30 * getName(self: pyaubo_sdk.RobotConfig) -> str
31 *
32 * @par Lua函数原型
33 * getName() -> string
34 *
35 * @par JSON-RPC请求示例
36 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getName","params":[],"id":1}
37 *
38 * @par JSON-RPC响应示例
39 * {"id":1,"jsonrpc":"2.0","result":"rob1"}
40 *
41 */
42 std::string getName();
43
44 /**
45 * 获取机器人的自由度(从硬件抽象层读取)
46 *
47 * @return 返回机器人的自由度
48 *
49 * @throws arcs::common_interface::AuboException
50 *
51 * @par Python函数原型
52 * getDof(self: pyaubo_sdk.RobotConfig) -> int
53 *
54 * @par Lua函数原型
55 * getDof() -> number
56 *
57 * @par JSON-RPC请求示例
58 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getDof","params":[],"id":1}
59 *
60 * @par JSON-RPC响应示例
61 * {"id":1,"jsonrpc":"2.0","result":6}
62 *
63 */
64 int getDof();
65
66 /**
67 * 获取机器人的伺服控制周期(从硬件抽象层读取)
68 *
69 * @return 机器人的伺服控制周期
70 *
71 * @throws arcs::common_interface::AuboException
72 *
73 * @par Python函数原型
74 * getCycletime(self: pyaubo_sdk.RobotConfig) -> float
75 *
76 * @par Lua函数原型
77 * getCycletime() -> number
78 *
79 * @par JSON-RPC请求示例
80 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getCycletime","params":[],"id":1}
81 *
82 * @par JSON-RPC响应示例
83 * {"id":1,"jsonrpc":"2.0","result":0.005}
84 *
85 */
86 double getCycletime();
87
88 /**
89 * 预设缓速模式下的速度缩减比例
90 *
91 * @param level 缓速等级 1, 2
92 * @param fraction
93 *
94 * @return 成功返回0;失败返回错误码
95 * AUBO_BUSY
96 * AUBO_BAD_STATE
97 * AUBO_INVL_ARGUMENT
98 * -AUBO_BAD_STATE
99 *
100 * @throws arcs::common_interface::AuboException
101 *
102 * @par JSON-RPC请求示例
103 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.setSlowDownFraction","params":[1,0.8],"id":1}
104 *
105 * @par JSON-RPC响应示例
106 * {"id":1,"jsonrpc":"2.0","result":0}
107 *
108 */
109 int setSlowDownFraction(int level, double fraction);
110
111 /**
112 * 获取预设的缓速模式下的速度缩减比例
113 *
114 * @param level 缓速等级 1, 2
115 * @return 返回预设的缓速模式下的速度缩减比例
116 *
117 * @throws arcs::common_interface::AuboException
118 *
119 * @par JSON-RPC请求示例
120 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getSlowDownFraction","params":[1],"id":1}
121 *
122 * @par JSON-RPC响应示例
123 * {"id":1,"jsonrpc":"2.0","result":0.5}
124 *
125 */
126 double getSlowDownFraction(int level);
127
128 /**
129 * 获取默认的工具端加速度,单位m/s^2
130 *
131 * @return 默认的工具端加速度
132 *
133 * @throws arcs::common_interface::AuboException
134 *
135 * @par Python函数原型
136 * getDefaultToolAcc(self: pyaubo_sdk.RobotConfig) -> float
137 *
138 * @par Lua函数原型
139 * getDefaultToolAcc() -> number
140 *
141 * @par JSON-RPC请求示例
142 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getDefaultToolAcc","params":[],"id":1}
143 *
144 * @par JSON-RPC响应示例
145 * {"id":1,"jsonrpc":"2.0","result":0.0}
146 */
148
149 /**
150 * 获取默认的工具端速度,单位m/s
151 *
152 * @return 默认的工具端速度
153 *
154 * @throws arcs::common_interface::AuboException
155 *
156 * @par Python函数原型
157 * getDefaultToolSpeed(self: pyaubo_sdk.RobotConfig) -> float
158 *
159 * @par Lua函数原型
160 * getDefaultToolSpeed() -> number
161 *
162 * @par JSON-RPC请求示例
163 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getDefaultToolSpeed","params":[],"id":1}
164 *
165 * @par JSON-RPC响应示例
166 * {"id":1,"jsonrpc":"2.0","result":0.0}
167 *
168 */
170
171 /**
172 * 获取默认的关节加速度,单位rad/s^2
173 *
174 * @return 默认的关节加速度
175 *
176 * @throws arcs::common_interface::AuboException
177 *
178 * @par Python函数原型
179 * getDefaultJointAcc(self: pyaubo_sdk.RobotConfig) -> float
180 *
181 * @par Lua函数原型
182 * getDefaultJointAcc() -> number
183 *
184 * @par JSON-RPC请求示例
185 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getDefaultJointAcc","params":[],"id":1}
186 *
187 * @par JSON-RPC响应示例
188 * {"id":1,"jsonrpc":"2.0","result":0.0}
189 *
190 */
192
193 /**
194 * 获取默认的关节速度,单位rad/s
195 *
196 * @return 默认的关节速度
197 *
198 * @throws arcs::common_interface::AuboException
199 *
200 * @par Python函数原型
201 * getDefaultJointSpeed(self: pyaubo_sdk.RobotConfig) -> float
202 *
203 * @par Lua函数原型
204 * getDefaultJointSpeed() -> number
205 *
206 * @par JSON-RPC请求示例
207 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getDefaultJointSpeed","params":[],"id":1}
208 *
209 * @par JSON-RPC响应示例
210 * {"id":1,"jsonrpc":"2.0","result":0.0}
211 *
212 */
214
215 /**
216 * 获取机器人类型代码
217 *
218 * @return 机器人类型代码
219 *
220 * @throws arcs::common_interface::AuboException
221 *
222 * @par Python函数原型
223 * getRobotType(self: pyaubo_sdk.RobotConfig) -> str
224 *
225 * @par Lua函数原型
226 * getRobotType() -> string
227 *
228 * @par JSON-RPC请求示例
229 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getRobotType","params":[],"id":1}
230 *
231 * @par JSON-RPC响应示例
232 * {"id":1,"jsonrpc":"2.0","result":"aubo_i5H"}
233 *
234 */
235 std::string getRobotType();
236
237 /**
238 * 获取机器人子类型代码
239 *
240 * @return 机器人子类型代码
241 *
242 * @throws arcs::common_interface::AuboException
243 *
244 * @par Python函数原型
245 * getRobotSubType(self: pyaubo_sdk.RobotConfig) -> str
246 *
247 * @par Lua函数原型
248 * getRobotSubType() -> string
249 *
250 * @par JSON-RPC请求示例
251 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getRobotSubType","params":[],"id":1}
252 *
253 * @par JSON-RPC响应示例
254 * {"id":1,"jsonrpc":"2.0","result":"B0"}
255 *
256 */
257 std::string getRobotSubType();
258
259 /**
260 * 获取控制柜类型代码
261 *
262 * @return 控制柜类型代码
263 *
264 * @throws arcs::common_interface::AuboException
265 *
266 * @par Python函数原型
267 * getControlBoxType(self: pyaubo_sdk.RobotConfig) -> str
268 *
269 * @par Lua函数原型
270 * getControlBoxType() -> string
271 *
272 * @par JSON-RPC请求示例
273 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getControlBoxType","params":[],"id":1}
274 *
275 * @par JSON-RPC响应示例
276 * {"id":1,"jsonrpc":"2.0","result":"cb_ISStation"}
277 *
278 */
279 std::string getControlBoxType();
280
281 /**
282 * 设置安装位姿(机器人的基坐标系相对于世界坐标系) world->base
283 *
284 * 一般在多机器人系统中使用,默认为 [0,0,0,0,0,0]
285 *
286 * @param pose 安装位姿
287 * @return 成功返回0; 失败返回错误码
288 * AUBO_BUSY
289 * AUBO_BAD_STATE
290 * -AUBO_INVL_ARGUMENT
291 * -AUBO_BAD_STATE
292 *
293 * @throws arcs::common_interface::AuboException
294 *
295 * @par Python函数原型
296 * setMountingPose(self: pyaubo_sdk.RobotConfig, arg0: List[float]) -> int
297 *
298 * @par Lua函数原型
299 * setMountingPose(pose: table) -> nil
300 *
301 * @par JSON-RPC请求示例
302 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.setMountingPose","params":[[0.0,0.0,0.0,0.0,0.0,0.0]],"id":1}
303 *
304 * @par JSON-RPC响应示例
305 * {"id":1,"jsonrpc":"2.0","result":0}
306 *
307 */
308 int setMountingPose(const std::vector<double> &pose);
309
310 /**
311 * 获取安装位姿(机器人的基坐标系相对于世界坐标系)
312 *
313 * @return 安装位姿
314 *
315 * @throws arcs::common_interface::AuboException
316 *
317 * @par Python函数原型
318 * getMountingPose(self: pyaubo_sdk.RobotConfig) -> List[float]
319 *
320 * @par Lua函数原型
321 * getMountingPose() -> table
322 *
323 * @par JSON-RPC请求示例
324 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getMountingPose","params":[],"id":1}
325 *
326 * @par JSON-RPC响应示例
327 * {"id":1,"jsonrpc":"2.0","result":[0.0,0.0,0.0,0.0,0.0,0.0]}
328 *
329 */
330 std::vector<double> getMountingPose();
331
332 // 将机器人绑定到一个坐标系,如果这个坐标系是运动的,那机器人也会跟着运动
333 // 应用于地轨或者龙门
334 // 这个函数调用的时候 frame 和 ROBOTBASE 的相对关系就固定了
335 int attachRobotBaseTo(const std::string &frame);
336 std::string getRobotBaseParent();
337
338 // 设置工件数据,编程点位都是基于工件坐标系
340
341 /**
342 * 设置碰撞灵敏度等级
343 * 数值越大越灵敏
344 *
345 * @param level 碰撞灵敏度等级
346 * 0: 关闭碰撞检测功能
347 * 1~9: 碰撞灵敏等级
348 * @return 成功返回0; 失败返回错误码
349 * AUBO_BUSY
350 * AUBO_BAD_STATE
351 * -AUBO_INVL_ARGUMENT
352 * -AUBO_BAD_STATE
353 *
354 * @throws arcs::common_interface::AuboException
355 *
356 * @par Python函数原型
357 * setCollisionLevel(self: pyaubo_sdk.RobotConfig, arg0: int) -> int
358 *
359 * @par Lua函数原型
360 * setCollisionLevel(level: number) -> nil
361 *
362 * @par JSON-RPC请求示例
363 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.setCollisionLevel","params":[6],"id":1}
364 *
365 * @par JSON-RPC响应示例
366 * {"id":1,"jsonrpc":"2.0","result":0}
367 *
368 */
369 int setCollisionLevel(int level);
370
371 /**
372 * 获取碰撞灵敏度等级
373 *
374 * @return 碰撞灵敏度等级
375 *
376 * @throws arcs::common_interface::AuboException
377 *
378 * @par Python函数原型
379 * getCollisionLevel(self: pyaubo_sdk.RobotConfig) -> int
380 *
381 * @par Lua函数原型
382 * getCollisionLevel() -> number
383 *
384 * @par JSON-RPC请求示例
385 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getCollisionLevel","params":[],"id":1}
386 *
387 * @par JSON-RPC响应示例
388 * {"id":1,"jsonrpc":"2.0","result":6}
389 *
390 */
392
393 /**
394 * 设置碰撞停止类型
395 *
396 * @param type 类型 \n
397 * 0: 碰撞后浮动,即碰撞之后进入拖动示教模式 \n
398 * 1: 碰撞后静止 \n
399 * 2: 碰撞后抱闸
400 *
401 * @return 成功返回0; 失败返回错误码
402 * AUBO_BUSY
403 * AUBO_BAD_STATE
404 * -AUBO_INVL_ARGUMENT
405 * -AUBO_BAD_STATE
406 *
407 * @throws arcs::common_interface::AuboException
408 *
409 * @par Python函数原型
410 * setCollisionStopType(self: pyaubo_sdk.RobotConfig, arg0: int) -> int
411 *
412 * @par Lua函数原型
413 * setCollisionStopType(type: number) -> nil
414 *
415 * @par JSON-RPC请求示例
416 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.setCollisionStopType","params":[1],"id":1}
417 *
418 * @par JSON-RPC响应示例
419 * {"id":1,"jsonrpc":"2.0","result":0}
420 *
421 */
422 int setCollisionStopType(int type);
423
424 /**
425 * 获取碰撞停止类型
426 *
427 * @return 返回碰撞停止类型 \n
428 * 0: 碰撞后浮动,即碰撞之后进入拖动示教模式 \n
429 * 1: 碰撞后静止 \n
430 * 2: 碰撞后抱闸
431 *
432 * @throws arcs::common_interface::AuboException
433 *
434 * @par Python函数原型
435 * getCollisionStopType(self: pyaubo_sdk.RobotConfig) -> int
436 *
437 * @par Lua函数原型
438 * getCollisionStopType() -> number
439 *
440 * @par JSON-RPC请求示例
441 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getCollisionStopType","params":[],"id":1}
442 *
443 * @par JSON-RPC响应示例
444 * {"id":1,"jsonrpc":"2.0","result":1}
445 *
446 */
448
449 /**
450 * 设置机器人的原点位置
451 *
452 * @param positions 关节角度
453 * @return 成功返回0;失败返回错误码
454 * AUBO_BUSY
455 * AUBO_BAD_STATE
456 * -AUBO_INVL_ARGUMENT
457 * -AUBO_BAD_STATE
458 *
459 * @throws arcs::common_interface::AuboException
460 *
461 * @par JSON-RPC请求示例
462 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.setHomePosition","params":[[0.0,-0.2617993877991494,1.74532925199433,0.4363323129985824,1.570796326794897,0.0]],"id":1}
463 *
464 * @par JSON-RPC响应示例
465 * {"id":1,"jsonrpc":"2.0","result":0}
466 *
467 */
468 int setHomePosition(const std::vector<double> &positions);
469
470 /**
471 * 获取机器人的原点位置
472 *
473 * @return
474 *
475 * @throws arcs::common_interface::AuboException
476 *
477 * @par JSON-RPC请求示例
478 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getHomePosition","params":[],"id":1}
479 *
480 * @par JSON-RPC响应示例
481 * {"id":1,"jsonrpc":"2.0","result":[0.0,-0.2617993877991494,1.74532925199433,0.4363323129985824,1.570796326794897,0.0]}
482 *
483 */
484 std::vector<double> getHomePosition();
485
486 /**
487 * 设置拖动阻尼
488 *
489 * @param damp 阻尼
490 *
491 * @return 成功返回0;失败返回错误码
492 * AUBO_BUSY
493 * AUBO_BAD_STATE
494 * -AUBO_INVL_ARGUMENT
495 * -AUBO_BAD_STATE
496 *
497 * @throws arcs::common_interface::AuboException
498 *
499 * @par Python函数原型
500 * setFreedriveDamp(self: pyaubo_sdk.RobotConfig, arg0: List[float]) -> int
501 *
502 * @par Lua函数原型
503 * setFreedriveDamp(damp: table) -> number
504 *
505 * @par JSON-RPC请求示例
506 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.setFreedriveDamp","params":[[0.5,0.5,0.5,0.5,0.5,0.5]],"id":1}
507 *
508 * @par JSON-RPC响应示例
509 * {"id":1,"jsonrpc":"2.0","result":0}
510 *
511 */
512 int setFreedriveDamp(const std::vector<double> &damp);
513
514 /**
515 * 获取拖动阻尼
516 *
517 * @return 拖动阻尼
518 *
519 * @throws arcs::common_interface::AuboException
520 *
521 * @par Python函数原型
522 * getFreedriveDamp(self: pyaubo_sdk.RobotConfig) -> List[float]
523 *
524 * @par Lua函数原型
525 * getFreedriveDamp() -> table
526 *
527 * @par JSON-RPC请求示例
528 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getFreedriveDamp","params":[],"id":1}
529 *
530 * @par JSON-RPC响应示例
531 * {"id":1,"jsonrpc":"2.0","result":[0.5,0.5,0.5,0.5,0.5,0.5]}
532 *
533 */
534 std::vector<double> getFreedriveDamp();
535
536 /**
537 * 获取机器人DH参数
538 * alpha a d theta beta
539 *
540 * @param real 读取真实参数(理论值+补偿值)或者理论参数
541 * @return 返回机器人DH参数
542 *
543 * @throws arcs::common_interface::AuboException
544 *
545 * @par Python函数原型
546 * getKinematicsParam(self: pyaubo_sdk.RobotConfig, arg0: bool) -> Dict[str,
547 * List[float]]
548 *
549 * @par Lua函数原型
550 * getKinematicsParam(real: boolean) -> table
551 *
552 * @par JSON-RPC请求示例
553 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getKinematicsParam","params":[true],"id":1}
554 *
555 * @par JSON-RPC响应示例
556 * {"id":1,"jsonrpc":"2.0","result":{"a":[0.0,-0.0001255999959539622,0.4086348000024445,0.3757601999930339,-0.00018950000230688602,3.7000001611886546e-05],
557 * "alpha":[0.0,-1.5701173967707458,3.1440308735524347,3.14650750358636,-1.5703093767832055,1.5751177669179182],"beta":[0.0,0.0,0.0,0.0,0.0,0.0],
558 * "d":[0.122,0.12154769999941345,-4.769999941345304e-05,4.769999941345304e-05,0.10287890000385232,0.116],
559 * "theta":[3.141592653589793,-1.5707963267948966,0.0,-1.5707963267948966,0.0,0.0]}}
560 *
561 */
562 std::unordered_map<std::string, std::vector<double>> getKinematicsParam(
563 bool real);
564
565 /**
566 * 获取指定温度下的DH参数补偿值:alpha a d theta beta
567 *
568 * @param ref_temperature 参考温度 ℃,默认20℃
569 * @return 返回DH参数补偿值
570 *
571 * @throws arcs::common_interface::AuboException
572 *
573 * @par Python函数原型
574 * getKinematicsCompensate(self: pyaubo_sdk.RobotConfig, arg0: float) ->
575 * Dict[str, List[float]]
576 *
577 * @par Lua函数原型
578 * getKinematicsCompensate(ref_temperature: number) -> table
579 *
580 * @par JSON-RPC请求示例
581 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getKinematicsCompensate","params":[20],"id":1}
582 *
583 * @par JSON-RPC响应示例
584 * {"id":1,"jsonrpc":"2.0","result":{"a":[0.0,-0.0001255999959539622,0.0006348000024445355,-0.0002398000069661066,-0.00018950000230688602,3.7000001611886546e-05],
585 * "alpha":[0.0,0.000678930024150759,0.002438219962641597,0.0049148499965667725,0.00048695001169107854,0.004321440123021603],
586 * "beta":[0.0,0.0,0.0,0.0,0.0,0.0],"d":[0.0,4.769999941345304e-05,-4.769999941345304e-05,4.769999941345304e-05,0.0003789000038523227,0.0],
587 * "theta":[0.0,0.0,0.0,0.0,0.0,0.0]}}
588 *
589 */
590 std::unordered_map<std::string, std::vector<double>>
591 getKinematicsCompensate(double ref_temperature);
592
593 /**
594 * 设置标准 DH 补偿到机器人
595 *
596 * @param param
597 *
598 * @return 成功返回0;失败返回错误码
599 * AUBO_BUSY
600 * AUBO_BAD_STATE
601 * -AUBO_INVL_ARGUMENT
602 * -AUBO_BAD_STATE
603 *
604 * @throws arcs::common_interface::AuboException
605 *
606 */
608 const std::unordered_map<std::string, std::vector<double>> &param);
609
610 /**
611 * 设置需要保存到接口板底座的参数
612 *
613 * @param param 补偿数据
614 *
615 * @return 成功返回0;失败返回错误码
616 * AUBO_BUSY
617 * AUBO_BAD_STATE
618 * -AUBO_INVL_ARGUMENT
619 * -AUBO_BAD_STATE
620 *
621 * @throws arcs::common_interface::AuboException
622 *
623 * @par Python函数原型
624 * setPersistentParameters(self: pyaubo_sdk.RobotConfig, arg0: str) -> int
625 *
626 * @par Lua函数原型
627 * setPersistentParameters(param: string) -> nil
628 *
629 */
630 int setPersistentParameters(const std::string &param);
631
632 /**
633 * 设置硬件抽象层自定义参数
634 * 目的是为了做不同硬件之间的兼容
635 *
636 * @param param 自定义参数
637 *
638 * @return 成功返回0;失败返回错误码
639 * AUBO_BUSY
640 * AUBO_BAD_STATE
641 * -AUBO_INVL_ARGUMENT
642 * -AUBO_BAD_STATE
643 *
644 * @throws arcs::common_interface::AuboException
645 *
646 */
647 int setHardwareCustomParameters(const std::string &param);
648
649 /**
650 * 获取硬件抽象层自定义参数
651 *
652 * @param
653 * @return 返回硬件抽象层自定义的参数
654 *
655 * @throws arcs::common_interface::AuboException
656 *
657 */
658 std::string getHardwareCustomParameters(const std::string &param);
659
660 /**
661 * 设置机器人关节零位
662 *
663 * @return 成功返回0;失败返回错误码
664 * AUBO_BUSY
665 * AUBO_BAD_STATE
666 * -AUBO_BAD_STATE
667 *
668 * @throws arcs::common_interface::AuboException
669 *
670 * @par Python函数原型
671 * setRobotZero(self: pyaubo_sdk.RobotConfig) -> int
672 *
673 * @par Lua函数原型
674 * setRobotZero() -> nil
675 *
676 * @par JSON-RPC请求示例
677 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.setRobotZero","params":[],"id":1}
678 *
679 * @par JSON-RPC响应示例
680 * {"id":1,"jsonrpc":"2.0","result":0}
681 *
682 */
684
685 /**
686 * 获取可用的末端力矩传感器的名字
687 *
688 * @return 返回可用的末端力矩传感器的名字
689 *
690 * @throws arcs::common_interface::AuboException
691 *
692 * @par Python函数原型
693 * getTcpForceSensorNames(self: pyaubo_sdk.RobotConfig) -> List[str]
694 *
695 * @par Lua函数原型
696 * getTcpForceSensorNames() -> table
697 *
698 * @par JSON-RPC请求示例
699 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getTcpForceSensorNames","params":[],"id":1}
700 *
701 * @par JSON-RPC响应示例
702 * {"id":1,"jsonrpc":"2.0","result":[]}
703 *
704 */
705 std::vector<std::string> getTcpForceSensorNames();
706
707 /**
708 * 设置末端力矩传感器
709 * 如果存在内置的末端力矩传感器,默认将使用内置的力矩传感器
710 *
711 * @param name 末端力矩传感器的名字
712 *
713 * @return 成功返回0;失败返回错误码
714 * AUBO_BUSY
715 * AUBO_BAD_STATE
716 * -AUBO_INVL_ARGUMENT
717 * -AUBO_BAD_STATE
718 *
719 * @throws arcs::common_interface::AuboException
720 *
721 * @par Python函数原型
722 * selectTcpForceSensor(self: pyaubo_sdk.RobotConfig, arg0: str) -> int
723 *
724 * @par Lua函数原型
725 * selectTcpForceSensor(name: string) -> nil
726 *
727 */
728 int selectTcpForceSensor(const std::string &name);
729
730 /**
731 * 设置传感器安装位姿
732 *
733 * @param sensor_pose 传感器安装位姿
734 *
735 * @return 成功返回0;失败返回错误码
736 * AUBO_BUSY
737 * AUBO_BAD_STATE
738 * -AUBO_INVL_ARGUMENT
739 * -AUBO_BAD_STATE
740 *
741 * @throws arcs::common_interface::AuboException
742 *
743 */
744 int setTcpForceSensorPose(const std::vector<double> &sensor_pose);
745
746 /**
747 * 获取传感器安装位姿
748 *
749 * @return 传感器安装位姿
750 *
751 * @throws arcs::common_interface::AuboException
752 *
753 * @par JSON-RPC请求示例
754 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getTcpForceSensorPose","params":[],"id":1}
755 *
756 * @par JSON-RPC响应示例
757 * {"id":1,"jsonrpc":"2.0","result":[0.0,0.0,0.0,0.0,0.0,0.0]}
758 *
759 */
760 std::vector<double> getTcpForceSensorPose();
761
762 /**
763 * 是否安装了末端力矩传感器
764 *
765 * @return 安装返回true; 没有安装返回false
766 *
767 * @throws arcs::common_interface::AuboException
768 *
769 * @par Python函数原型
770 * hasTcpForceSensor(self: pyaubo_sdk.RobotConfig) -> bool
771 *
772 * @par Lua函数原型
773 * hasTcpForceSensor() -> boolean
774 *
775 * @par JSON-RPC请求示例
776 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.hasTcpForceSensor","params":[],"id":1}
777 *
778 * @par JSON-RPC响应示例
779 * {"id":1,"jsonrpc":"2.0","result":true}
780 *
781 */
783
784 /**
785 * 设置末端力矩偏移
786 *
787 * @param force_offset 末端力矩偏移
788 * @return 成功返回0; 失败返回错误码
789 *
790 * @throws arcs::common_interface::AuboException
791 *
792 * @par Python函数原型
793 * setTcpForceOffset(self: pyaubo_sdk.RobotConfig, arg0: List[float]) -> int
794 *
795 * @par Lua函数原型
796 * setTcpForceOffset(force_offset: table) -> nil
797 *
798 */
799 int setTcpForceOffset(const std::vector<double> &force_offset);
800
801 /**
802 * 获取末端力矩偏移
803 *
804 * @return 返回末端力矩偏移
805 *
806 * @throws arcs::common_interface::AuboException
807 *
808 * @par Python函数原型
809 * getTcpForceOffset(self: pyaubo_sdk.RobotConfig) -> List[float]
810 *
811 * @par Lua函数原型
812 * getTcpForceOffset() -> table
813 *
814 * @par JSON-RPC请求示例
815 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getTcpForceOffset","params":[],"id":1}
816 *
817 * @par JSON-RPC响应示例
818 * {"id":1,"jsonrpc":"2.0","result":[0.0,0.0,0.0,0.0,0.0,0.0]}
819 *
820 */
821 std::vector<double> getTcpForceOffset();
822
823 /**
824 * 获取可用的底座力矩传感器的名字
825 *
826 * @return 返回可用的底座力矩传感器的名字
827 *
828 * @throws arcs::common_interface::AuboException
829 *
830 * @par Python函数原型
831 * getBaseForceSensorNames(self: pyaubo_sdk.RobotConfig) -> List[str]
832 *
833 * @par Lua函数原型
834 * getBaseForceSensorNames() -> table
835 *
836 * @par JSON-RPC请求示例
837 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getBaseForceSensorNames","params":[],"id":1}
838 *
839 * @par JSON-RPC响应示例
840 * {"id":1,"jsonrpc":"2.0","result":[]}
841 *
842 */
843 std::vector<std::string> getBaseForceSensorNames();
844
845 /**
846 * 设置底座力矩传感器
847 * 如果存在内置的底座力矩传感器,默认将使用内置的力矩传感器
848 *
849 * @param name 底座力矩传感器的名字
850 *
851 * @return 成功返回0;失败返回错误码
852 * AUBO_BUSY
853 * AUBO_BAD_STATE
854 * -AUBO_INVL_ARGUMENT
855 * -AUBO_BAD_STATE
856 *
857 * @throws arcs::common_interface::AuboException
858 *
859 * @par Python函数原型
860 * selectBaseForceSensor(self: pyaubo_sdk.RobotConfig, arg0: str) -> int
861 *
862 * @par Lua函数原型
863 * selectBaseForceSensor(name: string) -> nil
864 *
865 */
866 int selectBaseForceSensor(const std::string &name);
867
868 /**
869 * 是否安装了底座力矩传感器
870 *
871 * @return 安装返回true;没有安装返回false
872 *
873 * @throws arcs::common_interface::AuboException
874 *
875 * @par Python函数原型
876 * hasBaseForceSensor(self: pyaubo_sdk.RobotConfig) -> bool
877 *
878 * @par Lua函数原型
879 * hasBaseForceSensor() -> boolean
880 *
881 * @par JSON-RPC请求示例
882 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.hasBaseForceSensor","params":[],"id":1}
883 *
884 * @par JSON-RPC响应示例
885 * {"id":1,"jsonrpc":"2.0","result":false}
886 *
887 */
889
890 /**
891 * 设置底座力矩偏移
892 *
893 * @param force_offset 底座力矩偏移
894 *
895 * @return 成功返回0;失败返回错误码
896 * AUBO_BUSY
897 * AUBO_BAD_STATE
898 * -AUBO_INVL_ARGUMENT
899 * -AUBO_BAD_STATE
900 *
901 * @throws arcs::common_interface::AuboException
902 *
903 * @par Python函数原型
904 * setBaseForceOffset(self: pyaubo_sdk.RobotConfig, arg0: List[float]) ->
905 * int
906 *
907 * @par Lua函数原型
908 * setBaseForceOffset(force_offset: table) -> nil
909 *
910 */
911 int setBaseForceOffset(const std::vector<double> &force_offset);
912
913 /**
914 * 获取底座力矩偏移
915 *
916 * @return 返回底座力矩偏移
917 *
918 * @throws arcs::common_interface::AuboException
919 *
920 * @par Python函数原型
921 * getBaseForceOffset(self: pyaubo_sdk.RobotConfig) -> List[float]
922 *
923 * @par Lua函数原型
924 * getBaseForceOffset() -> table
925 *
926 * @par JSON-RPC请求示例
927 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getBaseForceOffset","params":[],"id":1}
928 *
929 * @par JSON-RPC响应示例
930 * {"id":1,"jsonrpc":"2.0","result":[]}
931 *
932 */
933 std::vector<double> getBaseForceOffset();
934
935 /**
936 * 获取安全参数校验码 CRC32
937 *
938 * @return 返回安全参数校验码
939 *
940 * @throws arcs::common_interface::AuboException
941 *
942 * @par Python函数原型
943 * getSafetyParametersCheckSum(self: pyaubo_sdk.RobotConfig) -> int
944 *
945 * @par Lua函数原型
946 * getSafetyParametersCheckSum() -> number
947 *
948 * @par JSON-RPC请求示例
949 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getSafetyParametersCheckSum","params":[],"id":1}
950 *
951 * @par JSON-RPC响应示例
952 * {"id":1,"jsonrpc":"2.0","result":2033397241}
953 *
954 */
956
957 /**
958 * 发起确认安全配置参数请求:
959 * 将安全配置参数写入到安全接口板flash或文件
960 *
961 * @param parameters 安全配置参数
962 *
963 * @return 成功返回0;失败返回错误码
964 * AUBO_BUSY
965 * AUBO_BAD_STATE
966 * -AUBO_INVL_ARGUMENT
967 * -AUBO_BAD_STATE
968 *
969 * @throws arcs::common_interface::AuboException
970 *
971 * @par Python函数原型
972 * confirmSafetyParameters(self: pyaubo_sdk.RobotConfig, arg0:
973 * arcs::common_interface::RobotSafetyParameterRange) -> int
974 *
975 * @par Lua函数原型
976 *
977 *
978 */
980
981 /**
982 * 计算安全参数的 CRC32 校验值
983 *
984 * @return crc32
985 *
986 * @throws arcs::common_interface::AuboException
987 *
988 */
990 const RobotSafetyParameterRange &parameters);
991
992 /**
993 * 获取关节最大位置(物理极限)
994 *
995 * @return 返回关节最大位置
996 *
997 * @throws arcs::common_interface::AuboException
998 *
999 * @par Python函数原型
1000 * getJointMaxPositions(self: pyaubo_sdk.RobotConfig) -> List[float]
1001 *
1002 * @par Lua函数原型
1003 * getJointMaxPositions() -> table
1004 *
1005 * @par JSON-RPC请求示例
1006 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getJointMaxPositions","params":[],"id":1}
1007 *
1008 * @par JSON-RPC响应示例
1009 * {"id":1,"jsonrpc":"2.0","result":[6.283185307179586,6.283185307179586,6.283185307179586,6.283185307179586,6.283185307179586,6.283185307179586]}
1010 *
1011 */
1012 std::vector<double> getJointMaxPositions();
1013
1014 /**
1015 * 获取关节最小位置(物理极限)
1016 *
1017 * @return 返回关节最小位置
1018 *
1019 * @throws arcs::common_interface::AuboException
1020 *
1021 * @par Python函数原型
1022 * getJointMinPositions(self: pyaubo_sdk.RobotConfig) -> List[float]
1023 *
1024 * @par Lua函数原型
1025 * getJointMinPositions() -> table
1026 *
1027 * @par JSON-RPC请求示例
1028 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getJointMinPositions","params":[],"id":1}
1029 *
1030 * @par JSON-RPC响应示例
1031 * {"id":1,"jsonrpc":"2.0","result":[-6.283185307179586,-6.283185307179586,-6.283185307179586,-6.283185307179586,-6.283185307179586,-6.283185307179586]}
1032 *
1033 */
1034 std::vector<double> getJointMinPositions();
1035
1036 /**
1037 * 获取关节最大速度(物理极限)
1038 *
1039 * @return 返回关节最大速度
1040 *
1041 * @throws arcs::common_interface::AuboException
1042 *
1043 * @par Python函数原型
1044 * getJointMaxSpeeds(self: pyaubo_sdk.RobotConfig) -> List[float]
1045 *
1046 * @par Lua函数原型
1047 * getJointMaxSpeeds() -> table
1048 *
1049 * @par JSON-RPC请求示例
1050 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getJointMaxSpeeds","params":[],"id":1}
1051 *
1052 * @par JSON-RPC响应示例
1053 * {"id":1,"jsonrpc":"2.0","result":[3.892084231947355,3.892084231947355,3.892084231947355,3.1066860685499065,3.1066860685499065,3.1066860685499065]}
1054 *
1055 */
1056 std::vector<double> getJointMaxSpeeds();
1057
1058 /**
1059 * 获取关节最大加速度(物理极限)
1060 *
1061 * @return 返回关节最大加速度
1062 *
1063 * @throws arcs::common_interface::AuboException
1064 *
1065 * @par Python函数原型
1066 * getJointMaxAccelerations(self: pyaubo_sdk.RobotConfig) -> List[float]
1067 *
1068 * @par Lua函数原型
1069 * getJointMaxAccelerations() -> table
1070 *
1071 * @par JSON-RPC请求示例
1072 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getJointMaxAccelerations","params":[],"id":1}
1073 *
1074 * @par JSON-RPC响应示例
1075 * {"id":1,"jsonrpc":"2.0","result":[31.104877758314785,31.104877758314785,31.104877758314785,20.73625684294463,20.73625684294463,20.73625684294463]}
1076 *
1077 */
1078 std::vector<double> getJointMaxAccelerations();
1079
1080 /**
1081 * 获取TCP最大速度(物理极限)
1082 *
1083 * @return 返回TCP最大速度
1084 *
1085 * @throws arcs::common_interface::AuboException
1086 *
1087 * @par Python函数原型
1088 * getTcpMaxSpeeds(self: pyaubo_sdk.RobotConfig) -> List[float]
1089 *
1090 * @par Lua函数原型
1091 * getTcpMaxSpeeds() -> table
1092 *
1093 * @par JSON-RPC请求示例
1094 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getTcpMaxSpeeds","params":[],"id":1}
1095 *
1096 * @par JSON-RPC响应示例
1097 * {"id":1,"jsonrpc":"2.0","result":[2.0,5.0]}
1098 *
1099 */
1100 std::vector<double> getTcpMaxSpeeds();
1101
1102 /**
1103 * 获取TCP最大加速度(物理极限)
1104 *
1105 * @return 返回TCP最大加速度
1106 *
1107 * @throws arcs::common_interface::AuboException
1108 *
1109 * @par Python函数原型
1110 * getTcpMaxAccelerations(self: pyaubo_sdk.RobotConfig) -> List[float]
1111 *
1112 * @par Lua函数原型
1113 * getTcpMaxAccelerations() -> table
1114 *
1115 * @par JSON-RPC请求示例
1116 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getTcpMaxAccelerations","params":[],"id":1}
1117 *
1118 * @par JSON-RPC响应示例
1119 * {"id":1,"jsonrpc":"2.0","result":[10.0,10.0]}
1120 *
1121 */
1122 std::vector<double> getTcpMaxAccelerations();
1123
1124 /**
1125 * 设置机器人安装姿态
1126 *
1127 * @param gravity 安装姿态
1128 *
1129 * @return 成功返回0;失败返回错误码
1130 * AUBO_BUSY
1131 * AUBO_BAD_STATE
1132 * -AUBO_INVL_ARGUMENT
1133 * -AUBO_BAD_STATE
1134 *
1135 * @throws arcs::common_interface::AuboException
1136 *
1137 * @par Python函数原型
1138 * setGravity(self: pyaubo_sdk.RobotConfig, arg0: List[float]) -> int
1139 *
1140 * @par Lua函数原型
1141 * setGravity(gravity: table) -> nil
1142 *
1143 * @par JSON-RPC请求示例
1144 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.setGravity","params":[[0.0,0.0,-9.87654321]],"id":1}
1145 *
1146 * @par JSON-RPC响应示例
1147 * {"id":1,"jsonrpc":"2.0","result":0}
1148 *
1149 */
1150 int setGravity(const std::vector<double> &gravity);
1151
1152 /**
1153 * 获取机器人的安装姿态
1154 *
1155 * 如果机器人底座安装了姿态传感器,则从传感器读取数据,否则按照用户设置
1156 *
1157 * @return 返回安装姿态
1158 *
1159 * @throws arcs::common_interface::AuboException
1160 *
1161 * @par Python函数原型
1162 * getGravity(self: pyaubo_sdk.RobotConfig) -> List[float]
1163 *
1164 * @par Lua函数原型
1165 * getGravity() -> table
1166 *
1167 * @par JSON-RPC请求示例
1168 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getGravity","params":[],"id":1}
1169 *
1170 * @par JSON-RPC响应示例
1171 * {"id":1,"jsonrpc":"2.0","result":[0.0,0.0,-9.87654321]}
1172 *
1173 */
1174 std::vector<double> getGravity();
1175
1176 /**
1177 * 设置当前的TCP偏移
1178 *
1179 * TCP偏移表示形式为(x,y,z,rx,ry,rz)。
1180 * 其中x、y、z是工具中心点(TCP)在基坐标系下相对于法兰盘中心的位置偏移,单位是m。
1181 * rx、ry、rz是工具中心点(TCP)在基坐标系下相对于法兰盘中心的的姿态偏移,是ZYX欧拉角,单位是rad。
1182 *
1183 * @param offset 当前的TCP偏移,形式为(x,y,z,rx,ry,rz)
1184 *
1185 * @return 成功返回0;失败返回错误码
1186 * AUBO_BUSY
1187 * AUBO_BAD_STATE
1188 * -AUBO_INVL_ARGUMENT
1189 * -AUBO_BAD_STATE
1190 *
1191 * @throws arcs::common_interface::AuboException
1192 *
1193 * @par Python函数原型
1194 * setTcpOffset(self: pyaubo_sdk.RobotConfig, arg0: List[float]) -> int
1195 *
1196 * @par Lua函数原型
1197 * setTcpOffset(offset: table) -> nil
1198 *
1199 * @par JSON-RPC请求示例
1200 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.setTcpOffset","params":[[0.0,0.0,0.0,0.0,0.0,0.0]],"id":1}
1201 *
1202 * @par JSON-RPC响应示例
1203 * {"id":1,"jsonrpc":"2.0","result":0}
1204 *
1205 */
1206 int setTcpOffset(const std::vector<double> &offset);
1207
1208 /**
1209 * 获取当前的TCP偏移
1210 *
1211 * TCP偏移表示形式为(x,y,z,rx,ry,rz)。
1212 * 其中x、y、z是工具中心点(TCP)在基坐标系下相对于法兰盘中心的位置偏移,单位是m。
1213 * rx、ry、rz是工具中心点(TCP)在基坐标系下相对于法兰盘中心的的姿态偏移,是ZYX欧拉角,单位是rad。
1214 *
1215 * @return 当前的TCP偏移,形式为(x,y,z,rx,ry,rz)
1216 *
1217 * @throws arcs::common_interface::AuboException
1218 *
1219 * @par Python函数原型
1220 * getTcpOffset(self: pyaubo_sdk.RobotConfig) -> List[float]
1221 *
1222 * @par Lua函数原型
1223 * getTcpOffset() -> table
1224 *
1225 * @par JSON-RPC请求示例
1226 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getTcpOffset","params":[],"id":1}
1227 *
1228 * @par JSON-RPC响应示例
1229 * {"id":1,"jsonrpc":"2.0","result":[0.0,0.0,0.0,0.0,0.0,0.0]}
1230 *
1231 */
1232 std::vector<double> getTcpOffset();
1233
1234 /**
1235 * 设置工具端质量、质心及惯量
1236 *
1237 * @param m 工具端质量
1238 * @param com 质心
1239 * @param inertial 惯量
1240 *
1241 * @return 成功返回0;失败返回错误码
1242 * AUBO_BUSY
1243 * AUBO_BAD_STATE
1244 * -AUBO_INVL_ARGUMENT
1245 * -AUBO_BAD_STATE
1246 *
1247 * @throws arcs::common_interface::AuboException
1248 *
1249 * @par Python函数原型
1250 * setToolInertial(self: pyaubo_sdk.RobotConfig, arg0: float, arg1:
1251 * List[float], arg2: List[float]) -> int
1252 *
1253 * @par Lua函数原型
1254 * setToolInertial(m: number, com: table, inertial: table) -> nil
1255 *
1256 */
1257 int setToolInertial(double m, const std::vector<double> &com,
1258 const std::vector<double> &inertial);
1259
1260 /**
1261 * 设置有效负载
1262 *
1263 * @param m 质量, 单位: kg
1264 * @param cog 重心, 单位: m, 形式为(CoGx, CoGy, CoGz)
1265 * @param aom 力矩轴的方向, 单位: rad, 形式为(rx, ry, rz)
1266 * @param inertia 惯量, 单位: kg*m^2, 形式为(Ixx, Iyy, Izz, Ixy, Ixz, Iyz)或(Ixx, Ixy, Ixz, Iyx, Iyy, Iyz, Izx, Izy, Izz)
1267 *
1268 * @return 成功返回0;失败返回错误码
1269 * AUBO_BUSY
1270 * AUBO_BAD_STATE
1271 * -AUBO_INVL_ARGUMENT
1272 * -AUBO_BAD_STATE
1273 *
1274 * @throws arcs::common_interface::AuboException
1275 *
1276 * @par Python函数原型
1277 * setPayload(self: pyaubo_sdk.RobotConfig, arg0: float, arg1: List[float],
1278 * arg2: List[float], arg3: List[float]) -> int
1279 *
1280 * @par Lua函数原型
1281 * setPayload(m: number, cog: table, aom: table, inertia: table) -> nil
1282 *
1283 * @par Lua示例
1284 * setPayload(3, {0,0,0}, {0,0,0}, {0,0,0,0,0,0,0,0,0})
1285 *
1286 * @par JSON-RPC请求示例
1287 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.setPayload","params":[3,[0,0,0],[0,0,0],[0,0,0,0,0,0,0,0,0]],"id":1}
1288 *
1289 * @par JSON-RPC响应示例
1290 * {"id":1,"jsonrpc":"2.0","result":0}
1291 *
1292 */
1293 int setPayload(double m, const std::vector<double> &cog,
1294 const std::vector<double> &aom,
1295 const std::vector<double> &inertia);
1296
1297 /**
1298 * 获取有效负载
1299 *
1300 * @return 有效负载.
1301 * 第一个元素表示质量, 单位: kg;
1302 * 第二个元素表示重心, 单位: m, 形式为(CoGx, CoGy, CoGz);
1303 * 第三个元素表示力矩轴的方向, 单位: rad, 形式为(rx, ry, rz);
1304 * 第四个元素表示惯量, 单位: kg*m^2, 形式为(Ixx, Iyy, Izz, Ixy, Ixz, Iyz)
1305 *
1306 * @throws arcs::common_interface::AuboException
1307 *
1308 * @par Python函数原型
1309 * getPayload(self: pyaubo_sdk.RobotConfig) -> Tuple[float, List[float],
1310 * List[float], List[float]]
1311 *
1312 * @par Lua函数原型
1313 * getPayload() -> number, table, table, table
1314 *
1315 * @par Lua示例
1316 * m, cog, aom, inertia = getPayload()
1317 *
1318 * @par JSON-RPC请求示例
1319 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getPayload","params":[],"id":1}
1320 *
1321 * @par JSON-RPC响应示例
1322 * {"id":1,"jsonrpc":"2.0","result":[3.0,[0.0,0.0,0.0],[0.0,0.0,0.0],[0.0,0.0,0.0,0.0,0.0,0.0]]}
1323 *
1324 */
1326
1327 /**
1328 * 末端位姿是否在安全范围之内
1329 *
1330 * @param pose 末端位姿
1331 * @return 在安全范围内返回true; 反之返回false
1332 *
1333 * @throws arcs::common_interface::AuboException
1334 *
1335 * @par Python函数原型
1336 * toolSpaceInRange(self: pyaubo_sdk.RobotConfig, arg0: List[float]) -> bool
1337 *
1338 * @par Lua函数原型
1339 * toolSpaceInRange(pose: table) -> boolean
1340 *
1341 * @par JSON-RPC请求示例
1342 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.toolSpaceInRange","params":[[0.58712,
1343 * -0.15775, 0.48703, 2.76, 0.344, 1.432]],"id":1}
1344 *
1345 * @par JSON-RPC响应示例
1346 * {"id":1,"jsonrpc":"2.0","result":true}
1347 *
1348 */
1349 bool toolSpaceInRange(const std::vector<double> &pose);
1350
1351 /**
1352 * 发起固件升级请求,控制器软件将进入固件升级模式
1353 *
1354 * @param fw 固件升级路径。该路径的格式为: 固件安装包路径\#升级节点列表。
1355 * 其中固件安装包路径和升级节点列表以井号(#)分隔,升级节点以逗号(,)分隔。
1356 * 如果节点名称后带有!,则表示强制(不带版本校验)升级该节点;
1357 * 反之,则表示带校验版本地升级节点,
1358 * 即在升级该节点前,会先判断当前版本和目标版本是否相同,如果相同就不升级该节点。\n
1359 * 可以根据实际需求灵活设置需要升级的节点。\n
1360 * 例如,
1361 * /tmp/firmware_update-1.0.42-rc.5+2347b0d.firm\#master_mcu!,slace_mcu!,
1362 * base!,tool!,joint1!,joint2!,joint3!,joint4!,joint5!,joint6!
1363 * 表示强制升级接口板主板、接口板从板、基座、工具和6个关节(joint1至joint6)。\n
1364 * all表示所有的节点,例如
1365 * /tmp/firm_XXX.firm\#all 表示带校验版本地升级全部节点,
1366 * /tmp/firm_XXX.firm\#all!表示强制升级全部节点
1367 *
1368 * @return 指令下发成功返回0; 失败返回错误码。 \n
1369 * -AUBO_BAD_STATE: 运行时(RuntimeMachine)的当前状态不是Stopped,
1370 * 固件升级请求被拒绝。AUBO_BAD_STATE的值是1。 \n
1371 * -AUBO_TIMEOUT: 超时。AUBO_TIMEOUT的值是4。 \n
1372 *
1373 * @throws arcs::common_interface::AuboException
1374 *
1375 * @par Python函数原型
1376 * firmwareUpdate(self: pyaubo_sdk.RobotConfig, arg0: str) -> int
1377 *
1378 * @par Lua函数原型
1379 * firmwareUpdate(fw: string) -> nil
1380 *
1381 * @par JSON-RPC请求示例
1382 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.firmwareUpdate","params":["/tmp/firmware_update-1.0.42-rc.12+3e33eac.firm#master_mcu"],"id":1}
1383 *
1384 * @par JSON-RPC响应示例
1385 * {"id":1,"jsonrpc":"2.0","result":0}
1386 *
1387 */
1388 int firmwareUpdate(const std::string &fw);
1389
1390 /**
1391 * 获取当前的固件升级的进程
1392 *
1393 * @return 当前的固件升级进程。 \n
1394 * 第一个元素表示步骤名称。如果是failed,则表示固件升级失败 \n
1395 * 第二个元素表示升级的进度(0~1),完成之后,返回("", 1)
1396 *
1397 * @throws arcs::common_interface::AuboException
1398 *
1399 * @par Python函数原型
1400 * getFirmwareUpdateProcess(self: pyaubo_sdk.RobotConfig) -> Tuple[str,
1401 * float]
1402 *
1403 * @par Lua函数原型
1404 * getFirmwareUpdateProcess() -> table
1405 *
1406 * @par JSON-RPC请求示例
1407 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getFirmwareUpdateProcess","params":[],"id":1}
1408 *
1409 * @par JSON-RPC响应示例
1410 * {"id":1,"jsonrpc":"2.0","result":[" ",0.0]}
1411 *
1412 */
1413 std::tuple<std::string, double> getFirmwareUpdateProcess();
1414
1415 /**
1416 * 获取关节最大位置(当前正在使用的限制值)
1417 *
1418 * @return 返回关节最大位置(当前正在使用的限制值)
1419 *
1420 * @throws arcs::common_interface::AuboException
1421 *
1422 * @par Python函数原型
1423 * getLimitJointMaxPositions(self: pyaubo_sdk.RobotConfig) -> List[float]
1424 *
1425 * @par Lua函数原型
1426 * getLimitJointMaxPositions() -> table
1427 *
1428 * @par JSON-RPC请求示例
1429 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getLimitJointMaxPositions","params":[],"id":1}
1430 *
1431 * @par JSON-RPC响应示例
1432 * {"id":1,"jsonrpc":"2.0","result":[6.2831854820251465,6.2831854820251465,6.2831854820251465,6.2831854820251465,6.2831854820251465,6.2831854820251465]}
1433 *
1434 */
1435 std::vector<double> getLimitJointMaxPositions();
1436
1437 /**
1438 * 获取关节最小位置(当前正在使用的限制值)
1439 *
1440 * @return 返回关节最小位置(当前正在使用的限制值)
1441 *
1442 * @throws arcs::common_interface::AuboException
1443 *
1444 * @par Python函数原型
1445 * getLimitJointMinPositions(self: pyaubo_sdk.RobotConfig) -> List[float]
1446 *
1447 * @par Lua函数原型
1448 * getLimitJointMinPositions() -> table
1449 *
1450 * @par JSON-RPC请求示例
1451 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getLimitJointMinPositions","params":[],"id":1}
1452 *
1453 * @par JSON-RPC响应示例
1454 * {"id":1,"jsonrpc":"2.0","result":[-6.2831854820251465,-6.2831854820251465,-6.2831854820251465,-6.2831854820251465,-6.2831854820251465,-6.2831854820251465]}
1455 *
1456 */
1457 std::vector<double> getLimitJointMinPositions();
1458
1459 /**
1460 * 获取关节最大速度(当前正在使用的限制值)
1461 *
1462 * @return 返回关节最大速度(当前正在使用的限制值)
1463 *
1464 * @throws arcs::common_interface::AuboException
1465 *
1466 * @par Python函数原型
1467 * getLimitJointMaxSpeeds(self: pyaubo_sdk.RobotConfig) -> List[float]
1468 *
1469 * @par Lua函数原型
1470 * getLimitJointMaxSpeeds() -> table
1471 *
1472 * @par JSON-RPC请求示例
1473 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getLimitJointMaxSpeeds","params":[],"id":1}
1474 *
1475 * @par JSON-RPC响应示例
1476 * {"id":1,"jsonrpc":"2.0","result":[3.8920841217041016,3.8920841217041016,3.8920841217041016,3.1066861152648926,3.1066861152648926,3.1066861152648926]}
1477 *
1478 */
1479 std::vector<double> getLimitJointMaxSpeeds();
1480
1481 /**
1482 * 获取关节最大加速度(当前正在使用的限制值)
1483 *
1484 * @return 返回关节最大加速度(当前正在使用的限制值)
1485 *
1486 * @throws arcs::common_interface::AuboException
1487 *
1488 * @par Python函数原型
1489 * getLimitJointMaxAccelerations(self: pyaubo_sdk.RobotConfig) ->
1490 * List[float]
1491 *
1492 * @par Lua函数原型
1493 * getLimitJointMaxAccelerations() -> table
1494 *
1495 * @par JSON-RPC请求示例
1496 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getLimitJointMaxAccelerations","params":[],"id":1}
1497 *
1498 * @par JSON-RPC响应示例
1499 * {"id":1,"jsonrpc":"2.0","result":[31.104877758314785,31.104877758314785,31.104877758314785,20.73625684294463,20.73625684294463,20.73625684294463]}
1500 *
1501 */
1502 std::vector<double> getLimitJointMaxAccelerations();
1503
1504 /**
1505 * 获取TCP最大速度(当前正在使用的限制值)
1506 *
1507 * @return 返回TCP最大速度(当前正在使用的限制值)
1508 *
1509 * @throws arcs::common_interface::AuboException
1510 *
1511 * @par Python函数原型
1512 * getLimitTcpMaxSpeed(self: pyaubo_sdk.RobotConfig) -> List[float]
1513 *
1514 * @par Lua函数原型
1515 * getLimitTcpMaxSpeed() -> table
1516 *
1517 * @par JSON-RPC请求示例
1518 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getLimitTcpMaxSpeed","params":[],"id":1}
1519 *
1520 * @par JSON-RPC响应示例
1521 * {"id":1,"jsonrpc":"2.0","result":2.0}
1522 *
1523 */
1525
1526 /**
1527 * 获取当前安全停止的类型
1528 *
1529 * @return 返回当前安全停止的类型
1530 *
1531 * @par JSON-RPC请求示例
1532 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getSafeguardStopType","params":[],"id":1}
1533 *
1534 * @par JSON-RPC响应示例
1535 * {"id":1,"jsonrpc":"2.0","result":"None"}
1536 *
1537 */
1539
1540 /**
1541 * 按位获取完整的安全停止触发源
1542 *
1543 * @return 返回所有安全停止触发源
1544 *
1545 * 安全停止的原因:
1546 * 手动模式下可配置安全IO触发的安全停止 - 1<<0
1547 * 自动模式下可配置安全IO触发的安全停止 - 1<<1
1548 * 控制柜SI输入触发的安全停止 - 1<<2
1549 * 示教器三态开关触发的安全停止 - 1<<3
1550 * 自动切手动触发的安全停止 - 1<<4
1551 *
1552 * @par JSON-RPC请求示例
1553 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getSafeguardStopSource","params":[],"id":1}
1554 *
1555 * @par JSON-RPC响应示例
1556 * {"id":1,"jsonrpc":"2.0","result":0}
1557 *
1558 */
1560
1561 /**
1562 * 按位获取完整的机器人紧急停止触发源
1563 *
1564 * @return 返回所有机器人紧急停止触发源
1565 *
1566 * 紧急停止的原因:
1567 * 控制柜紧急停止按钮触发 - 1<<0
1568 * 示教器紧急停止按钮触发 - 1<<1
1569 * 手柄紧急停止按钮触发 - 1<<2
1570 * 固定IO紧急停止触发 - 1<<3
1571 *
1572 * @par JSON-RPC请求示例
1573 * {"jsonrpc":"2.0","method":"rob1.RobotConfig.getRobotEmergencyStopSource","params":[],"id":1}
1574 *
1575 * @par JSON-RPC响应示例
1576 * {"id":1,"jsonrpc":"2.0","result":0}
1577 *
1578 */
1580
1581protected:
1582 void *d_;
1583};
1584using RobotConfigPtr = std::shared_ptr<RobotConfig>;
1585
1586} // namespace common_interface
1587} // namespace arcs
1588#endif // AUBO_SDK_ROBOT_CONFIG_H
double getDefaultJointSpeed()
获取默认的关节速度,单位rad/s
double getDefaultJointAcc()
获取默认的关节加速度,单位rad/s^2
int getSafeguardStopSource()
按位获取完整的安全停止触发源
std::string getHardwareCustomParameters(const std::string &param)
获取硬件抽象层自定义参数
bool hasBaseForceSensor()
是否安装了底座力矩传感器
std::string getName()
获取机器人的名字
int setBaseForceOffset(const std::vector< double > &force_offset)
设置底座力矩偏移
int setKinematicsCompensate(const std::unordered_map< std::string, std::vector< double > > &param)
设置标准 DH 补偿到机器人
int selectTcpForceSensor(const std::string &name)
设置末端力矩传感器 如果存在内置的末端力矩传感器,默认将使用内置的力矩传感器
std::vector< double > getTcpForceSensorPose()
获取传感器安装位姿
std::vector< double > getJointMinPositions()
获取关节最小位置(物理极限)
std::vector< double > getLimitJointMaxPositions()
获取关节最大位置(当前正在使用的限制值)
int setWorkObjectData(const WObjectData &wobj)
std::unordered_map< std::string, std::vector< double > > getKinematicsParam(bool real)
获取机器人DH参数 alpha a d theta beta
std::vector< double > getJointMaxSpeeds()
获取关节最大速度(物理极限)
int setPersistentParameters(const std::string &param)
设置需要保存到接口板底座的参数
double getLimitTcpMaxSpeed()
获取TCP最大速度(当前正在使用的限制值)
int setCollisionLevel(int level)
设置碰撞灵敏度等级 数值越大越灵敏
int getRobotEmergencyStopSource()
按位获取完整的机器人紧急停止触发源
int setHardwareCustomParameters(const std::string &param)
设置硬件抽象层自定义参数 目的是为了做不同硬件之间的兼容
uint32_t calcSafetyParametersCheckSum(const RobotSafetyParameterRange &parameters)
计算安全参数的 CRC32 校验值
std::vector< double > getLimitJointMinPositions()
获取关节最小位置(当前正在使用的限制值)
int setTcpForceOffset(const std::vector< double > &force_offset)
设置末端力矩偏移
std::vector< std::string > getTcpForceSensorNames()
获取可用的末端力矩传感器的名字
std::vector< double > getHomePosition()
获取机器人的原点位置
double getDefaultToolSpeed()
获取默认的工具端速度,单位m/s
Payload getPayload()
获取有效负载
std::string getRobotSubType()
获取机器人子类型代码
int getCollisionLevel()
获取碰撞灵敏度等级
std::vector< double > getTcpForceOffset()
获取末端力矩偏移
std::vector< double > getFreedriveDamp()
获取拖动阻尼
std::vector< double > getJointMaxPositions()
获取关节最大位置(物理极限)
int setTcpForceSensorPose(const std::vector< double > &sensor_pose)
设置传感器安装位姿
std::unordered_map< std::string, std::vector< double > > getKinematicsCompensate(double ref_temperature)
获取指定温度下的DH参数补偿值:alpha a d theta beta
bool toolSpaceInRange(const std::vector< double > &pose)
末端位姿是否在安全范围之内
int setGravity(const std::vector< double > &gravity)
设置机器人安装姿态
SafeguedStopType getSafeguardStopType()
获取当前安全停止的类型
int setMountingPose(const std::vector< double > &pose)
设置安装位姿(机器人的基坐标系相对于世界坐标系) world->base
std::vector< double > getBaseForceOffset()
获取底座力矩偏移
std::vector< double > getTcpOffset()
获取当前的TCP偏移
int getDof()
获取机器人的自由度(从硬件抽象层读取)
int getCollisionStopType()
获取碰撞停止类型
int setHomePosition(const std::vector< double > &positions)
设置机器人的原点位置
double getCycletime()
获取机器人的伺服控制周期(从硬件抽象层读取)
std::string getControlBoxType()
获取控制柜类型代码
std::vector< std::string > getBaseForceSensorNames()
获取可用的底座力矩传感器的名字
double getSlowDownFraction(int level)
获取预设的缓速模式下的速度缩减比例
std::vector< double > getMountingPose()
获取安装位姿(机器人的基坐标系相对于世界坐标系)
std::vector< double > getLimitJointMaxAccelerations()
获取关节最大加速度(当前正在使用的限制值)
std::vector< double > getTcpMaxAccelerations()
获取TCP最大加速度(物理极限)
std::tuple< std::string, double > getFirmwareUpdateProcess()
获取当前的固件升级的进程
int setRobotZero()
设置机器人关节零位
int setSlowDownFraction(int level, double fraction)
预设缓速模式下的速度缩减比例
int firmwareUpdate(const std::string &fw)
发起固件升级请求,控制器软件将进入固件升级模式
std::vector< double > getLimitJointMaxSpeeds()
获取关节最大速度(当前正在使用的限制值)
double getDefaultToolAcc()
获取默认的工具端加速度,单位m/s^2
std::vector< double > getGravity()
获取机器人的安装姿态
int selectBaseForceSensor(const std::string &name)
设置底座力矩传感器 如果存在内置的底座力矩传感器,默认将使用内置的力矩传感器
std::string getRobotType()
获取机器人类型代码
int confirmSafetyParameters(const RobotSafetyParameterRange &parameters)
发起确认安全配置参数请求: 将安全配置参数写入到安全接口板flash或文件
bool hasTcpForceSensor()
是否安装了末端力矩传感器
std::vector< double > getJointMaxAccelerations()
获取关节最大加速度(物理极限)
int setCollisionStopType(int type)
设置碰撞停止类型
int setPayload(double m, const std::vector< double > &cog, const std::vector< double > &aom, const std::vector< double > &inertia)
设置有效负载
uint32_t getSafetyParametersCheckSum()
获取安全参数校验码 CRC32
int setToolInertial(double m, const std::vector< double > &com, const std::vector< double > &inertial)
设置工具端质量、质心及惯量
int setFreedriveDamp(const std::vector< double > &damp)
设置拖动阻尼
std::vector< double > getTcpMaxSpeeds()
获取TCP最大速度(物理极限)
int setTcpOffset(const std::vector< double > &offset)
设置当前的TCP偏移
int attachRobotBaseTo(const std::string &frame)
std::shared_ptr< RobotConfig > RobotConfigPtr
std::tuple< double, std::vector< double >, std::vector< double >, std::vector< double > > Payload
Definition type_def.h:700
数据类型的定义