ROBOTIS-GIT / DynamixelSDK

ROBOTIS Dynamixel SDK (Protocol1.0/2.0)
http://emanual.robotis.com/docs/en/software/dynamixel/dynamixel_sdk/overview/
Apache License 2.0
456 stars 405 forks source link

is SDK Compatible with OpenCM #522

Closed syakirahmd closed 3 years ago

syakirahmd commented 3 years ago

ISSUE TEMPLATE ver. 1.2.0

Please fill this template for more accurate and prompt support.

  1. Which DYNAMIXEL SDK version do you use?

    • 3.7.31
  2. Which programming language/tool do you use?

    • Python
  3. Which operating system do you use?

    • Windows 10
  4. Which USB serial converter do you use?

    • OpenCM904
  5. Which DYNAMIXEL do you use?

    • AX-18
  6. Have you searched the issue from the closed issue threads?

    • yes
  7. Please describe the issue in detail I am working on OpenCM 9.04 with python language using VScode. I am trying to move ax-18 with example code from SDK but its not working because some error '[TxRxResult] Incorrect status packet!'. So is SDK compatible with OpenCM 9.04? FYI I also try SDK using arduino IDE and it work well. I have to deal with python for my project. thanks

ROBOTIS-Will commented 3 years ago

Hi @syakirahmd Thank you for your inquiry. DYNAMIXEL SDK unfortunately does not support python for OpenCM9.04. OpenCM9.04 supports Arduino IDE via ported C++ DYNAMIXEL SDK. Thank you.

syakirahmd commented 3 years ago

Iam sorry could you tell me how to use it? or maybe there is a tutorial that you could share

ROBOTIS-Will commented 3 years ago

@syakirahmd Sure, you can follow the instruction below to set up the Arduino IDE environment for OpenCM9.04 development. https://emanual.robotis.com/docs/en/parts/controller/opencm904/#install-on-windows Once the OpenCM9.04 boardmanager and DYNAMIXEL2Arduino library are installed on Arduino IDE, you can use examples under the DYNAMIXEL2Arduino to control the AX-18. https://github.com/ROBOTIS-GIT/Dynamixel2Arduino/blob/master/examples/basic/position_mode/position_mode.ino

However, please note that you may need to modify the example code which is mostly written for the latest DYNAMIXEL X series, for example, Protocol version, baudrate (default baudrate of AX series is 1000000 while X series is 57600).

const float DXL_PROTOCOL_VERSION = 1.0;
...
dxl.begin(1000000);
...
// dxl.writeControlTableItem(PROFILE_VELOCITY, DXL_ID, 30); // AX series does not support Profile Velocity

If you are directly connecting AX series to the OpenCM9.04 without using the OpenCM485 EXP board, you may also need to modify the port definition as below.

#elif defined(ARDUINO_OpenCM904) // When using official ROBOTIS board with DXL circuit.
  #define DXL_SERIAL   Serial1 //OpenCM9.04 EXP Board's DXL port Serial. (Serial1 for the DXL port on the OpenCM 9.04 board)
  #define DEBUG_SERIAL Serial
  const uint8_t DXL_DIR_PIN = 28; //OpenCM9.04 EXP Board's DIR PIN. (28 for the DXL port on the OpenCM 9.04 board)
syakirahmd commented 3 years ago

thank a lot. I greatly appreciate you.