Skip to main content

Transports

Overview

The SDK exposes four transport constructors:

SocketCAN (Standard CAN)

The default transport for most motor vendors. Linux uses SocketCAN directly, and Windows/macOS use the PCAN backend with canX channel aliases.

Usage

Supported Vendors

  • Damiao (all models)
  • RobStride
  • MyActuator
  • HighTorque

System Setup (3 Platforms)

Linux (SocketCAN):
macOS (PCAN via PCBUSB):
Windows (PCAN):

Multiple CAN Interfaces

CAN-FD (SocketCAN-FD)

Extended CAN with larger payload and higher bandwidth. Required for some vendors.

Usage

Supported Vendors

  • Hexfellow (required)
  • Damiao (optional, for higher bandwidth)

System Setup

CAN-FD examples above are Linux-first. On Windows/macOS, prefer standard CAN (Controller(channel)) unless your adapter stack explicitly supports FD.

DM Serial Bridge

Serial-to-CAN bridge for Damiao motors using the official Damiao serial adapter.

Usage

Parameters

Supported Vendors

  • Damiao only

Serial Port Setup (3 Platforms)

Linux:
macOS:
Windows (PowerShell):

Common Serial Devices

DM-Device (DM_Device SDK)

Native Damiao transport backed by the DaMiao DM_Device SDK for the USB2CANFD, USB2CANFD_DUAL, and LINKX4C adapters. The adapter must be in USB mode; this transport is Damiao-only.

Usage

Parameters

Supported Vendors

  • Damiao only

Runtime Requirements

Python wheels do not embed the vendor runtime. If the DM_Device runtime is missing, MotorBridge prints the required runtime file, its GitHub download URL, where to place it, and the platform ABI requirements.
  • Linux x86_64: libusb-1.0.so.0, GLIBC_2.14+, libstdc++.so.6 with GLIBCXX_3.4.32
  • Linux aarch64: GLIBC_2.17+, libstdc++.so.6 with GLIBCXX_3.4.22+
Install the runtime on demand with the bundled helper:
Windows DM_Device runtime selection is restricted to x86_64. Long-running processes reuse the already-open adapter instead of reopening it.

Transport Selection Guide

Decision Tree

Mixed Vendor Setup

When using multiple vendors on the same CAN bus, create separate Controller instances:
Do not add motors from different vendors to the same Controller instance. Each controller is optimized for a specific vendor protocol.

Transport Performance

Latency Comparison

Recommendations

  • Real-time control: Use SocketCAN or CAN-FD
  • Development/Debug: DM Serial is convenient for quick testing
  • High-speed loops: Use CAN-FD with dt_ms >= 10

Troubleshooting

SocketCAN: “No buffer space available” (Error 105)

Serial: Permission Denied

CAN-FD: “Invalid argument”

Next Steps