motor-drive-layer
Python bindings for the Motor-Drive-Layer native C++ Damiao motor driver.
The package loads the bundled C ABI library through Python ctypes and exposes
SocketCAN, SocketCAN-FD, Damiao serial bridge, and optional DM_Device transports.
Published wheels cover Linux x86_64/ARM64, macOS Intel/Apple Silicon, and Windows x64. The serial
transport is cross-platform; SocketCAN transports remain Linux-only.
DM-USB2FDCAN Dual works with its original dual_app firmware through
Controller.from_dm_device(device="usb2canfd-dual", channel=0, bitrate=1_000_000, data_bitrate=5_000_000). CH0 and CH1 are independently selectable, old positional arguments remain
compatible, and the loader probes both vendor v1.0 and v1.1 ABIs. Install the separate vendor
runtime with motor-drive-layer-install-dm-device --download or set MOTOR_DM_DEVICE_LIB.
Use Motor.request_fresh_state(timeout_ms=50) when the caller must wait for a newly requested
feedback frame. For multiple motors, Controller.request_feedback_all(timeout_ms=50) sends every
request with the configured TX pacing and waits against one shared deadline; a timeout reports the
missing motor IDs. The lower-level request_feedback(), get_state(), and
poll_feedback_once() methods remain non-blocking asynchronous/cache operations.
The wheel includes py.typed and .pyi declarations for editor completion and static type
checking. The main public APIs are:
Controller(...),from_socketcanfd(...),from_dm_serial(...), andfrom_dm_device(...).Controller.add_damiao_motor(...),enable_all(),disable_all(),request_feedback_all(),set_tx_gap_us(),shutdown(), andclose_bus().Motor.enable(),disable(),ensure_mode(), all four control-mode send methods, fresh/cached feedback methods, typed register access, parameter aliases, andstore_parameters().MotorState,FeedbackStats,Mode, register metadata/constants, and SDK exception classes.
Motor is a logical child of its creating Controller. After the parent closes, motor operations
raise CallError; motor.close() can still release the handle. Both classes support context
managers. Leaving a Motor context only frees its handle, while leaving a Controller context attempts
to disable all motors before closing the bus.
See the project README for build instructions, architecture, configuration, safety guidance, and examples.
This package is distributed under the MIT License. The optional DM_Device vendor runtime is distributed separately and may have its own license terms.
Metadata
Release files for motor-drive-layer 0.5.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| motor_drive_layer-0.5.7-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| motor_drive_layer-0.5.7-py3-none-manylinux_2_34_x86_64.whl | Python 3 | none | Linux glibc 2.34+ x86-64 | Details |
| motor_drive_layer-0.5.7-py3-none-manylinux_2_34_aarch64.whl | Python 3 | none | Linux glibc 2.34+ ARM64 | Details |
| motor_drive_layer-0.5.7-py3-none-macosx_11_0_x86_64.whl | Python 3 | none | macOS 11.0+ x86-64 | Details |
| motor_drive_layer-0.5.7-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
Total release size: 523.7 kB
Release files / motor_drive_layer-0.5.7-py3-none-win_amd64.whl
| Download URL | motor_drive_layer-0.5.7-py3-none-win_amd64.whl |
|---|---|
| Size | 107.4 kB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
7498aa987608ca2041be812c6b7c8652f8f7ef4ef87d5792c69fcd6c8e849679
|
|
BLAKE2b-256 checksum How to use checksums |
345e4bf56e70a30ec9240462221a7cb0d56d9e8947e7a12c2b1ed3184f30b88c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / motor_drive_layer-0.5.7-py3-none-manylinux_2_34_x86_64.whl
| Download URL | motor_drive_layer-0.5.7-py3-none-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 121.0 kB |
| Tags | Linux glibc 2.34+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
0b28445d939214690775f716f23408f4ce3173cee7276f6807fd7d09847a86b4
|
|
BLAKE2b-256 checksum How to use checksums |
985ff588ff8f4a54ed02e92d220b4302c6c4608421125649ab1692e585b1bc66
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / motor_drive_layer-0.5.7-py3-none-manylinux_2_34_aarch64.whl
| Download URL | motor_drive_layer-0.5.7-py3-none-manylinux_2_34_aarch64.whl |
|---|---|
| Size | 112.5 kB |
| Tags | Linux glibc 2.34+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
50d31ebdff08b35ef480d9737aa5eeeb1f67b3b49499cf29117d925423e55723
|
|
BLAKE2b-256 checksum How to use checksums |
0b4b6a453064758f5a81686b882092fe84e2fceefd0ff14e9bffe3a49dc94fb9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / motor_drive_layer-0.5.7-py3-none-macosx_11_0_x86_64.whl
| Download URL | motor_drive_layer-0.5.7-py3-none-macosx_11_0_x86_64.whl |
|---|---|
| Size | 92.8 kB |
| Tags | Python 3 macOS 11.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
8d9c21e43381c7c77f8e67a85c4ae105358f4a3675289aa72dea9ba7b421ae97
|
|
BLAKE2b-256 checksum How to use checksums |
5eb7a7f83112787ee2fc5d4f8a5e38b08ed7943a4d2be9a4dc13c7088ba76937
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / motor_drive_layer-0.5.7-py3-none-macosx_11_0_arm64.whl
| Download URL | motor_drive_layer-0.5.7-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 89.9 kB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
6912fce29f27fce001dea6c0119d0f5337fc4bfa9a103eecf1b750b9407740df
|
|
BLAKE2b-256 checksum How to use checksums |
0dbe2dec3fac012a4e767cb34be8fee8b996b8c825d250608423d72231ebea6c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|