Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrong error messages and add minor details for AX-12 support #387

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
[![melodic-devel Status](https://github.com/ROBOTIS-GIT/dynamixel-workbench/workflows/melodic-devel/badge.svg)](https://github.com/ROBOTIS-GIT/dynamixel-workbench/tree/melodic-devel)
[![noetic-devel Status](https://github.com/ROBOTIS-GIT/dynamixel-workbench/workflows/noetic-devel/badge.svg)](https://github.com/ROBOTIS-GIT/dynamixel-workbench/tree/noetic-devel)

[![foxy-devel Status](https://github.com/ROBOTIS-GIT/dynamixel-workbench/workflows/foxy-devel/badge.svg)](https://github.com/ROBOTIS-GIT/dynamixel-workbench/tree/foxy-devel)
[![galactic-devel Status](https://github.com/ROBOTIS-GIT/dynamixel-workbench/workflows/galactic-devel/badge.svg)](https://github.com/ROBOTIS-GIT/dynamixel-workbench/tree/galactic-devel)
[![humble-devel Status](https://github.com/ROBOTIS-GIT/dynamixel-workbench/workflows/humble-devel/badge.svg)](https://github.com/ROBOTIS-GIT/dynamixel-workbench/tree/humble-devel)
[![ROS2 Rolling Status](https://github.com/ROBOTIS-GIT/dynamixel-workbench/workflows/ros2-ci/badge.svg)](https://github.com/ROBOTIS-GIT/dynamixel-workbench/tree/ros2)

## ROBOTIS e-Manual for Dynamixel Workbench
- [ROBOTIS e-Manual for Dynamixel Workbench](http://emanual.robotis.com/docs/en/software/dynamixel/dynamixel_workbench/)

Expand Down
7 changes: 4 additions & 3 deletions dynamixel_workbench_toolbox/examples/src/a_Model_Scan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
/* Authors: Taehun Lim (Darby) */

#include <DynamixelWorkbench.h>
#include <cstdlib>

int main(int argc, char *argv[])
int main(int argc, char *argv[])
{
const char* port_name = "/dev/ttyUSB0";
int baud_rate = 57600;
Expand Down Expand Up @@ -52,7 +53,7 @@ int main(int argc, char *argv[])
return 0;
}
else
printf("Succeeded to init(%d)\n", baud_rate);
printf("Succeeded to init(%d)\n", baud_rate);

printf("Wait for scan...\n");
result = dxl_wb.scan(scanned_id, &dxl_cnt, range, &log);
Expand All @@ -70,4 +71,4 @@ int main(int argc, char *argv[])
}

return 0;
}
}
7 changes: 4 additions & 3 deletions dynamixel_workbench_toolbox/examples/src/b_Ping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
/* Authors: Taehun Lim (Darby) */

#include <DynamixelWorkbench.h>
#include <cstdlib>

int main(int argc, char *argv[])
int main(int argc, char *argv[])
{
const char* port_name = "/dev/ttyUSB0";
int baud_rate = 57600;
Expand Down Expand Up @@ -52,7 +53,7 @@ int main(int argc, char *argv[])
return 0;
}
else
printf("Succeeded to init(%d)\n", baud_rate);
printf("Succeeded to init(%d)\n", baud_rate);

result = dxl_wb.ping(dxl_id, &model_number, &log);
if (result == false)
Expand All @@ -67,4 +68,4 @@ int main(int argc, char *argv[])
}

return 0;
}
}
7 changes: 4 additions & 3 deletions dynamixel_workbench_toolbox/examples/src/c_ID_Change.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
/* Authors: Taehun Lim (Darby) */

#include <DynamixelWorkbench.h>
#include <cstdlib>

int main(int argc, char *argv[])
int main(int argc, char *argv[])
{
const char* port_name = "/dev/ttyUSB0";
int baud_rate = 57600;
Expand Down Expand Up @@ -52,7 +53,7 @@ int main(int argc, char *argv[])
return 0;
}
else
printf("Succeeded to init(%d)\n", baud_rate);
printf("Succeeded to init(%d)\n", baud_rate);

uint16_t model_number = 0;
result = dxl_wb.ping(dxl_id, &model_number, &log);
Expand Down Expand Up @@ -98,4 +99,4 @@ int main(int argc, char *argv[])
for (int cnt = 0; cnt < dxl_cnt; cnt++)
printf("id : %d, model name : %s\n", scanned_id[cnt], dxl_wb.getModelName(scanned_id[cnt]));
}
}
}
7 changes: 4 additions & 3 deletions dynamixel_workbench_toolbox/examples/src/d_BPS_Change.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
/* Authors: Taehun Lim (Darby) */

#include <DynamixelWorkbench.h>
#include <cstdlib>

int main(int argc, char *argv[])
int main(int argc, char *argv[])
{
const char* port_name = "/dev/ttyUSB0";
int dxl_id = 1;
Expand Down Expand Up @@ -52,7 +53,7 @@ int main(int argc, char *argv[])
return 0;
}
else
printf("Succeeded to init(%d)\n", baud_rate);
printf("Succeeded to init(%d)\n", baud_rate);

uint16_t model_number = 0;
result = dxl_wb.ping(dxl_id, &model_number, &log);
Expand Down Expand Up @@ -81,4 +82,4 @@ int main(int argc, char *argv[])
}

return 0;
}
}
5 changes: 3 additions & 2 deletions dynamixel_workbench_toolbox/examples/src/e_Mode_Change.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
/* Authors: Taehun Lim (Darby) */

#include <DynamixelWorkbench.h>
#include <cstdlib>

int main(int argc, char *argv[])
int main(int argc, char *argv[])
{
const char* port_name = "/dev/ttyUSB0";
int baud_rate = 57600;
Expand Down Expand Up @@ -53,7 +54,7 @@ int main(int argc, char *argv[])
return 0;
}
else
printf("Succeeded to init(%d)\n", baud_rate);
printf("Succeeded to init(%d)\n", baud_rate);

result = dxl_wb.ping(dxl_id, &model_number, &log);
if (result == false)
Expand Down
7 changes: 4 additions & 3 deletions dynamixel_workbench_toolbox/examples/src/f_Reboot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
/* Authors: Taehun Lim (Darby) */

#include <DynamixelWorkbench.h>
#include <cstdlib>

int main(int argc, char *argv[])
int main(int argc, char *argv[])
{
const char* port_name = "/dev/ttyUSB0";
int baud_rate = 57600;
Expand Down Expand Up @@ -52,7 +53,7 @@ int main(int argc, char *argv[])
return 0;
}
else
printf("Succeed to init(%d)\n", baud_rate);
printf("Succeed to init(%d)\n", baud_rate);

result = dxl_wb.ping(dxl_id, &model_number, &log);
if (result == false)
Expand All @@ -78,4 +79,4 @@ int main(int argc, char *argv[])
}

