Skip to main content

Python SDK for the Motor-Drive-Layer C++ ABI

Project description

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.

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(...), and from_dm_device(...).
  • Controller.add_damiao_motor(...), enable_all(), disable_all(), request_feedback_all(), set_tx_gap_us(), shutdown(), and close_bus().
  • Motor.enable(), disable(), ensure_mode(), all four control-mode send methods, fresh/cached feedback methods, typed register access, parameter aliases, and store_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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

motor_drive_layer-0.5.4-py3-none-win_amd64.whl (95.4 kB view details)

Uploaded Python 3Windows x86-64

motor_drive_layer-0.5.4-py3-none-manylinux_2_34_x86_64.whl (103.1 kB view details)

Uploaded Python 3manylinux: glibc 2.34+ x86-64

motor_drive_layer-0.5.4-py3-none-manylinux_2_34_aarch64.whl (97.4 kB view details)

Uploaded Python 3manylinux: glibc 2.34+ ARM64

motor_drive_layer-0.5.4-py3-none-macosx_11_0_x86_64.whl (78.1 kB view details)

Uploaded Python 3macOS 11.0+ x86-64

motor_drive_layer-0.5.4-py3-none-macosx_11_0_arm64.whl (75.8 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

Details for the file motor_drive_layer-0.5.4-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for motor_drive_layer-0.5.4-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 1a6c63746ba96c4c2078a89f805b6ed05f2409f349cf1d21a9812747fd3fa978
MD5 710c58dab54b6b2213c24ce3f0d3961e
BLAKE2b-256 dc6c72126836e53280f871d93eb6b532f147765a51c058dcc75f0dd0c3d59784

See more details on using hashes here.

File details

Details for the file motor_drive_layer-0.5.4-py3-none-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for motor_drive_layer-0.5.4-py3-none-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 8f2b1d54f976358d97c0f41cd850ec712d6fc83c7b1c25a4c7d4e18dce2e3b58
MD5 3fe9fce8b2e6261d750d5dfef773e3d4
BLAKE2b-256 1f6d0f0bdb6a0117d94194ee50700221db1ed861c6a88262f20b09baed780b96

See more details on using hashes here.

File details

Details for the file motor_drive_layer-0.5.4-py3-none-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for motor_drive_layer-0.5.4-py3-none-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 509b1a24e618f7669e71730aa84319f4d6447c4eaa6ca83762bab260591b250a
MD5 db557d1302a857ed72cb0f036eaf3204
BLAKE2b-256 d5a6f2cfadddcd0ddc1c3ccf403befa22acf5913261821e2b144901e1007d92e

See more details on using hashes here.

File details

Details for the file motor_drive_layer-0.5.4-py3-none-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for motor_drive_layer-0.5.4-py3-none-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 34ec53acc87276f1ea8cba5277c012af473dfb105df19e714190244dcfe6b1e2
MD5 d7da0249024a543550933bafcc97e682
BLAKE2b-256 25bdebf29b17db1e71881df2e3b2bb25c2897d6bb1b5c9c174bc592fba3b066a

See more details on using hashes here.

File details

Details for the file motor_drive_layer-0.5.4-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for motor_drive_layer-0.5.4-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3caa6974866cc6fd9b7410c07462e86405cfa9a4372607cf26f30bb9edde51d6
MD5 25e0496c6f246fa7b387ac87dffe0e3b
BLAKE2b-256 154fddd8d3dbf1ea70f3b94978cd2b3cf31a04afc92b82f1249a2e3a7d9646cc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page