Dynamixel - gkgkgk1215/else GitHub Wiki

Dynamixel Wizard 2.0

Official Webpage Download the file here

Authorize to run the file and install following the wizard

sudo chmod 775 DynamixelWizard2Setup_x64
./DynamixelWizard2Setup_x64

Put your account to the group to access to the USB port

sudo usermod -aG dialout <your_account_id>
reboot

Dynamixel SDK

Install ROS library (C++ library and Python module)

sudo apt-get install ros-[ROS Distribution]-dynamixel-sdk

Clone repo and install Python modules for Dynamixel

cd ~
git clone https://github.com/ROBOTIS-GIT/DynamixelSDK.git
cd ~/DynamixelSDK/python/
sudo python3 setup.py install

Test with examples

cd ~/DynamixelSDK/python/tests/protocol2_0/
python3 ping.py
python3 read_write.py

You might need to install dependencies

sudo apt install python3-pip
pip install pyserial

Modify USB latency

Check the current latency

cat /sys/bus/usb-serial/devices/ttyUSB0/latency_timer

Change the latency to 1

sudo gedit /sys/bus/usb-serial/devices/ttyUSB0/latency_timer

If needed, change the latency regardless of rebooting

sudo apt install setserial
echo ACTION==\"add\", SUBSYSTEM==\"usb-serial\", DRIVER==\"ftdi_sio\", ATTR{latency_timer}=\"1\" > 99-dynamixelsdk-usb.rules 
sudo cp ./99-dynamixelsdk-usb.rules /etc/udev/rules.d/ 
sudo udevadm control --reload-rules 
sudo udevadm trigger --action=add 
cat /sys/bus/usb-serial/devices/ttyUSB0/latency_timer

Reading from the DX usually takes 16 ms under baudrate=1Mbps & latency=16 ms (by default), Changing the USB latency to 1 ms will reduce the reading time to under 1 ms, which enables build the controller on the desktop.