19 #include "../../include/dynamixel_workbench_toolbox/dynamixel_workbench.h" 44 result =
itemWrite(
id,
"Torque_Enable", (int32_t)onoff, log);
47 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to change torque status!";
51 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to change torque status!";
59 result =
torque(
id, 1, log);
68 result =
torque(
id, 0, log);
78 if (result ==
false)
return false;
83 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to change ID!";
88 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to change ID!";
97 if (result ==
false)
return false;
101 switch (new_baudrate)
158 switch (new_baudrate)
201 #if defined(__OPENCR__) || defined(__OPENCM904__) 209 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to change Baud Rate!";
213 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to change Baud Rate!";
224 if (!strncmp(
model_name,
"MX-28-2", strlen(
"MX-28-2")) ||
225 !strncmp(
model_name,
"MX-64-2", strlen(
"MX-64-2")) ||
226 !strncmp(
model_name,
"MX-106-2", strlen(
"MX-106-2")) ||
228 !strncmp(
model_name,
"XL430", strlen(
"XL430")) ||
229 !strncmp(
model_name,
"XC430", strlen(
"XC430")) ||
233 result =
writeRegister(
id,
"Protocol_Version", version, log);
236 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to set protocol version!";
243 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to set protocol version!";
264 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to change led status!";
268 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to change led status!";
276 result =
led(
id, 1, log);
285 result =
led(
id, 0, log);
298 if (!strncmp(
model_name,
"MX-28-2", strlen(
"MX-28-2")) ||
299 !strncmp(
model_name,
"MX-64-2", strlen(
"MX-64-2")) ||
300 !strncmp(
model_name,
"MX-106-2", strlen(
"MX-106-2")) ||
302 !strncmp(
model_name,
"XL430", strlen(
"XL430")) ||
303 !strncmp(
model_name,
"XC430", strlen(
"XC430")) ||
309 data = data & 0b00000100;
313 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to set normal direction!";
318 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to set normal direction!";
330 if (!strncmp(
model_name,
"MX-28-2", strlen(
"MX-28-2")) ||
331 !strncmp(
model_name,
"MX-64-2", strlen(
"MX-64-2")) ||
332 !strncmp(
model_name,
"MX-106-2", strlen(
"MX-106-2")) ||
334 !strncmp(
model_name,
"XL430", strlen(
"XL430")) ||
335 !strncmp(
model_name,
"XC430", strlen(
"XC430")) ||
341 data = data | 0b00000001;
345 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to set reverse direction!";
350 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to set reverse direction!";
362 if (!strncmp(
model_name,
"MX-28-2", strlen(
"MX-28-2")) ||
363 !strncmp(
model_name,
"MX-64-2", strlen(
"MX-64-2")) ||
364 !strncmp(
model_name,
"MX-106-2", strlen(
"MX-106-2")) ||
366 !strncmp(
model_name,
"XL430", strlen(
"XL430")) ||
367 !strncmp(
model_name,
"XC430", strlen(
"XC430")) ||
373 data = data & 0b00000001;
377 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to set velocity based profile!";
382 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to set velocity based profile!";
394 if (!strncmp(
model_name,
"MX-28-2", strlen(
"MX-28-2")) ||
395 !strncmp(
model_name,
"MX-64-2", strlen(
"MX-64-2")) ||
396 !strncmp(
model_name,
"MX-106-2", strlen(
"MX-106-2")) ||
398 !strncmp(
model_name,
"XL430", strlen(
"XL430")) ||
399 !strncmp(
model_name,
"XC430", strlen(
"XC430")) ||
405 data = data | 0b00000100;
409 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to set time based profile!";
414 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to set time based profile!";
425 if (!strncmp(
model_name,
"MX-28-2", strlen(
"MX-28-2")) ||
426 !strncmp(
model_name,
"MX-64-2", strlen(
"MX-64-2")) ||
427 !strncmp(
model_name,
"MX-106-2", strlen(
"MX-106-2")) ||
429 !strncmp(
model_name,
"XL430", strlen(
"XL430")) ||
430 !strncmp(
model_name,
"XC430", strlen(
"XC430")) ||
436 if (result ==
false)
return false;
438 result =
writeRegister(
id,
"Secondary_ID", secondary_id, log);
441 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to set secondary ID!";
448 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to set secondary ID!";
460 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to set Position Control Mode!";
464 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to set Position Control Mode!";
476 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to set Velocity Control Mode!";
480 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to set Velocity Control Mode!";
492 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to set Current Control Mode!";
496 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to set Current Control Mode!";
508 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to set Torque Control Mode!";
512 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to set Torque Control Mode!";
524 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to set Extended Position Control Mode!";
528 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to set Extended Position Control Mode!";
540 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to set Multi-Turn Control Mode!";
544 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to set Multi-Turn Control Mode!";
556 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to set Current Based Position Control Mode!";
560 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to set Current Based Position Control Mode!";
572 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to set PWM Control Mode!";
576 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to set PWM Control Mode!";
591 if (!strncmp(
model_name,
"MX-28-2", strlen(
"MX-28-2")) ||
592 !strncmp(
model_name,
"MX-64-2", strlen(
"MX-64-2")) ||
593 !strncmp(
model_name,
"MX-106-2", strlen(
"MX-106-2")) ||
594 !strncmp(
model_name,
"XL430", strlen(
"XL430")) ||
595 !strncmp(
model_name,
"XC430", strlen(
"XC430")) ||
617 if (!strncmp(
model_name,
"MX-28-2", strlen(
"MX-28-2")) ||
618 !strncmp(
model_name,
"MX-64-2", strlen(
"MX-64-2")) ||
619 !strncmp(
model_name,
"MX-106-2", strlen(
"MX-106-2")) ||
620 !strncmp(
model_name,
"XL430", strlen(
"XL430")) ||
621 !strncmp(
model_name,
"XC430", strlen(
"XC430")) ||
637 if (!strncmp(
model_name,
"XM", strlen(
"XM")) ||
640 !strncmp(
model_name,
"MX-64-2", strlen(
"MX-64-2")) ||
641 !strncmp(
model_name,
"MX-106-2", strlen(
"MX-106-2")) ||
649 if (!strncmp(
model_name,
"MX-64", strlen(
"MX-64")) ||
650 !strncmp(
model_name,
"MX-106", strlen(
"MX-106")) )
652 result =
writeRegister(
id,
"Torque_Control_Mode_Enable", 1, log);
657 if (!strncmp(
model_name,
"MX-64", strlen(
"MX-64")) ||
658 !strncmp(
model_name,
"MX-106", strlen(
"MX-106")) )
666 if (!strncmp(
model_name,
"MX-64-2", strlen(
"MX-64-2")) ||
667 !strncmp(
model_name,
"MX-106-2", strlen(
"MX-106-2")) ||
678 if (!strncmp(
model_name,
"MX-28-2", strlen(
"MX-28-2")) ||
679 !strncmp(
model_name,
"MX-64-2", strlen(
"MX-64-2")) ||
680 !strncmp(
model_name,
"MX-106-2", strlen(
"MX-106-2")) ||
693 if (!strncmp(
model_name,
"XL-320", strlen(
"XL-320")))
700 if (!strncmp(
model_name,
"XL-320", strlen(
"XL-320")))
707 if (!strncmp(
model_name,
"XM", strlen(
"XM")) ||
710 !strncmp(
model_name,
"MX-64-2", strlen(
"MX-64-2")) ||
711 !strncmp(
model_name,
"MX-106-2", strlen(
"MX-106-2")) ||
713 !strncmp(
model_name,
"PRO-PLUS", strlen(
"PRO-PLUS")))
720 if (!strncmp(
model_name,
"PRO", strlen(
"PRO")) ||
721 strncmp(
model_name,
"PRO-L42", strlen(
"PRO-L42")) )
728 if (!strncmp(
model_name,
"PRO", strlen(
"PRO")) ||
729 strncmp(
model_name,
"PRO-L42", strlen(
"PRO-L42")) )
736 if (!strncmp(
model_name,
"MX-64-2", strlen(
"MX-64-2")) ||
737 !strncmp(
model_name,
"MX-106-2", strlen(
"MX-106-2")) ||
748 if (!strncmp(
model_name,
"MX-28-2", strlen(
"MX-28-2")) ||
749 !strncmp(
model_name,
"MX-64-2", strlen(
"MX-64-2")) ||
750 !strncmp(
model_name,
"MX-106-2", strlen(
"MX-106-2")) ||
754 !strncmp(
model_name,
"XL430", strlen(
"XL430")) ||
755 !strncmp(
model_name,
"XC430", strlen(
"XC430")) ||
765 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to set Operating Mode!";
769 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to set Operating Mode!";
782 if (result ==
false)
return false;
785 if (result ==
false)
return false;
789 if (!strncmp(
model_name,
"MX-28-2", strlen(
"MX-28-2")) ||
790 !strncmp(
model_name,
"MX-64-2", strlen(
"MX-64-2")) ||
791 !strncmp(
model_name,
"MX-106-2", strlen(
"MX-106-2")) ||
792 !strncmp(
model_name,
"XL430", strlen(
"XL430")) ||
793 !strncmp(
model_name,
"XC430", strlen(
"XC430")) ||
798 result =
writeRegister(
id,
"Profile_Acceleration", acceleration, log);
799 result =
writeRegister(
id,
"Profile_Velocity", velocity, log);
801 else if (!strncmp(
model_name,
"MX-28", strlen(
"MX-28")) ||
802 !strncmp(
model_name,
"MX-64", strlen(
"MX-64")) ||
803 !strncmp(
model_name,
"MX-106", strlen(
"MX-106")))
806 result =
writeRegister(
id,
"Goal_Acceleration", acceleration, log);
815 if (!strncmp(
model_name,
"XL-320", strlen(
"XL-320")))
819 else if (!strncmp(
model_name,
"PRO-M42-10-S260-R-A", strlen(
"PRO-M42-10-S260-R-A")) ||
820 !strncmp(
model_name,
"PRO-M54-40-S250-R-A", strlen(
"PRO-M54-40-S250-R-A")) ||
821 !strncmp(
model_name,
"PRO-M54-60-S250-R-A", strlen(
"PRO-M54-60-S250-R-A")) ||
822 !strncmp(
model_name,
"PRO-H42-20-S300-R-A", strlen(
"PRO-H42-20-S300-R-A")) ||
823 !strncmp(
model_name,
"PRO-H54-100-S500-R-A", strlen(
"PRO-H54-100-S500-R-A")) ||
824 !strncmp(
model_name,
"PRO-H54-200-S500-R-A", strlen(
"PRO-H54-200-S500-R-A")) ||
825 !strncmp(
model_name,
"PRO-PLUS", strlen(
"PRO-PLUS")))
827 result =
writeRegister(
id,
"Profile_Acceleration", acceleration, log);
828 result =
writeRegister(
id,
"Profile_Velocity", velocity, log);
830 else if (!strncmp(
model_name,
"PRO-L", strlen(
"PRO-L")) ||
831 !strncmp(
model_name,
"PRO-M", strlen(
"PRO-M")) ||
832 !strncmp(
model_name,
"PRO-H", strlen(
"PRO-H")))
835 result =
writeRegister(
id,
"Goal_Acceleration", acceleration, log);
839 result =
writeRegister(
id,
"Profile_Acceleration", acceleration, log);
840 result =
writeRegister(
id,
"Profile_Velocity", velocity, log);
846 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to set Joint Mode!";
851 if (result ==
false)
return false;
853 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to set Joint Mode!";
865 if (result ==
false)
return false;
868 if (result ==
false)
return false;
872 if (!strncmp(
model_name,
"MX-28-2", strlen(
"MX-28-2")) ||
873 !strncmp(
model_name,
"MX-64-2", strlen(
"MX-64-2")) ||
874 !strncmp(
model_name,
"MX-106-2", strlen(
"MX-106-2")) ||
875 !strncmp(
model_name,
"XL430", strlen(
"XL430")) ||
876 !strncmp(
model_name,
"XC430", strlen(
"XC430")) ||
881 result =
writeRegister(
id,
"Profile_Acceleration", acceleration, log);
883 else if (!strncmp(
model_name,
"MX-28", strlen(
"MX-28")) ||
884 !strncmp(
model_name,
"MX-64", strlen(
"MX-64")) ||
885 !strncmp(
model_name,
"MX-106", strlen(
"MX-106")))
887 result =
writeRegister(
id,
"Goal_Acceleration", acceleration, log);
892 if (!strncmp(
model_name,
"PRO-PLUS", strlen(
"PRO-PLUS")))
894 result =
writeRegister(
id,
"Profile_Acceleration", acceleration, log);
896 else if (!strncmp(
model_name,
"PRO", strlen(
"PRO")))
898 result =
writeRegister(
id,
"Goal_Acceleration", acceleration, log);
902 result =
writeRegister(
id,
"Profile_Acceleration", acceleration, log);
908 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to set Wheel Mode!";
913 if (result ==
false)
return false;
915 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to set Wheel Mode!";
927 if (result ==
false)
return false;
930 if (result ==
false)
return false;
932 if (!strncmp(
model_name,
"MX-64-2", strlen(
"MX-64-2")) ||
933 !strncmp(
model_name,
"MX-106-2", strlen(
"MX-106-2")) ||
944 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to set Current Based Position Mode!";
949 if (result ==
false)
return false;
951 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to set Current Based Position Wheel Mode!";
965 result =
itemWrite(
id,
"Goal_Position", value, log);
969 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to set goal position!";
973 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to set goal position!";
993 bool result[2] = {
false,
false};
998 if (result[0] ==
false)
1002 value = (-1) * value;
1006 if (result[1] ==
false)
1008 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to set goal velocity!";
1013 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to set goal velocity!";
1019 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to set goal velocity!";
1026 if (result[0] ==
false)
1030 value = (-1) * value;
1034 if (result[1] ==
false)
1036 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to set goal velocity!";
1041 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to set goal velocity!";
1047 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to set goal velocity!";
1052 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to set goal velocity!";
1064 if (result ==
false)
1066 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to set goal position!";
1070 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to set goal position!";
1082 if (result ==
false)
1084 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to set goal velocity!";
1088 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to set goal velocity!";
1095 int32_t get_data = 0;
1097 result =
readRegister(
id,
"Present_Position", &get_data, log);
1098 if (result ==
false)
1100 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to get present position data!";
1106 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to get present position data!";
1113 int32_t get_data = 0;
1116 if (result ==
false)
1118 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to get radian!";
1124 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to get radian!";
1131 int32_t get_data = 0;
1134 if (result ==
false)
1136 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to get velocity!";
1142 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to get velocity!";
1149 int32_t get_data = 0;
1151 result =
readRegister(
id,
"Present_Speed", &get_data, log);
1152 if (result ==
false)
1154 if (log != NULL) *log =
"[DynamixelWorkbench] Failed to get present speed data!";
1159 if (log != NULL) *log =
"[DynamixelWorkbench] Succeeded to get present speed data!";
1165 int32_t position = 0;
1168 if (model_info == NULL)
return false;
1174 else if (radian < 0)
1191 if (model_info == NULL)
return false;
1197 else if (value < model_info->value_of_zero_radian_position)
1208 int32_t zero_position = (max_position + min_position)/2;
1212 value = (radian * (max_position - zero_position) / max_radian) + zero_position;
1214 else if (radian < 0)
1216 value = (radian * (min_position - zero_position) / min_radian) + zero_position;
1220 value = zero_position;
1229 int32_t zero_position = (max_position + min_position)/2;
1231 if (value > zero_position)
1233 radian = (float)(value - zero_position) * max_radian / (float)(max_position - zero_position);
1235 else if (value < zero_position)
1237 radian = (float)(value - zero_position) * min_radian / (float)(min_position - zero_position);
1246 const float RPM2RADPERSEC = 0.104719755f;
1249 if (model_info == NULL)
return false;
1253 if (strncmp(
getModelName(
id),
"AX", strlen(
"AX")) == 0 ||
1258 if (velocity == 0.0
f) value = 0;
1259 else if (velocity < 0.0
f) value = (velocity / (model_info->
rpm * RPM2RADPERSEC));
1260 else if (velocity > 0.0
f) value = (velocity / (model_info->
rpm * RPM2RADPERSEC)) + 1023;
1269 if (velocity == 0.0
f) value = 0;
1270 else if (velocity < 0.0
f) value = (velocity / (model_info->
rpm * RPM2RADPERSEC));
1271 else if (velocity > 0.0
f) value = (velocity / (model_info->
rpm * RPM2RADPERSEC)) + 1023;
1277 value = velocity / (model_info->
rpm * RPM2RADPERSEC);
1289 const float RPM2RADPERSEC = 0.104719755f;
1292 if (model_info == NULL)
return false;
1296 if (strncmp(
getModelName(
id),
"AX", strlen(
"AX")) == 0 ||
1301 if (value == 1023 || value == 0) velocity = 0.0f;
1302 else if (value > 0 && value < 1023) velocity = value * model_info->
rpm * RPM2RADPERSEC;
1303 else if (value > 1023 && value < 2048) velocity = (value - 1023) * model_info->
rpm * RPM2RADPERSEC * (-1.0f);
1312 if (value == 1023 || value == 0) velocity = 0.0f;
1313 else if (value > 0 && value < 1023) velocity = value * model_info->
rpm * RPM2RADPERSEC;
1314 else if (value > 1023 && value < 2048) velocity = (value - 1023) * model_info->
rpm * RPM2RADPERSEC * (-1.0f);
1318 velocity = value * (model_info->
rpm * RPM2RADPERSEC);
1329 float CURRENT_UNIT = 2.69f;
1332 if (model_info == NULL)
return false;
1336 return (current / CURRENT_UNIT);
1340 if (strncmp(
getModelName(
id),
"PRO-L", strlen(
"PRO-L")) == 0 ||
1341 strncmp(
getModelName(
id),
"PRO-M", strlen(
"PRO-M")) == 0 ||
1342 strncmp(
getModelName(
id),
"PRO-H", strlen(
"PRO-H")) == 0)
1344 CURRENT_UNIT = 16.11328f;
1345 return (current / CURRENT_UNIT);
1347 else if (strncmp(
getModelName(
id),
"PRO-PLUS", strlen(
"PRO-PLUS")) == 0)
1349 CURRENT_UNIT = 1.0f;
1350 return (current / CURRENT_UNIT);
1354 return (current / CURRENT_UNIT);
1358 return (current / CURRENT_UNIT);
1364 const float CURRENT_UNIT = 2.69f;
1366 value = current / CURRENT_UNIT;
1374 float CURRENT_UNIT = 2.69f;
1377 if (model_info == NULL)
return false;
1381 current = (int16_t)value * CURRENT_UNIT;
1386 if (strncmp(
getModelName(
id),
"PRO-L", strlen(
"PRO-L")) == 0 ||
1387 strncmp(
getModelName(
id),
"PRO-M", strlen(
"PRO-M")) == 0 ||
1388 strncmp(
getModelName(
id),
"PRO-H", strlen(
"PRO-H")) == 0)
1390 CURRENT_UNIT = 16.11328f;
1391 current = (int16_t)value * CURRENT_UNIT;
1394 else if (strncmp(
getModelName(
id),
"PRO-PLUS", strlen(
"PRO-PLUS")) == 0)
1396 CURRENT_UNIT = 1.0f;
1397 current = (int16_t)value * CURRENT_UNIT;
1402 current = (int16_t)value * CURRENT_UNIT;
1407 current = (int16_t)value * CURRENT_UNIT;
1415 const float CURRENT_UNIT = 2.69f;
1417 current = (int16_t)value * CURRENT_UNIT;
1425 const float LOAD_UNIT = 0.1f;
1427 if (value == 1023 || value == 0) load = 0.0f;
1428 else if (value > 0 && value < 1023) load = value * LOAD_UNIT;
1429 else if (value > 1023 && value < 2048) load = (value - 1023) * LOAD_UNIT * (-1.0
f);
bool setOperatingMode(uint8_t id, uint8_t index, const char **log=NULL)
bool torqueOff(uint8_t id, const char **log=NULL)
bool changeID(uint8_t id, uint8_t new_id, const char **log=NULL)
bool setCurrentBasedPositionControlMode(uint8_t id, const char **log=NULL)
static const uint8_t CURRENT_CONTROL_MODE
bool setSecondaryID(uint8_t id, uint8_t secondary_id, const char **log=NULL)
bool getVelocity(uint8_t id, float *velocity, const char **log=NULL)
bool setCurrentControlMode(uint8_t id, const char **log=NULL)
bool setPacketHandler(float protocol_version, const char **log=NULL)
static const uint8_t EXTENDED_POSITION_CONTROL_MODE
bool changeProtocolVersion(uint8_t id, uint8_t version, const char **log=NULL)
bool torque(uint8_t id, int32_t onoff, const char **log=NULL)
int64_t value_of_min_radian_position
int32_t convertRadian2Value(uint8_t id, float radian)
bool itemWrite(uint8_t id, const char *item_name, int32_t data, const char **log=NULL)
bool torqueOn(uint8_t id, const char **log=NULL)
bool readRegister(uint8_t id, uint16_t address, uint16_t length, uint32_t *data, const char **log=NULL)
const char * getModelName(uint8_t id, const char **log=NULL)
bool writeRegister(uint8_t id, uint16_t address, uint16_t length, uint8_t *data, const char **log=NULL)
static const char * model_name
int32_t convertVelocity2Value(uint8_t id, float velocity)
bool getRadian(uint8_t id, float *radian, const char **log=NULL)
bool ledOn(uint8_t id, const char **log=NULL)
float convertValue2Current(uint8_t id, int16_t value)
static const uint8_t JOINT_MODE
bool setTimeBasedProfile(uint8_t id, const char **log=NULL)
float convertValue2Load(int16_t value)
static const uint8_t POSITION_CONTROL_MODE
bool getPresentVelocityData(uint8_t id, int32_t *data, const char **log=NULL)
bool goalVelocity(uint8_t id, int value, const char **log=NULL)
int16_t convertCurrent2Value(uint8_t id, float current)
int64_t value_of_max_radian_position
bool setExtendedPositionControlMode(uint8_t id, const char **log=NULL)
bool setMultiTurnControlMode(uint8_t id, const char **log=NULL)
float convertValue2Radian(uint8_t id, int32_t value)
bool setVelocityControlMode(uint8_t id, const char **log=NULL)
bool getPresentPositionData(uint8_t id, int32_t *data, const char **log=NULL)
bool setPWMControlMode(uint8_t id, const char **log=NULL)
static const uint8_t VELOCITY_CONTROL_MODE
static const uint8_t MULTI_TURN_MODE
int64_t value_of_zero_radian_position
const ModelInfo * getModelInfo(uint8_t id, const char **log=NULL)
bool goalSpeed(uint8_t id, int value, const char **log=NULL)
bool goalPosition(uint8_t id, int value, const char **log=NULL)
static const uint8_t WHEEL_MODE
bool changeBaudrate(uint8_t id, uint32_t new_baudrate, const char **log=NULL)
bool setNormalDirection(uint8_t id, const char **log=NULL)
bool itemRead(uint8_t id, const char *item_name, int32_t *data, const char **log=NULL)
bool wheelMode(uint8_t id, int32_t acceleration=0, const char **log=NULL)
bool setPositionControlMode(uint8_t id, const char **log=NULL)
static const uint8_t CURRENT_BASED_POSITION_CONTROL_MODE
bool setTorqueControlMode(uint8_t id, const char **log=NULL)
static const uint8_t PWM_CONTROL_MODE
static const ModelInfo * model_info
float convertValue2Velocity(uint8_t id, int32_t value)
bool setReverseDirection(uint8_t id, const char **log=NULL)
bool jointMode(uint8_t id, int32_t velocity=0, int32_t acceleration=0, const char **log=NULL)
static const uint8_t TORQUE_CONTROL_MODE
float getProtocolVersion(void)
bool led(uint8_t id, int32_t onoff, const char **log=NULL)
bool ledOff(uint8_t id, const char **log=NULL)
bool currentBasedPositionMode(uint8_t id, int32_t current=0, const char **log=NULL)
bool setVelocityBasedProfile(uint8_t id, const char **log=NULL)