Registry / communication / dynamixel-sdk

dynamixel-sdk

JSON →
library4.0.5pypypi✓ verified 86d ago

Official SDK for controlling ROBOTIS Dynamixel servos. Supports Python, C++, C (Linux, Windows, Mac). Current version 4.0.3/4.0.4. Active development; breaking changes introduced in 4.0.0 with new 'Easy' API.

pip install dynamixel-sdk
INSTALL
IMPORT
SIG · DYNAMIXEL-SDK
D
dynamixel-sdk
communicationpythonv4.0.5
Install
1.7s avg
Import
20ms
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v4.0.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.024s · 19MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.7s · import 0.016s · 20MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PortHandler
from dynamixel_sdk import PortHandler
PacketHandler
from dynamixel_sdk import PacketHandler
from dynamixel_sdk.dynamixel import PacketHandler
Internal module path changed; use top-level import.
GroupSyncWrite
from dynamixel_sdk import GroupSyncWrite
from dynamixel_sdk.group_sync_write import GroupSyncWrite
Top-level import is the supported pattern since SDK 3.x.
GroupBulkRead
from dynamixel_sdk import GroupBulkRead

Basic open port, enable torque, write position.

from dynamixel_sdk import PortHandler, PacketHandler ADDR_TORQUE_ENABLE = 64 ADDR_GOAL_POSITION = 116 ADDR_PRESENT_POSITION = 132 PROTOCOL_VERSION = 2.0 DXL_ID = 1 DEVICENAME = '/dev/ttyUSB0' BAUDRATE = 57600 port_handler = PortHandler(DEVICENAME) packet_handler = PacketHandler(PROTOCOL_VERSION) if port_handler.openPort(): print('Succeeded to open port') else: print('Failed to open port') quit() if port_handler.setBaudRate(BAUDRATE): print('Succeeded to set baudrate') else: print('Failed to set baudrate') quit() # Enable torque packet_handler.write1ByteTxRx(port_handler, DXL_ID, ADDR_TORQUE_ENABLE, 1) # Write goal position packet_handler.write4ByteTxRx(port_handler, DXL_ID, ADDR_GOAL_POSITION, 1024) port_handler.closePort()
Debug
Known issues
breakingVersion 4.0.0 introduced a new 'Easy' API that may break existing code. The classic SDK API still works, but some internal imports have changed.
fix
Use top-level imports like `from dynamixel_sdk import PortHandler`. Do not import from submodules.
affects: >=4.0.0
gotchaAX-12A servos use Protocol 1.0, not 2.0. Using the wrong protocol version causes silent failures.
fix
Set PROTOCOL_VERSION to 1.0 for AX-series servos.
affects: all
gotchaOn Linux, permission denied when opening port `/dev/ttyUSB0` without udev rules or usermod.
fix
Add user to dialout group: `sudo usermod -a -G dialout $USER`, then log out and back in.
affects: all
deprecated`GroupBulkRead` with Protocol 1.0 may return incomplete data; use `GroupSyncRead` instead for 1.0.
fix
Migrate to `GroupSyncRead` for Protocol 1.0, or upgrade to SDK 4.x.
affects: <4.0.0
gotchaTorque must be enabled before writing goal position, else write may fail silently.
fix
Always call `packet_handler.write1ByteTxRx(port_handler, DXL_ID, ADDR_TORQUE_ENABLE, 1)` before position writes.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'dynamixel_sdk'
Library not installed or installed in wrong environment.
fix
Run `pip install dynamixel-sdk`. Ensure you are in the correct Python environment.
ImportError: cannot import name 'PacketHandler' from 'dynamixel_sdk'
Incorrect import path; SDK version 3.x and 4.x changed internal structure.
fix
Use `from dynamixel_sdk import PacketHandler` (top-level).
[TxRxResult] There is no status packet!
Communication failure: wrong baudrate, port, protocol version, or servo ID.
fix
Verify DEVICENAME, BAUDRATE (e.g. 57600 or 1000000), PROTOCOL_VERSION (1.0 or 2.0), and DXL_ID. Check wiring.
Upgrade
Version history
4.0.5latest on PyPI · released May 6, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
29 hits · last 30 days
node
26
OpenAI (training)
1
Resources
dynamixel-sdk — pip install dynamixel-sdk · libregistry