return 0;
}
}
7 changes: 4 additions & 3 deletions dynamixel_workbench_toolbox/examples/src/g_Reset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
/* Authors: Taehun Lim (Darby) */

#include <DynamixelWorkbench.h>
#include <cstdlib>

int main(int argc, char *argv[])
int main(int argc, char *argv[])
{
const char* port_name = "/dev/ttyUSB0";
int baud_rate = 57600;
Expand Down Expand Up @@ -52,7 +53,7 @@ int main(int argc, char *argv[])
return 0;
}
else
printf("Succeed to init(%d)\n", baud_rate);
printf("Succeed to init(%d)\n", baud_rate);

result = dxl_wb.ping(dxl_id, &model_number, &log);
if (result == false)
Expand All @@ -78,4 +79,4 @@ int main(int argc, char *argv[])
}

return 0;
}
}
7 changes: 4 additions & 3 deletions dynamixel_workbench_toolbox/examples/src/h_Position.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
/* Authors: Taehun Lim (Darby) */

#include <DynamixelWorkbench.h>
#include <cstdlib>

int main(int argc, char *argv[])
int main(int argc, char *argv[])
{
const char* port_name = "/dev/ttyUSB0";
int baud_rate = 57600;
Expand Down Expand Up @@ -52,7 +53,7 @@ int main(int argc, char *argv[])
return 0;
}
else
printf("Succeed to init(%d)\n", baud_rate);
printf("Succeed to init(%d)\n", baud_rate);

result = dxl_wb.ping(dxl_id, &model_number, &log);
if (result == false)
Expand Down Expand Up @@ -88,4 +89,4 @@ int main(int argc, char *argv[])
}

return 0;
}
}
7 changes: 4 additions & 3 deletions dynamixel_workbench_toolbox/examples/src/i_Velocity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
/* Authors: Taehun Lim (Darby) */

#include <DynamixelWorkbench.h>
#include <cstdlib>

int main(int argc, char *argv[])
int main(int argc, char *argv[])
{
const char* port_name = "/dev/ttyUSB0";
int baud_rate = 57600;
Expand Down Expand Up @@ -52,7 +53,7 @@ int main(int argc, char *argv[])
return 0;
}
else
printf("Succeed to init(%d)\n", baud_rate);
printf("Succeed to init(%d)\n", baud_rate);

result = dxl_wb.ping(dxl_id, &model_number, &log);
if (result == false)
Expand Down Expand Up @@ -90,4 +91,4 @@ int main(int argc, char *argv[])
}

return 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
/* Authors: Taehun Lim (Darby) */

#include <DynamixelWorkbench.h>
#include <cstdlib>

int main(int argc, char *argv[])
int main(int argc, char *argv[])
{
const char* port_name = "/dev/ttyUSB0";
int baud_rate = 57600;
Expand Down Expand Up @@ -52,7 +53,7 @@ int main(int argc, char *argv[])
return 0;
}
else
printf("Succeed to init(%d)\n", baud_rate);
printf("Succeed to init(%d)\n", baud_rate);

result = dxl_wb.ping(dxl_id, &model_number, &log);
if (result == false)
Expand Down Expand Up @@ -88,4 +89,4 @@ int main(int argc, char *argv[])
}

return 0;
}
}
7 changes: 4 additions & 3 deletions dynamixel_workbench_toolbox/examples/src/k_Read_Write.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
/* Authors: Taehun Lim (Darby) */

#include <DynamixelWorkbench.h>
#include <cstdlib>

int main(int argc, char *argv[])
int main(int argc, char *argv[])
{
const char* port_name = "/dev/ttyUSB0";
int baud_rate = 57600;
Expand Down Expand Up @@ -52,7 +53,7 @@ int main(int argc, char *argv[])
return 0;
}
else
printf("Succeed to init(%d)\n", baud_rate);
printf("Succeed to init(%d)\n", baud_rate);

result = dxl_wb.ping(dxl_id, &model_number, &log);
if (result == false)
Expand Down Expand Up @@ -90,4 +91,4 @@ int main(int argc, char *argv[])
}

return 0;
}
}
9 changes: 5 additions & 4 deletions dynamixel_workbench_toolbox/examples/src/l_Sync_Write.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
/* Authors: Taehun Lim (Darby) */

#include <DynamixelWorkbench.h>
#include <cstdlib>

void swap(int32_t *array);

int main(int argc, char *argv[])
int main(int argc, char *argv[])
{
const char* port_name = "/dev/ttyUSB0";
int baud_rate = 57600;
Expand Down Expand Up @@ -55,7 +56,7 @@ int main(int argc, char *argv[])
return 0;
}
else
printf("Succeed to init(%d)\n", baud_rate);
printf("Succeed to init(%d)\n", baud_rate);

for (int cnt = 0; cnt < 2; cnt++)
{
Expand Down Expand Up @@ -93,7 +94,7 @@ int main(int argc, char *argv[])
int32_t goal_position[2] = {0, 1023};

const uint8_t handler_index = 0;

while(1)
{
result = dxl_wb.syncWrite(handler_index, &goal_position[0], &log);
Expand All @@ -116,4 +117,4 @@ void swap(int32_t *array)
int32_t tmp = array[0];
array[0] = array[1];
array[1] = tmp;
}
}
Loading