Skip to content

Latest commit

 

History

History
70 lines (57 loc) · 1.75 KB

README.md

File metadata and controls

70 lines (57 loc) · 1.75 KB


Dynamixel

Dynamixel is a simple and easy way to deal with the Dynamixel XL430 Servo. It's fast and based on the DynamixelSDK.

Features:

  • fast and easy to understand
  • support for group writes
  • most of the common features implemented (WIP)
  • NOTE: DynamixelSDK is required! get it from here and install it to /usr/local/include: DynamixelSDK

License:

License

C++ Version:

C++17

Install:

# create cmake file
cmake CMakeLists.txt
# install to /usr/local/include
sudo make install

Import:

// include the .cpp files from the project
#include "dynamixel_xl.cpp"

// create instance of the dynamixel 
Dynamixel dynamixel = Dynamixel();
if(!dynamixel.set_open()) {
    printf("failed: could not open port, please check connection!");
}

Usage:

Examples:

#define DXL_ID 1

// enable LED
dynamixel.set_led(DXL_ID, true);

// set the operating mode to velocity
dynamixel.set_operating_mode(DXL_ID, ADDR_CONTROL_MODE_VELOCITY);
// enable torque for the dynamixel
dynamixel.set_torque(DXL_ID, true);
// set maximum speed
dynamixel.set_goal_velocity(DXL_ID, 265);
// let it rotate for two seconds
sleep(2.0);
// disable rotation
dynamixel.set_goal_velocity(DXL_ID, 0);
// disable torque
dynamixel.set_torque(DXL_ID, false);
// close connection
dynamixel.set_close();

Author:

👨🏼‍💻 Vinzenz Weist