Skip to main content
  • In this chapter, you will use the Dynamixel Easy SDK with the OpenRB-150 Tutorial Kit to make the motor move.

Requirements

  • OpenRB-150 Tutorial Kit [US] [KR]

Download and Build SDK

git clone https://github.com/ROBOTIS-GIT/DynamixelSDK.git
  • Enter the Python directory and install the SDK using pip
cd DynamixelSDK/python
pip install .
  • NOTE: Also you can install the SDK directly using pip without cloning the repository.
pip install dynamixel-sdk

Hardware Setup

  • Connect the OpenRB-150 to the Dynamixel using a TTL cable, and connect it to your computer using a USB-C cable.

Move Motor to target position

  • Open a terminal and enter the Python interactive shell by typing python or python3.
python3
  • Copy and paste the following code into the Python shell.
from dynamixel_easy_sdk import *
connector = Connector("/dev/ttyACM0", 57600)
motor1 = connector.createMotor(1)
motor1.disableTorque()
motor1.setOperatingMode(OperatingMode.POSITION)
motor1.enableTorque()
target_position = 2000
motor1.setGoalPosition(target_position)