Skip to content

feat: new openarm adapter#2382

Draft
TomCC7 wants to merge 12 commits into
mainfrom
cc/openarm-rust-adapter
Draft

feat: new openarm adapter#2382
TomCC7 wants to merge 12 commits into
mainfrom
cc/openarm-rust-adapter

Conversation

@TomCC7
Copy link
Copy Markdown
Member

@TomCC7 TomCC7 commented Jun 6, 2026

Solution

Adds an opt-in openarm_rs manipulator adapter for OpenArm hardware using the Rust-backed can-motor-control Python binding.

The existing openarm adapter remains the default production path. openarm_rs is selected explicitly through hardware config or the new OpenArm RS blueprints, and is intended for binding-backed bring-up, state monitoring, MIT command validation, gravity compensation, and trajectory-control validation.

This also updates manipulator adapter discovery to use lightweight __registry__.py manifests, so listing available adapters does not import unselected hardware SDKs or optional bindings.

User-facing behavior

  • adapter_type="openarm" continues to use the existing in-tree SocketCAN OpenArm adapter.
  • adapter_type="openarm_rs" selects the Rust-backed OpenArm adapter.
  • Missing can_motor_control now fails only when openarm_rs is selected/connected, with a clear install hint.
  • Adapter listing remains healthy in partial installs.
  • The OpenArm RS path defaults to CAN-FD and supports staged validation before active trajectory control.

How to Test

uv run pytest \
  dimos/hardware/manipulators/test_registry.py \
  dimos/hardware/manipulators/openarm_rs/test_adapter.py \
  dimos/hardware/manipulators/damiao/test_base_adapter.py -q

uv run mypy \
  dimos/hardware/manipulators/damiao/base_adapter.py \
  dimos/hardware/manipulators/openarm_rs/test_adapter.py
For hardware bring-up:
dimos run coordinator-openarm-rs
dimos run coordinator-openarm-rs-hold-test

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 6, 2026

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
1866 1 1865 153
View the top 1 failed test(s) by shortest run time
dimos.project.test_no_init_files::test_no_init_files
Stack Traces | 0.017s run time
def test_no_init_files():
        dimos_dir = DIMOS_PROJECT_ROOT / "dimos"
        init_files = sorted(dimos_dir.rglob("__init__.py"))
        # The root dimos/__init__.py is allowed for the porcelain lazy import.
        init_files = [f for f in init_files if f != dimos_dir / "__init__.py"]
        if init_files:
            listing = "\n".join(f"  - {f.relative_to(dimos_dir)}" for f in init_files)
>           raise AssertionError(
                f"Found __init__.py files in dimos/:\n{listing}\n\n"
                "__init__.py files are not allowed because they lead to unnecessary "
                "extraneous imports. Everything should be imported straight from the "
                "source module."
            )
E           AssertionError: Found __init__.py files in dimos/:
E             - .../tasks/current_position_hold_task/__init__.py
E             - .../manipulators/damiao/__init__.py
E             - .../manipulators/openarm_rs/__init__.py
E           
E           __init__.py files are not allowed because they lead to unnecessary extraneous imports. Everything should be imported straight from the source module.

dimos_dir  = PosixPath('.../dimos/dimos/dimos')
init_files = [PosixPath('.../dimos/dimos/dimos/.../tasks/current_position_hold_task/__init__.py'), PosixPath('/ho...rs/damiao/__init__.py'), PosixPath('.../dimos/dimos/dimos/.../manipulators/openarm_rs/__init__.py')]
listing    = '  - .../tasks/current_position_hold_task/__init__.py\n  - .../manipulators/damiao/__init__.py\n  - .../manipulators/openarm_rs/__init__.py'

dimos/project/test_no_init_files.py:25: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant