Skip to content

Commit

Permalink
Merge pull request #277 from ROBOTIS-GIT/develop
Browse files Browse the repository at this point in the history
release 1.4.18
  • Loading branch information
ROBOTIS-Will committed May 17, 2021
2 parents 57b1471 + 16c6ef8 commit b5d7c23
Show file tree
Hide file tree
Showing 9 changed files with 128 additions and 47 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/arduino_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Arduino_CI

on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]

jobs:
arduino_ci:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: install script
run: |
source <(curl -SLs https://raw.githubusercontent.com/ROBOTIS-GIT/OpenCR/master/install.sh) ${{github.ref}}
build_platform opencr
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,12 @@
#define MX_106_2 321

#define XL_320 350
#define XL330_M077 1190
#define XL330_M288 1200
#define XL430_W250 1060

#define XL430_W250_2 1090 // 2XL
#define XC430_W250_2 1160 // 2XC

#define XC430_W150 1070
#define XC430_W240 1080
Expand All @@ -65,6 +68,9 @@
#define XH540_V150 1150
#define XH540_V270 1140

#define XW540_T140 1180
#define XW540_T260 1170

#define PRO_L42_10_S300_R 35072
#define PRO_L54_30_S400_R 37928
#define PRO_L54_30_S500_R 37896
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ static const ModelInfo info_XL320 = {0.11,
2.61799};

//---------------------------------------------------------
// XL - (num == XL430_W250, XL430_W250_2, XC430_W150, XC430_W240)
// XL - (num == XL430_W250, XL430_W250_2, XC430_W150, XC430_W240, XC430_W250_2)
//---------------------------------------------------------
static const ControlItem items_XL[]{
{s_Model_Number, 0, sizeof(s_Model_Number) - 1, 2},
Expand Down Expand Up @@ -597,7 +597,7 @@ static const ModelInfo info_XL = {0.229,
3.14159265};

//---------------------------------------------------------
// XM - (num == XM430_W210 || num == XM430_W350)
// XM - (num == XM430_W210 || num == XM430_W350) || num == XL330_M077 || num == XL330_M288)
//---------------------------------------------------------
static const ControlItem items_XM[]{
{s_Model_Number, 0, sizeof(s_Model_Number) - 1, 2},
Expand Down Expand Up @@ -732,7 +732,7 @@ static const ModelInfo info_EXTXM = {0.229,
3.14159265};

//---------------------------------------------------------
// XH - (num == XH430_V210 || num == XH430_V350 || num == XH430_W210 || num == XH430_W350)
// XH - (num == XH430_V210 || num == XH430_V350 || num == XH430_W210 || num == XH430_W350 || num == XW540_T140 || num == XW540_T260)
//---------------------------------------------------------
static const ControlItem items_XH[]{
{s_Model_Number, 0, sizeof(s_Model_Number) - 1, 2},
Expand Down Expand Up @@ -1301,12 +1301,12 @@ const ControlItem *DynamixelItem::getControlTable(uint16_t model_number)
control_table = items_XL320;
the_number_of_item = COUNT_XL320_ITEMS;
}
else if (num == XL430_W250 || num == XL430_W250_2 || num == XC430_W150 || num == XC430_W240)
else if (num == XL430_W250 || num == XL430_W250_2 || num == XC430_W150 || num == XC430_W240 || num == XC430_W250_2)
{
control_table = items_XL;
the_number_of_item = COUNT_XL_ITEMS;
}
else if (num == XM430_W210 || num == XM430_W350)
else if (num == XM430_W210 || num == XM430_W350 || num == XL330_M077 || num == XL330_M288)
{
control_table = items_XM;
the_number_of_item = COUNT_XM_ITEMS;
Expand All @@ -1316,7 +1316,7 @@ const ControlItem *DynamixelItem::getControlTable(uint16_t model_number)
control_table = items_EXTXM;
the_number_of_item = COUNT_EXTXM_ITEMS;
}
else if (num == XH430_V210 || num == XH430_V350 || num == XH430_W210 || num == XH430_W350)
else if (num == XH430_V210 || num == XH430_V350 || num == XH430_W210 || num == XH430_W350 || num == XW540_T140 || num == XW540_T260)
{
control_table = items_XH;
the_number_of_item = COUNT_XH_ITEMS;
Expand Down Expand Up @@ -1407,19 +1407,19 @@ const ModelInfo *DynamixelItem::getModelInfo(uint16_t model_number)
{
info = &info_XL320;
}
else if (num == XL430_W250 || num == XL430_W250_2 || num == XC430_W150 || num == XC430_W240)
else if (num == XL430_W250 || num == XL430_W250_2 || num == XC430_W150 || num == XC430_W240 || num == XC430_W250_2)
{
info = &info_XL;
}
else if (num == XM430_W210 || num == XM430_W350)
else if (num == XM430_W210 || num == XM430_W350 || num == XL330_M077 || num == XL330_M288)
{
info = &info_XM;
}
else if (num == XM540_W150 || num == XM540_W270)
{
info = &info_EXTXM;
}
else if (num == XH430_V210 || num == XH430_V350 || num == XH430_W210 || num == XH430_W350)
else if (num == XH430_V210 || num == XH430_V350 || num == XH430_W210 || num == XH430_W350 || num == XW540_T140 || num == XW540_T260)
{
info = &info_XH;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,11 @@ static const DynamixelModel dynamixel_model_table[] = {

{XL_320, "XL-320"},
{XL430_W250, "XL430-W250"},
{XL330_M077, "XL330-M077"},
{XL330_M288, "XL330-M288"},

{XL430_W250_2, "XL430-W250-2"}, // 2XL
{XC430_W250_2, "XC430-W240-2"}, // 2XC

{XC430_W150, "XC430-W150"},
{XC430_W240, "XC430-W240"},
Expand All @@ -66,10 +69,13 @@ static const DynamixelModel dynamixel_model_table[] = {
{XH430_W210, "XH430-W210"},
{XH430_W350, "XH430-W350"},

{XH540_W150, "XH540_W150"},
{XH540_W270, "XH540_W270"},
{XH540_V150, "XH540_V150"},
{XH540_V270, "XH540_V270"},
{XH540_W150, "XH540-W150"},
{XH540_W270, "XH540-W270"},
{XH540_V150, "XH540-V150"},
{XH540_V270, "XH540-V270"},

{XW540_T140, "XW540-T140"},
{XW540_T260, "XW540-T260"},

{PRO_L42_10_S300_R, "PRO-L42-10-S300-R"},
{PRO_L54_30_S400_R, "PRO-L54-30-S400-R"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,11 @@ bool DynamixelWorkbench::setNormalDirection(uint8_t id, const char **log)
!strncmp(model_name, "MX-64-2", strlen("MX-64-2")) ||
!strncmp(model_name, "MX-106-2", strlen("MX-106-2")) ||
!strncmp(model_name, "XM", strlen("XM")) ||
!strncmp(model_name, "XL330", strlen("XL330")) ||
!strncmp(model_name, "XL430", strlen("XL430")) ||
!strncmp(model_name, "XC430", strlen("XC430")) ||
!strncmp(model_name, "XH", strlen("XH")))
!strncmp(model_name, "XH", strlen("XH")) ||
!strncmp(model_name, "XW", strlen("XW")))
{
result = readRegister(id, "Drive_Mode", &data, log);

Expand Down Expand Up @@ -329,9 +331,11 @@ bool DynamixelWorkbench::setReverseDirection(uint8_t id, const char **log)
!strncmp(model_name, "MX-64-2", strlen("MX-64-2")) ||
!strncmp(model_name, "MX-106-2", strlen("MX-106-2")) ||
!strncmp(model_name, "XM", strlen("XM")) ||
!strncmp(model_name, "XL330", strlen("XL330")) ||
!strncmp(model_name, "XL430", strlen("XL430")) ||
!strncmp(model_name, "XC430", strlen("XC430")) ||
!strncmp(model_name, "XH", strlen("XH")))
!strncmp(model_name, "XH", strlen("XH")) ||
!strncmp(model_name, "XW", strlen("XW")))
{
result = readRegister(id, "Drive_Mode", &data, log);

Expand Down Expand Up @@ -360,9 +364,11 @@ bool DynamixelWorkbench::setVelocityBasedProfile(uint8_t id, const char **log)
!strncmp(model_name, "MX-64-2", strlen("MX-64-2")) ||
!strncmp(model_name, "MX-106-2", strlen("MX-106-2")) ||
!strncmp(model_name, "XM", strlen("XM")) ||
!strncmp(model_name, "XL330", strlen("XL330")) ||
!strncmp(model_name, "XL430", strlen("XL430")) ||
!strncmp(model_name, "XC430", strlen("XC430")) ||
!strncmp(model_name, "XH", strlen("XH")))
!strncmp(model_name, "XH", strlen("XH")) ||
!strncmp(model_name, "XW", strlen("XW")))
{
result = readRegister(id, "Drive_Mode", &data, log);

Expand Down Expand Up @@ -391,9 +397,11 @@ bool DynamixelWorkbench::setTimeBasedProfile(uint8_t id, const char **log)
!strncmp(model_name, "MX-64-2", strlen("MX-64-2")) ||
!strncmp(model_name, "MX-106-2", strlen("MX-106-2")) ||
!strncmp(model_name, "XM", strlen("XM")) ||
!strncmp(model_name, "XL330", strlen("XL330")) ||
!strncmp(model_name, "XL430", strlen("XL430")) ||
!strncmp(model_name, "XC430", strlen("XC430")) ||
!strncmp(model_name, "XH", strlen("XH")))
!strncmp(model_name, "XH", strlen("XH")) ||
!strncmp(model_name, "XW", strlen("XW")))
{
result = readRegister(id, "Drive_Mode", &data, log);

Expand Down Expand Up @@ -421,10 +429,12 @@ bool DynamixelWorkbench::setSecondaryID(uint8_t id, uint8_t secondary_id, const
!strncmp(model_name, "MX-64-2", strlen("MX-64-2")) ||
!strncmp(model_name, "MX-106-2", strlen("MX-106-2")) ||
!strncmp(model_name, "XM", strlen("XM")) ||
!strncmp(model_name, "XL330", strlen("XL330")) ||
!strncmp(model_name, "XL430", strlen("XL430")) ||
!strncmp(model_name, "XC430", strlen("XC430")) ||
!strncmp(model_name, "XH", strlen("XH")) ||
!strncmp(model_name, "RH", strlen("RH")))
!strncmp(model_name, "RH", strlen("RH")) ||
!strncmp(model_name, "XW", strlen("XW")))
{
result = torqueOff(id, log);
if (result == false) return false;
Expand Down Expand Up @@ -585,10 +595,12 @@ bool DynamixelWorkbench::setOperatingMode(uint8_t id, uint8_t index, const char
if (!strncmp(model_name, "MX-28-2", strlen("MX-28-2")) ||
!strncmp(model_name, "MX-64-2", strlen("MX-64-2")) ||
!strncmp(model_name, "MX-106-2", strlen("MX-106-2")) ||
!strncmp(model_name, "XL330", strlen("XL330")) ||
!strncmp(model_name, "XL430", strlen("XL430")) ||
!strncmp(model_name, "XC430", strlen("XC430")) ||
!strncmp(model_name, "XM", strlen("XM")) ||
!strncmp(model_name, "XH", strlen("XH")) ||
!strncmp(model_name, "XW", strlen("XW")) ||
!strncmp(model_name, "PRO", strlen("PRO")) ||
!strncmp(model_name, "RH", strlen("RH")))
{
Expand All @@ -610,10 +622,12 @@ bool DynamixelWorkbench::setOperatingMode(uint8_t id, uint8_t index, const char
if (!strncmp(model_name, "MX-28-2", strlen("MX-28-2")) ||
!strncmp(model_name, "MX-64-2", strlen("MX-64-2")) ||
!strncmp(model_name, "MX-106-2", strlen("MX-106-2")) ||
!strncmp(model_name, "XL330", strlen("XL330")) ||
!strncmp(model_name, "XL430", strlen("XL430")) ||
!strncmp(model_name, "XC430", strlen("XC430")) ||
!strncmp(model_name, "XM", strlen("XM")) ||
!strncmp(model_name, "XH", strlen("XH")) ||
!strncmp(model_name, "XW", strlen("XW")) ||
!strncmp(model_name, "PRO", strlen("PRO")))
{
result = writeRegister(id, "Operating_Mode", VELOCITY_CONTROL_MODE);
Expand All @@ -626,10 +640,12 @@ bool DynamixelWorkbench::setOperatingMode(uint8_t id, uint8_t index, const char
}
else if (index == CURRENT_CONTROL_MODE)
{
if (!strncmp(model_name, "XM", strlen("XM")) ||
if (!strncmp(model_name, "XL330", strlen("XL330")) ||
!strncmp(model_name, "XM", strlen("XM")) ||
!strncmp(model_name, "XH", strlen("XH")) ||
!strncmp(model_name, "MX-64-2", strlen("MX-64-2")) ||
!strncmp(model_name, "MX-106-2", strlen("MX-106-2")) ||
!strncmp(model_name, "XW", strlen("XW")) ||
!strncmp(model_name, "RH", strlen("RH")))
{
result = writeRegister(id, "Operating_Mode", CURRENT_CONTROL_MODE, log);
Expand All @@ -656,8 +672,10 @@ bool DynamixelWorkbench::setOperatingMode(uint8_t id, uint8_t index, const char
{
if (!strncmp(model_name, "MX-64-2", strlen("MX-64-2")) ||
!strncmp(model_name, "MX-106-2", strlen("MX-106-2")) ||
!strncmp(model_name, "XL330", strlen("XL330")) ||
!strncmp(model_name, "XM", strlen("XM")) ||
!strncmp(model_name, "XH", strlen("XH")) ||
!strncmp(model_name, "XW", strlen("XW")) ||
!strncmp(model_name, "RH", strlen("RH")))
{
result = writeRegister(id, "Operating_Mode", CURRENT_BASED_POSITION_CONTROL_MODE, log);
Expand All @@ -669,7 +687,8 @@ bool DynamixelWorkbench::setOperatingMode(uint8_t id, uint8_t index, const char
!strncmp(model_name, "MX-64-2", strlen("MX-64-2")) ||
!strncmp(model_name, "MX-106-2", strlen("MX-106-2")) ||
!strncmp(model_name, "XM", strlen("XM")) ||
!strncmp(model_name, "XH", strlen("XH")))
!strncmp(model_name, "XH", strlen("XH")) ||
!strncmp(model_name, "XW", strlen("XW")))
{
result = writeRegister(id, "Operating_Mode", PWM_CONTROL_MODE, log);
}
Expand All @@ -693,8 +712,10 @@ bool DynamixelWorkbench::setOperatingMode(uint8_t id, uint8_t index, const char
}
else if (index == CURRENT_CONTROL_MODE)
{
if (!strncmp(model_name, "XM", strlen("XM")) ||
if (!strncmp(model_name, "XL330", strlen("XL330")) ||
!strncmp(model_name, "XM", strlen("XM")) ||
!strncmp(model_name, "XH", strlen("XH")) ||
!strncmp(model_name, "XW", strlen("XW")) ||
!strncmp(model_name, "MX-64-2", strlen("MX-64-2")) ||
!strncmp(model_name, "MX-106-2", strlen("MX-106-2")) ||
!strncmp(model_name, "RH", strlen("RH")))
Expand Down Expand Up @@ -722,8 +743,10 @@ bool DynamixelWorkbench::setOperatingMode(uint8_t id, uint8_t index, const char
{
if (!strncmp(model_name, "MX-64-2", strlen("MX-64-2")) ||
!strncmp(model_name, "MX-106-2", strlen("MX-106-2")) ||
!strncmp(model_name, "XL330", strlen("XL330")) ||
!strncmp(model_name, "XM", strlen("XM")) ||
!strncmp(model_name, "XH", strlen("XH")) ||
!strncmp(model_name, "XW", strlen("XW")) ||
!strncmp(model_name, "RH", strlen("RH")))
{
result = writeRegister(id, "Operating_Mode", CURRENT_BASED_POSITION_CONTROL_MODE, log);
Expand All @@ -734,10 +757,12 @@ bool DynamixelWorkbench::setOperatingMode(uint8_t id, uint8_t index, const char
if (!strncmp(model_name, "MX-28-2", strlen("MX-28-2")) ||
!strncmp(model_name, "MX-64-2", strlen("MX-64-2")) ||
!strncmp(model_name, "MX-106-2", strlen("MX-106-2")) ||
!strncmp(model_name, "XM", strlen("XM")) ||
!strncmp(model_name, "XH", strlen("XH")) ||
!strncmp(model_name, "XL330", strlen("XL330")) ||
!strncmp(model_name, "XL430", strlen("XL430")) ||
!strncmp(model_name, "XC430", strlen("XC430")) ||
!strncmp(model_name, "XM", strlen("XM")) ||
!strncmp(model_name, "XH", strlen("XH")) ||
!strncmp(model_name, "XW", strlen("XW")) ||
!strncmp(model_name, "PRO", strlen("PRO")))
{
result = writeRegister(id, "Operating_Mode", PWM_CONTROL_MODE, log);
Expand Down Expand Up @@ -774,10 +799,12 @@ bool DynamixelWorkbench::jointMode(uint8_t id, int32_t velocity, int32_t acceler
if (!strncmp(model_name, "MX-28-2", strlen("MX-28-2")) ||
!strncmp(model_name, "MX-64-2", strlen("MX-64-2")) ||
!strncmp(model_name, "MX-106-2", strlen("MX-106-2")) ||
!strncmp(model_name, "XL330", strlen("XL330")) ||
!strncmp(model_name, "XL430", strlen("XL430")) ||
!strncmp(model_name, "XC430", strlen("XC430")) ||
!strncmp(model_name, "XM", strlen("XM")) ||
!strncmp(model_name, "XH", strlen("XH")))
!strncmp(model_name, "XH", strlen("XH")) ||
!strncmp(model_name, "XW", strlen("XW")))
{
result = writeRegister(id, "Profile_Acceleration", acceleration, log);
result = writeRegister(id, "Profile_Velocity", velocity, log);
Expand Down Expand Up @@ -855,10 +882,12 @@ bool DynamixelWorkbench::wheelMode(uint8_t id, int32_t acceleration, const char
if (!strncmp(model_name, "MX-28-2", strlen("MX-28-2")) ||
!strncmp(model_name, "MX-64-2", strlen("MX-64-2")) ||
!strncmp(model_name, "MX-106-2", strlen("MX-106-2")) ||
!strncmp(model_name, "XL330", strlen("XL330")) ||
!strncmp(model_name, "XL430", strlen("XL430")) ||
!strncmp(model_name, "XC430", strlen("XC430")) ||
!strncmp(model_name, "XM", strlen("XM")) ||
!strncmp(model_name, "XH", strlen("XH")))
!strncmp(model_name, "XH", strlen("XH")) ||
!strncmp(model_name, "XW", strlen("XW")))
{
result = writeRegister(id, "Profile_Acceleration", acceleration, log);
}
Expand Down Expand Up @@ -913,8 +942,10 @@ bool DynamixelWorkbench::currentBasedPositionMode(uint8_t id, int32_t current, c

if (!strncmp(model_name, "MX-64-2", strlen("MX-64-2")) ||
!strncmp(model_name, "MX-106-2", strlen("MX-106-2")) ||
!strncmp(model_name, "XL330", strlen("XL330")) ||
!strncmp(model_name, "XM", strlen("XM")) ||
!strncmp(model_name, "XH", strlen("XH")) ||
!strncmp(model_name, "XW", strlen("XW")) ||
!strncmp(model_name, "RH", strlen("RH")))
{
result = writeRegister(id, "Goal_Current", current, log);
Expand All @@ -936,7 +967,9 @@ bool DynamixelWorkbench::currentBasedPositionMode(uint8_t id, int32_t current, c
//keep compatibility with older codes
bool DynamixelWorkbench::goalPosition(uint8_t id, int value, const char **log)
{
goalPosition(id, (int32_t)value, log);
bool result = false;
result = goalPosition(id, (int32_t)value, log);
return result;
}

bool DynamixelWorkbench::goalPosition(uint8_t id, int32_t value, const char **log)
Expand Down Expand Up @@ -966,7 +999,9 @@ bool DynamixelWorkbench::goalSpeed(uint8_t id, int value, const char **log)
//keep compatibility with older codes
bool DynamixelWorkbench::goalVelocity(uint8_t id, int value, const char **log)
{
bool result = false;
goalVelocity(id, (int32_t)value, log);
return result;
}

bool DynamixelWorkbench::goalVelocity(uint8_t id, int32_t value, const char **log)
Expand Down
Loading

0 comments on commit b5d7c23

Please sign in to comment.