HardFOC driver
DYNAMIXEL Driver¶
A C++17 driver for ROBOTIS DYNAMIXEL X-series smart servos over Protocol 2.0. It pings and identifies servos, sets the operating mode, commands position, velocity and PWM, reads telemetry and runs sync reads and writes, on any MCU with a half-duplex UART.
The driver has no platform code. You give it a small class that writes and reads bytes on a UART and tells the time; it does the rest: Protocol 2.0 packets and CRC (through the official ROBOTIS SDK), reply timeouts, local-echo handling, the X-series control table and error mapping.
- Servos
- XC430-W150 (validated), XC430-W240, XL430-W250, XM430-W210 / W350, XH430-W210 / W350, other X-series by fallback
- Bus
- Half-duplex TTL (3-pin) or RS-485 (4-pin) multidrop, 8 data bits, no parity, 1 stop bit
- Speed
- 9600 bit/s to 4.5 Mbit/s; factory default 57600 bit/s
- Addressing
- IDs 0 to 252, factory ID 1; broadcast ID 254 (
0xFE) - Supply (servo)
- XC430-W150: 6.5 V to 14.8 V, 12 V recommended; XM430-W350: 10.0 V to 14.8 V
- Modes the driver uses
- Position, extended position, velocity, PWM; current is a raw register write
What you get¶
- A bus and a device.
dynamixel::Busowns one serial line;dynamixel::Deviceis one servo on it, with typed calls for torque, mode, goals and telemetry. See API guide. - Model-aware.
Identify()pings the servo and binds its control table from a catalog of seven X-series models, or a shared X-series fallback. See Model support. - The official protocol engine. Packets, CRC and sync instructions come from the ROBOTIS DYNAMIXEL SDK 4.1.0, hidden behind the public headers. See SDK integration.
- Results you can act on. Every call returns a
DriverResultwith aDriverErrorand the raw SDK and device codes; a write whose reply was lost isUncertainOutcome, not a silent failure. See API guide. - Any half-duplex wiring. Direction buffer, auto-direction transceiver or single wire with local echo: the transport decides, the driver never touches a pin. See Porting.
- Safe by construction. No constructor opens the UART, enables torque or moves a servo. See Quickstart.
- Tested without hardware. Host tests run the real SDK against a scripted transport. See Testing and CI.
Where to go next¶
-
Wire a servo, write the transport, read it in about 20 lines.
-
Connectors, half-duplex wiring, bus settings and power.
-
The three layers and what each one owns.
-
Identify, configure, move, read and handle errors, task by task.
-
Implement the transport for your MCU.
-
Every class and member, generated from the headers.