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.3-py3-none-win_amd64.whl (95.5 kB view details)

Uploaded Python 3Windows x86-64

motor_drive_layer-0.5.3-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.3-py3-none-manylinux_2_34_aarch64.whl (97.4 kB view details)

Uploaded Python 3manylinux: glibc 2.34+ ARM64

motor_drive_layer-0.5.3-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.3-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.3-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for motor_drive_layer-0.5.3-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 c9d685b12957671a79b63222bfdf56311d371d52fba54331cc02c18563411274
MD5 56458d864ca8b44b0a663b1cb4a6291c
BLAKE2b-256 9a282000d54524e1d9b4c9656820033f917acb454d49ee08ab0baa8b2256b593

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for motor_drive_layer-0.5.3-py3-none-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 0ea0217301082e625f7dc03f3d3bd9ae0aa3d358a4eef9de3beea44126cc3f9a
MD5 411ecb93ad748e2c6fb7439759b322a4
BLAKE2b-256 d898873c7c83d8e5a65a3644298700d3b8477d7aa0b99a31f846aac1b469c649

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for motor_drive_layer-0.5.3-py3-none-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 0ebf5a033bdf40dc46aa2a25b047c0e0fe1409e66e6932cb3f759df0608a5900
MD5 917458f81c5761d639ce17f2ad5092bc
BLAKE2b-256 becec3d65d222c86b17438016e9d10a7fdaaa153dd509c89d126bf22a8bab3e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for motor_drive_layer-0.5.3-py3-none-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 874c21b418404f8c9265633641ae2e83d135688ad97d91b926b75924f88c025f
MD5 90f979954b6ceec19e82e53a7eb865e7
BLAKE2b-256 ba7eea7c9c446c6112507a370a55b54fa76bf6a095cfb57787fbb3ee2c38d52c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for motor_drive_layer-0.5.3-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6a69aec64dc4e55f8e25de964676e9c79f8ebf9e1525bca901dff8787a3e704d
MD5 edab317e4d061bcb6b6306b785851943
BLAKE2b-256 bcea99046b1093293bcc96317f996328d6571a40032a784aa199bf9e839422b3

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