Settings
This page contains information on all functions present within settings.py and aims to give a clear understanding both of what these functions do and the requirements for any data to be input into them.
These functions will allow you to get and change the value of a variety of settings for the arm.
Functions
arm_settings
Source code in actions\settings.py
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 | |
calibrate_tcp_coordinate_offset(four_points, is_radian=None)
Four-point method to calibrate tool coordinate system position offset
Note
- only available if firmware_version >= 1.6.9
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
four_points
|
a list of four teaching coordinate positions [x, y, z, roll, pitch, yaw] |
required | |
is_radian
|
if the roll/pitch/yaw value of each point is in radians or not, defaults to self.default_is_radian |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple((code, xyz_offset)), returned result is only corrent when code is 0. |
|
code |
See the API Code Documentation for details. |
|
xyz_offset |
calculated xyz(mm) TCP offset, [x, y, z] |
Source code in actions\settings.py
1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 | |
calibrate_tcp_orientation_offset(rpy_be, rpy_bt, input_is_radian=None, return_is_radian=None)
An additional teaching point to calibrate the tool coordinate system attitude offset
Note
- only available if firmware_version >= 1.6.9
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rpy_be
|
the rpy value of the teaching point without TCP offset [roll, pitch, yaw] |
required | |
rpy_bt
|
the rpy value of the teaching point with TCP offset [roll, pitch, yaw] |
required | |
input_is_radian
|
if the roll/pitch/yaw value of rpy_be and rpy_bt is in radians or not, defaults to self.default_is_radian |
None
|
|
return_is_radian
|
if the roll/pitch/yaw value of result is in radians or not, defaults to self.default_is_radian |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple((code, rpy_offset)), returned result is only corrent when code is 0. |
|
code |
See the API Code Documentation for details. |
|
rpy_offset |
calculated rpy TCP offset, [roll, pitch, yaw] |
Source code in actions\settings.py
1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 | |
calibrate_user_coordinate_offset(rpy_ub, pos_b_uorg, is_radian=None)
An additional teaching point determines the position offset of the user coordinate system.
Note
- only available if firmware_version >= 1.6.9
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rpy_ub
|
the confirmed offset of the base coordinate system in the user coordinate system [roll, pitch, yaw], the result of calibrate_user_orientation_offset() |
required | |
pos_b_uorg
|
the position of the teaching point in the base coordinate system [x, y, z], if the arm cannot reach the target position, the user can manually input the position of the target in the base coordinate. |
required | |
is_radian
|
if the roll/pitch/yaw value of rpy_ub is in radians or not, defaults to self.default_is_radian |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple((code, xyz_offset)), returned result is only corrent when code is 0. |
|
code |
See the API Code Documentation for details. |
|
xyz_offset |
calculated xyz(mm) user offset, [x, y, z] |
Source code in actions\settings.py
1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 | |
calibrate_user_orientation_offset(three_points, mode=0, trust_ind=0, input_is_radian=None, return_is_radian=None)
Three-point method teaches user coordinate system posture offset
Note
- only available if firmware_version >= 1.6.9
- First determine a point in the working space, move along the desired coordinate system x+ to determine the second point, and then move along the desired coordinate system y+ to determine the third point.
- Note that the x+ direction is as accurate as possible.
- If the y+ direction is not completely perpendicular to x+, it will be corrected in the calculation process.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
three_points
|
a list of teaching TCP coordinate positions [x, y, z, roll, pitch, yaw] |
required | |
input_is_radian
|
if the roll/pitch/yaw value of each point is in radians or not, defaults to self.default_is_radian |
None
|
|
return_is_radian
|
if the roll/pitch/yaw value of the result should be in radians or not, defaults to self.default_is_radian |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple((code, rpy_offset)), returned result is only corrent when code is 0. |
|
code |
See the API Code Documentation for details. |
|
rpy_offset |
calculated rpy user offset, [roll, pitch, yaw] |
Source code in actions\settings.py
1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 | |
config_cgpio_reset_when_stop(on_off)
Configure the Controller GPIO reset the digital output when the robot is in stop state
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
on_off
|
True/False |
required |
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
550 551 552 553 554 555 556 557 558 559 560 | |
config_tgpio_reset_when_stop(on_off)
Configure the Tool GPIO reset the digital output when the robot is in stop state
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
on_off
|
True/False |
required |
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
538 539 540 541 542 543 544 545 546 547 548 | |
get_allow_approx_motion()
Obtain whether to enable approximate solutions to avoid certain singularities
Note
- only available if firmware_version >= 1.9.0
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 | |
get_base_board_version(board_id=10)
Get base board version
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
board_id
|
int |
10
|
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, str]
|
(code, version) |
code |
int
|
See the API Code Documentation for details. |
version |
str
|
base board version |
Source code in actions\settings.py
1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 | |
get_checkset_default_baud(type_)
Get the checkset baud value
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
type_
|
checkset type - 1: xarm gripper - 2: bio gripper - 3: robotiq gripper - 4: linear motor |
required |
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, int]
|
(code, baud) |
code |
int
|
See the API Code Documentation for details. |
baud |
int
|
the checkset baud value |
Source code in actions\settings.py
1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 | |
get_cmd_mat_history_num()
Get cmd mat history num
Note
Only available if firmware_version >= 2.3.0
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, int]
|
tuple((code, num)), returned result is only corrent when code is 0. |
code |
int
|
See the API Code Documentation for details. |
num |
int
|
cmd mat history num |
Source code in actions\settings.py
1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 | |
get_cmdnum()
Get the cmd count in cache
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, int]
|
tuple((code, cmd_num)), returned result is only corrent when code is 0. |
code |
int
|
See the API Code Documentation for details. |
cmd_num |
int
|
command count in cache |
Source code in actions\settings.py
140 141 142 143 144 145 146 147 148 149 150 151 | |
get_dh_params()
Get the DH parameters
Note
- only available if firmware_version >= 2.0.0
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, list]
|
tuple((code, dh_params)), returned result is only corrent when code is 0. |
code |
int
|
See the API Code Documentation for details. |
dh_params |
list[float]
|
DH parameters
|
Source code in actions\settings.py
1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 | |
get_external_device_monitor_params()
Get the monitor params of the external device
Note
- only available if firmware_version >= 2.7.100
Returns:
| Name | Type | Description |
|---|---|---|
|
out tuple[int, int]: tuple((code, params)), returned result is only corrent when code is 0. |
||
code |
int
|
See the API Code Documentation for details. |
params |
int
|
[dev_type, frequency] |
Source code in actions\settings.py
1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 | |
get_fdb_mat_history_num()
Get fdb mat history num
Note
Only available if firmware_version >= 2.3.0
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, int]
|
tuple((code, num)), returned result is only corrent when code is 0. |
code |
int
|
See the API Code Documentation for details. |
num |
int
|
fdb mat history num |
Source code in actions\settings.py
1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 | |
get_forward_kinematics(angles, input_is_radian=None, return_is_radian=None)
Get forward kinematics
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
angles
|
[angle-1, angle-2, ..., angle-n], n is the number of axes of the arm |
required | |
input_is_radian
|
the param angles value is in radians or not, defaults to self.default_is_radian |
None
|
|
return_is_radian
|
the returned value is in radians or not, defaults to self.default_is_radian |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, list]
|
tuple((code, pose)), returned result is only corrent when code is 0. |
code |
int
|
See the API Code Documentation for details. |
pose |
list[float]
|
[x(mm), y(mm), z(mm), roll(rad or °), pitch(rad or °), yaw(rad or °)] or [] Note: the roll/pitch/yaw value is radians if return_is_radian is True, else ° |
Source code in actions\settings.py
462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 | |
get_gripper_version()
Get gripper version, only for debug
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, str]
|
tuple((code, version)) |
code |
int
|
See the API Code Documentation for details. |
version |
str
|
gripper version |
Source code in actions\settings.py
927 928 929 930 931 932 933 934 935 936 937 938 | |
get_harmonic_type(servo_id=1)
Get harmonic type, only for debug
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, int]
|
(code, type) |
code |
int
|
See the API Code Documentation for details. |
type |
int
|
harmonic type |
Source code in actions\settings.py
969 970 971 972 973 974 975 976 977 978 979 980 | |
get_hd_types()
Get harmonic types, only for debug
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, list]
|
(code, types) |
code |
int
|
See the API Code Documentation for details. |
types |
list
|
list of harmonic types |
Source code in actions\settings.py
982 983 984 985 986 987 988 989 990 991 992 993 | |
get_iden_status()
Get iden status
Note
Only available if firmware_version >= 2.3.0
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, int]
|
tuple((code, status)), returned result is only corrent when code is 0. |
code |
int
|
See the API Code Documentation for details. |
status |
int
|
1 means in identifying, 0 means not in identifying |
Source code in actions\settings.py
1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 | |
get_initial_point()
Get the initial point from studio
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, list]
|
tuple((code, point)), returned result is only corrent when code is 0. |
code |
int
|
See the API Code Documentation for details. |
point |
list
|
initial point, [J1, J2, ..., J7] |
Source code in actions\settings.py
1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 | |
get_inverse_kinematics(pose, input_is_radian=None, return_is_radian=None, limited=True, ref_angles=None)
Get inverse kinematics
Note
- the roll/pitch/yaw unit is radian if input_is_radian is True, else °
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pose
|
[x(mm), y(mm), z(mm), roll(rad or °), pitch(rad or °), yaw(rad or °)] |
required | |
input_is_radian
|
if the param pose value(only roll/pitch/yaw) is in radians or not, defaults to self.default_is_radian |
None
|
|
return_is_radian
|
if the returned value should be in radians or not, defaults to self.default_is_radian |
None
|
|
limited
|
if the result is limited to within ±180° or not, default is True(only available if firmware_version >= 2.7.103) |
True
|
|
ref_angles
|
reference values for joint angles Note: unit is radian if input_is_radian is True, else ° Note: only available if firmware_version >= 2.7.103 |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, list]
|
tuple((code, angles)), returned result is only corrent when code is 0. |
code |
int
|
See the API Code Documentation for details. |
angles |
list[float]
|
[angle-1(rad or °), angle-2, ..., angle-(Number of axes)] or [] Note: the returned angle value is radians if return_is_radian is True, else ° |
Source code in actions\settings.py
431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 | |
get_is_moving()
Check if the arm is moving or not
Returns:
| Name | Type | Description |
|---|---|---|
out |
bool
|
True/False |
Source code in actions\settings.py
131 132 133 134 135 136 137 138 | |
get_joint_states(is_radian=None, num=3)
Get the joint states
Note
- only available if firmware_version >= 1.9.0
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
is_radian
|
if the returned value(position and velocity) is in radians or not, defaults to self.default_is_radian |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, [list]]
|
tuple((code, [position, velocity, effort])), returned result is only corrent when code is 0. |
code |
int
|
See the API Code Documentation for details. |
position |
list[float]
|
the angles of joints, like [angle-1, ..., angle-7] |
velocity |
list[float]
|
the velocities of joints, like [velo-1, ..., velo-7] |
effort |
list[float]
|
the efforts of joints, like [effort-1, ..., effort-7] |
Source code in actions\settings.py
1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 | |
get_joints_torque()
Get joint torque
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, list]
|
tuple((code, joints_torque)) |
code |
int
|
See the API Code Documentation for details. |
joints_torque |
list
|
joint torque |
Source code in actions\settings.py
1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 | |
get_linear_spd_limit_factor()
Get linear speed limit factor
Note
Only available if firmware_version >= 2.3.0
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, float]
|
tuple((code, factor)), returned result is only corrent when code is 0. |
code |
int
|
See the API Code Documentation for details. |
factor |
float
|
linear speed limit factor |
Source code in actions\settings.py
1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 | |
get_mount_direction()
Get the mount degrees from studio
Returns:
| Name | Type | Description |
|---|---|---|
ou |
tuple[int, list]
|
tuple((code, degrees)), returned result is only corrent when code is 0. |
code |
int
|
See the API Code Documentation for details. |
degrees |
list
|
mount degrees, [tilt angle, rotate angle] |
Source code in actions\settings.py
1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 | |
get_poe_status()
Get poe status
Note
Only available if firmware_version >= 2.3.0
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, int]
|
tuple((code, status)), returned result is only corrent when code is 0. |
code |
int
|
See the API Code Documentation for details. |
status |
int
|
1 means poe is valid, 0 means poe is invalid |
Source code in actions\settings.py
1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 | |
get_pose_offset(pose1, pose2, orient_type_in=0, orient_type_out=0, is_radian=None)
Calculate the pose offset of two given points
Note
- x, y, z are all in mm
- roll/rx, pitch/ry, yaw/rz are in either degrees or radians, can be selected by changing parameter is_radian
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pose1
|
[x, y, z, roll/rx, pitch/ry, yaw/rz] |
required | |
pose2
|
[x, y, z, roll/rx, pitch/ry, yaw/rz] |
required | |
orient_type_in
|
input attitude notation, 0 is RPY(roll/pitch/yaw) (default), 1 is axis angle(rx/ry/rz) |
0
|
|
orient_type_out
|
notation of output attitude, 0 is RPY (default), 1 is axis angle |
0
|
|
is_radian
|
if the roll/rx/pitch/ry/yaw/rz of pose1/pose2/return_pose is in radians or not |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, list]
|
tuple((code, pose)), returned result is only corrent when code is 0. |
code |
int
|
See the API Code Documentation for details. |
pose |
list[float]
|
[x(mm), y(mm), z(mm), roll/rx(rad or °), pitch/ry(rad or °), yaw/rz(rad or °)] |
Source code in actions\settings.py
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | |
get_position(is_radian=None)
Get the cartesian position
Note
- If the value(roll/pitch/yaw) you want returned should be in radians, set is_radian to True ex: code, pos = arm.get_position(is_radian=True)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
is_radian
|
if the returned value (only roll/pitch/yaw) is in radians or not, defaults to self.default_is_radian |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, list]
|
tuple((code, [x, y, z, roll, pitch, yaw])), returned result is only corrent when code is 0. |
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | |
get_position_aa(is_radian=None)
Get the pose represented by the axis angle pose
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
is_radian
|
if the returned value (only rx/ry/rz) is in radians or not, defaults to self.default_is_radian |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, list]
|
tuple((code, [x, y, z, rx, ry, rz])), returned result is only corrent when code is 0. |
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
194 195 196 197 198 199 200 201 202 203 204 205 206 | |
get_reduced_mode()
Get reduced mode
Note
- This interface relies on Firmware 1.2.0 or above
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, int]
|
tuple((code, mode)) |
code |
int
|
See the API Code Documentation for details. |
mode |
int
|
0 or 1, 1 means the reduced mode is on. 0 means the reduced mode is not on |
Source code in actions\settings.py
688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 | |
get_reduced_states(is_radian=None)
Get states of the reduced mode
Note
- This interface relies on Firmware 1.2.0 or above
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
is_radian
|
if the max_joint_speed of the states is in radians or not, defaults to self.default_is_radian |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, list]
|
tuple((code, states)) |
code |
int
|
See the API Code Documentation for details. |
states |
list
|
[....] if version > 1.2.11: states: [ reduced_mode_is_on, [reduced_x_max, reduced_x_min, reduced_y_max, reduced_y_min, reduced_z_max, reduced_z_min], reduced_max_tcp_speed, reduced_max_joint_speed, joint_ranges([joint-1-min, joint-1-max, ..., joint-7-min, joint-7-max]), safety_boundary_is_on, collision_rebound_is_on, ] if version <= 1.2.11: states: [ reduced_mode_is_on, [reduced_x_max, reduced_x_min, reduced_y_max, reduced_y_min, reduced_z_max, reduced_z_min], reduced_max_tcp_speed, reduced_max_joint_speed, ] |
Source code in actions\settings.py
704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 | |
get_report_tau_or_i()
Get the reported torque or electric current
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, int]
|
tuple((code, tau_or_i)) |
code |
int
|
See the API Code Documentation for details. |
tau_or_i |
int
|
|
Source code in actions\settings.py
576 577 578 579 580 581 582 583 584 585 586 587 588 589 | |
get_robot_sn()
Gets the xArm sn
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, str]
|
tuple((code, sn)), returned result is only corrent when code is 0. |
code |
int
|
See the API Code Documentation for details. |
sn |
str
|
the xArm sn |
Source code in actions\settings.py
675 676 677 678 679 680 681 682 683 684 685 686 | |
get_servo_angle(servo_id=None, is_radian=None, is_real=False)
Get the servo angle
Note
- If the value you want returned should be in radians, set is_radian to True ex: code, angles = arm.get_servo_angle(is_radian=True)
- If you want to return only the angle of a single joint, please set the parameter servo_id ex: code, angle = arm.get_servo_angle(servo_id=2)
- This interface is only used in the base coordinate system.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
servo_id
|
1-(Number of axes), None(8), default is None |
None
|
|
is_radian
|
the returned value is in radians or not, defaults to self.default_is_radian |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, list | float]
|
tuple((code, angle list if servo_id is None or 8 else angle)), returned result is only corrent when code is 0. |
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | |
get_servo_debug_msg(show=False, lang='en')
Get the servo debug msg, used only for debugging
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
show
|
show the detail info if True |
False
|
|
lang
|
language, en/cn, default is en |
'en'
|
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, list]
|
tuple((code, servo_info_list)), returned result is only corrent when code is 0. |
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 | |
get_servo_version(servo_id=1)
Get servo version, only for debug
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
servo_id
|
servo id(1~7) |
1
|
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, str]
|
tuple((code, version)) |
code |
int
|
See the API Code Documentation for details. |
version |
str
|
servo version |
Source code in actions\settings.py
940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 | |
get_state()
Get state
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, int]
|
tuple((code, state)), returned result is only corrent when code is 0. |
code |
int
|
See the API Code Documentation for details. |
state |
int
|
state - 1: in motion - 2: sleeping - 3: suspended - 4: stopping |
Source code in actions\settings.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | |
get_tgpio_version()
Get tool gpio version, only for debug
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, str]
|
tuple((code, version)) |
code |
int
|
See the API Code Documentation for details. |
version |
str
|
tool gpio version |
Source code in actions\settings.py
956 957 958 959 960 961 962 963 964 965 966 967 | |
get_version()
Get the xArm firmware version
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, str]
|
tuple((code, version)), returned result is only corrent when code is 0. |
code |
int
|
See the API Code Documentation for details. |
version |
str
|
firmware version, such as '6,9, ,XX0000,v2.4.0' |
Source code in actions\settings.py
101 102 103 104 105 106 107 108 109 110 111 112 | |
iden_joint_friction(sn=None)
Identification of the friction
Note
- only available if firmware_version >= 1.9.0
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sn
|
sn value |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, int]
|
tuple((code, result)) returned result is only corrent when code is 0. |
code |
int
|
See the API Code Documentation for details. |
result |
int
|
|
Source code in actions\settings.py
1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 | |
iden_tcp_load(estimated_mass=0)
Identification the tcp load with current
Note
- only available if firmware_version >= 1.8.0
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
estimated_mass
|
estimated mass Note: this parameter is only available on the lite6 model manipulator, and this parameter must be specified for the lite6 model manipulator |
0
|
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, list]
|
tuple((code, load)) returned result is only corrent when code is 0. |
code |
int
|
See the API Code Documentation for details. |
load |
list
|
[mass, x_centroid, y_centroid, z_centroid] |
Source code in actions\settings.py
1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 | |
is_joint_limit(joint, is_radian=None)
Check the joint angle is within limit
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint
|
[angle-1, angle-2, ..., angle-n], n is the number of axes of the arm |
required | |
is_radian
|
angle value is radians or not, defaults to self.default_is_radian |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, bool]
|
tuple((code, limit)), returned result is only corrent when code is 0. |
code |
int
|
See the API Code Documentation for details. |
limit |
bool
|
True/False/None, limit or not, or failed |
Source code in actions\settings.py
893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 | |
is_tcp_limit(pose, is_radian=None)
Check the tcp pose is within limit
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pose
|
[x, y, z, roll, pitch, yaw] |
required | |
is_radian
|
roll/pitch/yaw value is radians or not, defaults to self.default_is_radian |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
out |
tuple[int, bool]
|
tuple((code, limit)), returned result is only corrent when code is 0. |
code |
int
|
See the API Code Documentation for details. |
limit |
bool
|
True/False/None, limit or not, or failed |
Source code in actions\settings.py
875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 | |
motion_enable(enable=True, servo_id=None)
Enable motion
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
enable
|
True/False |
True
|
|
servo_id
|
1-(Number of axes), None(8) |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
73 74 75 76 77 78 79 80 81 82 83 84 85 | |
set_allow_approx_motion(on_off)
Settings to allow avoiding overspeed near some singularities using approximate solutions
Note
- only available if firmware_version >= 1.9.0
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
on_off
|
whether to allow or not, True: allow, default is False |
required |
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 | |
set_baud_checkset_enable(enable)
Enable auto checkset the baudrate of the end IO board or not
Note
only available in the API of gripper/bio/robotiq/linear_motor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
enable
|
True/False |
required |
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 | |
set_cartesian_velo_continuous(on_off)
Set cartesian motion velocity continuous
Note
- only available if firmware_version >= 1.9.0
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
on_off
|
whether motion is continuous or not, True: continuous, defaults to False |
required |
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 | |
set_cgpio_analog_with_xyz(ionum, value, xyz, fault_tolerance_radius)
Set the analog value of the specified Controller GPIO when the robot has reached the specified xyz position
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ionum
|
0 ~ 1 |
required | |
value
|
value |
required | |
xyz
|
position xyz, as [x, y, z] |
required | |
fault_tolerance_radius
|
fault tolerance radius |
required |
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 | |
set_cgpio_digital_with_xyz(ionum, value, xyz, fault_tolerance_radius)
Set the digital value of the specified Controller GPIO when the robot has reached the specified xyz position
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ionum
|
0 ~ 15 |
required | |
value
|
value |
required | |
xyz
|
position xyz, as [x, y, z] |
required | |
fault_tolerance_radius
|
fault tolerance radius |
required |
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 | |
set_checkset_default_baud(type_, baud)
Set the checkset baud value
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
type_
|
checkset type - 1: xarm gripper - 2: bio gripper - 3: robotiq gripper - 4: linear motor |
required | |
baud
|
checkset baud value, less than or equal to 0 means disable checkset |
required |
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 | |
set_cmd_mat_history_num(num)
Set cmd mat history num
Note
Only available if firmware_version >= 2.3.0
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
num
|
history num |
required |
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 | |
set_collision_rebound(on)
Turn on/off collision rebound
Note
- This interface relies on Firmware 1.2.11 or above
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
on
|
True/False |
required |
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
841 842 843 844 845 846 847 848 849 850 851 852 853 854 | |
set_collision_sensitivity(value, wait=True)
Set the sensitivity to collision
Note
- Use only if necessary.
- Changes are not saved automatically. Call save_conf() to save the settings, otherwise they will be lost after a reboot.
- Use clean_conf() to restore the system default settings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
sensitivity value, 0~5 |
required | |
wait
|
reversed |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 | |
set_collision_tool_model(tool_type, *args, **kwargs)
Set the geometric model of the end effector for self collision detection
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tool_type
|
the geometric model type
|
required | |
args
|
additional parameters |
()
|
|
kwargs
|
additional parameters |
{}
|
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 | |
set_counter_increase(val=1)
Set counter plus value, only supports increasing by 1
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
val
|
reversed |
1
|
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 | |
set_counter_reset()
Reset counter value
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
995 996 997 998 999 1000 1001 1002 | |
set_dh_params(dh_params, flag=0)
Set the DH parameters
Note
- only available if firmware_version >= 2.0.0
- this interface is only provided for users who need to use external DH parameters, ordinary users should not try to modify DH parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dh_params
|
DH parameters |
required | |
flag
|
|
0
|
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 | |
set_external_device_monitor_params(dev_type, frequency)
Set the monitor params of the external device
Note
- only available if firmware_version >= 2.7.100
- after it is turned on, the position/speed/current information of the external device will be reported through port 30000
- once an error occurs, you need to re call to monitor
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dev_type
|
the type of the external device
|
required | |
frequency
|
the frequency of communication with the external device |
required |
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 | |
set_fdb_mat_history_num(num)
Set fdb mat history num
Note
Only available if firmware_version >= 2.3.0
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
num
|
history num |
required |
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 | |
set_feedback_type(feedback_type)
Set the feedback type
Note
- only available if firmware_version >= 2.1.0
- only works in position mode
- the setting will only affect subsequent tasks and will not affect previously cached tasks
- only valid for the current connection
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
feedback_type
|
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 | |
set_fence_mode(on)
Turn on/off fence mode
Note
- This interface relies on Firmware 1.2.11 or above
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
on
|
True/False |
required |
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
826 827 828 829 830 831 832 833 834 835 836 837 838 839 | |
set_gravity_direction(direction, wait=True)
Set the gravity direction for proper torque compensation and collision detection.
Note
- Use only if necessary. Incorrect settings may affect torque compensation.
- Changes are not saved automatically. Call save_conf() to save the settings, otherwise they will be lost after a reboot.
- Use clean_conf() to restore the system default settings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
direction
|
Gravity direction vector [x, y, z], e.g., [0, 0, -1] for a floor-mounted arm. |
required | |
wait
|
Whether to wait for the robotic arm to stop or clear all previous queued commands before applying the setting. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 | |
set_initial_point(point)
Set the initial point
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
point
|
initial point, [J1, J2, ..., J7] |
required |
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 | |
set_joint_jerk(jerk, is_radian=None)
Set the jerk of Joint space
Note
- Use only if necessary.
- Changes are not saved automatically. Call save_conf() to save the settings, otherwise they will be lost after a reboot.
- Use clean_conf() to restore the system default settings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
jerk
|
jerk (°/s^3 or rad/s^3) |
required | |
is_radian
|
if the jerk is in radians or not, defaults to self.default_is_radian |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 | |
set_joint_maxacc(acc, is_radian=None)
Set the max acceleration of Joint space
Note
- Use only if necessary.
- Changes are not saved automatically. Call save_conf() to save the settings, otherwise they will be lost after a reboot.
- Use clean_conf() to restore the system default settings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
acc
|
max acceleration (°/s^2 or rad/s^2) |
required | |
is_radian
|
if the jerk is in radians or not, defaults to self.default_is_radian |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 | |
set_linear_spd_limit_factor(factor)
Set linear speed limit factor (default is 1.2)
Note
- only available if firmware_version >= 2.3.0
- only available in mode 1
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
factor
|
speed limit factor |
required |
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 | |
set_mode(mode=0, detection_param=0)
Set the xArm mode
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
default 0 0: position control 1: servo motion Note: the use of the set_servo_angle_j interface must first be set to this Note: the use of the set_servo_cartesian interface must first be set to this 2: joint teaching Note: use this mode to ensure that the arm has been identified and the control box and arm used for identification are one-to-one. 3: cartesian teaching (invalid) 4: joint velocity control 5: cartesian velocity control 6: joint online trajectory planning 7: cartesian online trajectory planning |
0
|
|
detection_param
|
Teaching detection parameters, default is 0 0: motion detection on 1: motion detection off Note:
|
0
|
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | |
set_mount_direction(base_tilt_deg, rotation_deg, is_radian=None)
Set the mount direction
Note
- Use only if necessary.
- Changes are not saved automatically. Call save_conf() to save the settings, otherwise they will be lost after a reboot.
- Use clean_conf() to restore the system default settings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_tilt_deg
|
tilt degree |
required | |
rotation_deg
|
rotation degree |
required | |
is_radian
|
if the base_tilt_deg/rotation_deg is in radians or not, defaults to self.default_is_radian |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 | |
set_only_check_type(only_check_type=0)
Set the motion process detection type (valid for all motion interfaces of the current SDK instance)
Note
- only available if firmware_version >= 1.11.100
- This interface is a global configuration item of the current SDK, and affects all motion-related interfaces
- Generally, you only need to call when you don't want to move the robotic arm and only check whether some paths will have self-collision/angle-limit/cartesian-limit/overspeed.
- Currently only self-collision/angle-limit/cartesian-limit/overspeed are detected
- If only_check_type is set to be greater than 0, and the return value of calling the motion interface is not 0, you can view arm.only_check_result to view the specific error code
(Common scenarios, here is an example of the set_position interface)
-
-
Check whether the process from point A to point B is normal (no self-collision and overspeed triggered)
-
1.1 Move to point A
-
arm.set_only_check_type(0)
-
code = arm.set_position(A)
-
-
1.2 Check if the process from point A to point B is normal (no self-collision and overspeed triggered)
-
arm.set_only_check_type(1)
-
code = arm.set_position(B)
-
If code is not equal to 0, it means that the path does not pass. You can check the specific error code through arm.only_check_result
-
arm.set_only_check_type(0)
-
-
-
-
Check whether the process from point A to point B, C, and D to point E is normal (no self-collision and overspeed are triggered)
-
2.1 Move to point A
-
arm.set_only_check_type(0)
-
code = arm.set_position(A)
-
-
2.2 Check whether the process of point A passing through points B, C, D to point E is normal (no self-collision and overspeed are triggered)
-
arm.set_only_check_type(3)
-
code = arm.set_position(B)
-
If code is not equal to 0, it means that the path does not pass. You can check the specific error code through arm.only_check_result
-
code = arm.set_position(C)
-
If code is not equal to 0, it means that the path does not pass. You can check the specific error code through arm.only_check_result
-
code = arm.set_position(D)
-
If code is not equal to 0, it means that the path does not pass. You can check the specific error code through arm.only_check_result
-
code = arm.set_position(E)
-
If code is not equal to 0, it means that the path does not pass. You can check the specific error code through arm.only_check_result
-
arm.set_only_check_type(0)
-
-
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
only_check_type
|
Motion Detection Type
|
0
|
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 | |
set_pause_time(sltime, wait=False)
Set the arm pause time, xArm will pause sltime second
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sltime
|
sleep time,unit:(s)second |
required | |
wait
|
wait or not, default is False |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
87 88 89 90 91 92 93 94 95 96 97 98 99 | |
set_reduced_joint_range(joint_range, is_radian=None)
Set the joint range of the reduced mode
Note
- This interface relies on Firmware 1.2.11 or above
- Only reset the reduced mode to take effect (
set_reduced_mode(True))
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_range
|
[joint-1-min, joint-1-max, ..., joint-7-min, joint-7-max] |
required | |
is_radian
|
the param joint_range are in radians or not, defaults to self.default_is_radian |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 | |
set_reduced_max_joint_speed(speed, is_radian=None)
Set the maximum joint speed of the reduced mode
Note
- This interface relies on Firmware 1.2.0 or above
- Only reset the reduced mode to take effect (
set_reduced_mode(True))
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
speed
|
speed (°/s or rad/s) |
required | |
is_radian
|
the speed is in radians or not, defaults to self.default_is_radian |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 | |
set_reduced_max_tcp_speed(speed)
Set the maximum tcp speed of the reduced mode
Note
- This interface relies on Firmware 1.2.0 or above
- Only reset the reduced mode to take effect (
set_reduced_mode(True))
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
speed
|
speed (mm/s) |
required |
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 | |
set_reduced_tcp_boundary(boundary)
Set the boundary of the safety boundary mode
Note
- This interface relies on Firmware 1.2.0 or above
- Only reset the reduced mode to take effect (
set_reduced_mode(True))
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
boundary
|
[x_max, x_min, y_max, y_min, z_max, z_min] |
required |
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 | |
set_report_tau_or_i(tau_or_i=0)
Set if torque or electric current is reported
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tau_or_i
|
|
0
|
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
562 563 564 565 566 567 568 569 570 571 572 573 574 | |
set_self_collision_detection(on_off)
Set whether to enable self-collision detection
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
on_off
|
enable or not |
required |
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
591 592 593 594 595 596 597 598 599 600 601 | |
set_simulation_robot(on_off)
Set the simulation robot
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
on_off
|
True/False |
required |
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 | |
set_state(state=0)
Set the xArm state
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
state
|
default 0
|
0
|
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | |
set_tcp_jerk(jerk)
Set the translational jerk of Cartesian space
Note
- Do not use if not required
- If not saved, it will be lost after reboot
- The save_conf interface can record the current settings and will not be lost after the restart.
- The clean_conf interface can restore system default settings
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
jerk
|
jerk (mm/s^3) |
required |
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 | |
set_tcp_load(weight, center_of_gravity, wait=False, **kwargs)
Set the end load of xArm
Note
- Use only if necessary.
- Changes are not saved automatically. Call save_conf() to save the settings, otherwise they will be lost after a reboot.
- Use clean_conf() to restore the system default settings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
weight
|
load weight (unit: kg) |
required | |
center_of_gravity
|
load center of gravity, such as [x(mm), y(mm), z(mm)] |
required | |
wait
|
whether to wait for the command to be executed or for the robotic arm to stop |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 | |
set_tcp_maxacc(acc)
Set the max translational acceleration of Cartesian space
Note
- Use only if necessary.
- Changes are not saved automatically. Call save_conf() to save the settings, otherwise they will be lost after a reboot.
- Use clean_conf() to restore the system default settings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
acc
|
max acceleration (mm/s^2) |
required |
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 | |
set_tcp_offset(offset, is_radian=None, wait=True, **kwargs)
Set the tool coordinate system offset at the end
Note
- Do not use if not required
- If not saved and you want to revert to the last saved value, please reset the offset by set_tcp_offset([0, 0, 0, 0, 0, 0])
- If not saved, it will be lost after reboot
- The save_conf interface can record the current settings and will not be lost after the restart.
- The clean_conf interface can restore system default settings
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
offset
|
[x, y, z, roll, pitch, yaw] |
required | |
is_radian
|
the roll/pitch/yaw in radians or not, defaults to self.default_is_radian |
None
|
|
wait
|
whether to wait for the robotic arm to stop or all previous queue commands to be executed or cleared before setting |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 | |
set_teach_sensitivity(value, wait=True)
Set the sensitivity of drag and teach
Note
- Use only if necessary.
- Changes are not saved automatically. Call save_conf() to save the settings, otherwise they will be lost after a reboot.
- Use clean_conf() to restore the system default settings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
sensitivity value, 1~5 |
required | |
wait
|
whether to wait for the robotic arm to stop or all previous queue commands to be executed or cleared before setting |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 | |
set_tgpio_digital_with_xyz(ionum, value, xyz, fault_tolerance_radius)
Set the digital value of the specified Tool GPIO when the robot has reached the specified xyz position
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ionum
|
0 or 1 |
required | |
value
|
value |
required | |
xyz
|
position xyz, as [x, y, z] |
required | |
fault_tolerance_radius
|
fault tolerance radius |
required |
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 | |
set_timeout(timeout)
Set the timeout of cmd response
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
timeout
|
seconds |
required |
Source code in actions\settings.py
1029 1030 1031 1032 1033 1034 1035 1036 | |
set_world_offset(offset, is_radian=None, wait=True)
Set the base coordinate offset
Note
- This interface relies on Firmware 1.2.11 or above
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
offset
|
[x, y, z, roll, pitch, yaw] |
required | |
is_radian
|
if the roll/pitch/yaw is in radians or not, defaults to self.default_is_radian |
None
|
|
wait
|
whether to wait for the robotic arm to stop or all previous queue commands to be executed/cleared before setting |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
code |
int
|
See the API Code Documentation for details. |
Source code in actions\settings.py
856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 | |