Skip to content

feat: new openarm adapter - #2382

Closed
TomCC7 wants to merge 34 commits into
mainfrom
cc/openarm-rust-adapter
Closed

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

Conversation

@TomCC7

@TomCC7 TomCC7 commented Jun 6, 2026

Copy link
Copy Markdown
Member

Solution

Adds an opt-in openarm_rs manipulator adapter for OpenArm hardware using the Rust-backed can-motor-control Python binding. (https://github.com/TomCC7/can-motor-control)

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

@codecov

codecov Bot commented Jun 6, 2026

Copy link
Copy Markdown

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
1945 2 1943 159
View the top 2 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             - hardware/damiao/__init__.py
E             - .../whole_body/openarm/__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/hardware/damiao/__init__.py'), PosixPath('.../dimos/dimos/dimos/.../whole_body/openarm/__init__.py')]
listing    = '  - hardware/damiao/__init__.py\n  - .../whole_body/openarm/__init__.py'

dimos/project/test_no_init_files.py:25: AssertionError
dimos.hardware.whole_body.openarm.test_adapter::test_openarm_dual_configures_side_gravity_models
Stack Traces | 3.12s run time
def test_openarm_dual_configures_side_gravity_models() -> None:
        adapter = OpenArmDualWholeBodyAdapter(use_mock_bus=True)
    
        left = adapter._robot_spec.groups["left_arm"]
        right = adapter._robot_spec.groups["right_arm"]
>       assert str(left.gravity_model_path).endswith("openarm_v10_left.urdf")

adapter    = <dimos.hardware.whole_body.openarm.adapter.OpenArmDualWholeBodyAdapter object at 0xfefefab75640>
left       = <[RuntimeError("Failed to pull LFS file .../dimos/data/.lfs/openarm_description.tar.gz after 3 att...scription.tar.gz']' returned non-zero exit status 1.") raised in repr()] DamiaoJointGroupSpec object at 0xfefefab748c0>
right      = <[RuntimeError("Failed to pull LFS file .../dimos/data/.lfs/openarm_description.tar.gz after 3 att...scription.tar.gz']' returned non-zero exit status 1.") raised in repr()] DamiaoJointGroupSpec object at 0xfefefab76210>

.../whole_body/openarm/test_adapter.py:62: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dimos/utils/data.py:369: in __str__
    return str(self._ensure_downloaded())
        self       = <[RuntimeError("Failed to pull LFS file .../dimos/data/.lfs/openarm_description.tar.gz after 3 att...fs/openarm_description.tar.gz']' returned non-zero exit status 1.") raised in repr()] LfsPath object at 0xfeff0cf1d950>
dimos/utils/data.py:347: in _ensure_downloaded
    cache = get_data(filename)
        cache      = None
        filename   = '.../urdf/robot/openarm_v10_left.urdf'
        self       = <[RuntimeError("Failed to pull LFS file .../dimos/data/.lfs/openarm_description.tar.gz after 3 att...fs/openarm_description.tar.gz']' returned non-zero exit status 1.") raised in repr()] LfsPath object at 0xfeff0cf1d950>
dimos/utils/data.py:304: in get_data
    archive_path = _decompress_archive(_pull_lfs_archive(archive_name))
        archive_name = 'openarm_description'
        data_dir   = PosixPath('.../dimos/dimos/data')
        file_path  = PosixPath('.../dimos/dimos/data/.../urdf/robot/openarm_v10_left.urdf')
        name       = '.../urdf/robot/openarm_v10_left.urdf'
        nested_path = PosixPath('urdf/robot/openarm_v10_left.urdf')
        path_parts = ('openarm_description', 'urdf', 'robot', 'openarm_v10_left.urdf')
dimos/utils/data.py:248: in _pull_lfs_archive
    _lfs_pull(file_path, repo_root)
        file_path  = PosixPath('.../dimos/data/.lfs/openarm_description.tar.gz')
        filename   = 'openarm_description'
        repo_root  = PosixPath('.../work/dimos/dimos')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

file_path = PosixPath('.../dimos/data/.lfs/openarm_description.tar.gz')
repo_root = PosixPath('.../work/dimos/dimos')

    def _lfs_pull(file_path: Path, repo_root: Path, *, retries: int = 2) -> None:
        relative_path = file_path.relative_to(repo_root)
    
        env = os.environ.copy()
        env["GIT_LFS_FORCE_PROGRESS"] = "1"
    
        last_err: subprocess.CalledProcessError | None = None
        for attempt in range(1, retries + 2):  # retries + 1 total attempts
            try:
                subprocess.run(
                    ["git", "lfs", "pull", "--include", str(relative_path)],
                    cwd=repo_root,
                    check=True,
                    env=env,
                )
                return
            except subprocess.CalledProcessError as e:
                last_err = e
                if attempt <= retries:
                    time.sleep(attempt)  # 1s, 2s backoff
    
>       raise RuntimeError(
            f"Failed to pull LFS file {file_path} after {retries + 1} attempts: {last_err}"
        )
E       RuntimeError: Failed to pull LFS file .../dimos/data/.lfs/openarm_description.tar.gz after 3 attempts: Command '['git', 'lfs', 'pull', '--include', 'data/.lfs/openarm_description.tar.gz']' returned non-zero exit status 1.

attempt    = 3
env        = {'ACCEPT_EULA': 'Y', 'ACTIONS_ID_TOKEN_REQUEST_TOKEN': 'eyJhbGciOiJSUzI1NiIsImtpZCI6IjM4ODI2YjE3LTZhMzAtNWY5Yi1iMTY5LT...-version=2.0', 'ACTIONS_ORCHESTRATION_ID': '8c3d40a9-6eba-4e99-a2a0-f2bbdecb0e8f.tests.ubuntu-24_04-arm_3_14_fal', ...}
file_path  = PosixPath('.../dimos/data/.lfs/openarm_description.tar.gz')
last_err   = CalledProcessError(1, ['git', 'lfs', 'pull', '--include', 'data/.lfs/openarm_description.tar.gz'])
relative_path = PosixPath('data/.lfs/openarm_description.tar.gz')
repo_root  = PosixPath('.../work/dimos/dimos')
retries    = 2

dimos/utils/data.py:216: RuntimeError

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

@TomCC7
TomCC7 marked this pull request as ready for review June 8, 2026 04:30
@greptile-apps

greptile-apps Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR introduces a new openarm_rs manipulator adapter backed by the Rust can-motor-control binding, refactors adapter discovery to use lightweight __registry__.py manifests for lazy loading, and adds the DamiaoArmAdapterBase shared base class with MIT control, gravity compensation, and enable/disable lifecycle management.

  • New openarm_rs adapter (openarm_rs/adapter.py, damiao/base_adapter.py): OpenArmRSAdapter extends DamiaoArmAdapterBase, correctly selecting per-side joint limits and validating constructor arguments; the base class handles CAN connect/disconnect, MIT commands, gravity-torque feed-forward via Pinocchio, and safe enable/disable sequencing.
  • Lazy registry (registry.py): discover() now reads ADAPTER_FACTORIES from each subpackage's __registry__.py manifest and defers importing adapter modules until create() is called, so listing adapters never pulls in optional hardware SDKs.
  • New RS blueprints (blueprints.py): coordinator_openarm_rs and openarm_rs_planner_coordinator are wired up and registered in all_blueprints.py, but both reference JointState and LCMTransport without importing them, causing a NameError at module load time.

Confidence Score: 4/5

The adapter core and registry refactor are solid, but the two new RS blueprints will crash at import time before any hardware is touched.

The base adapter, specs, registry, and adapter-side code are well-structured and backed by tests. The only broken path is in the new blueprints file, where JointState and LCMTransport are used at module level without being imported — any attempt to load coordinator-openarm-rs or openarm-rs-planner-coordinator raises NameError immediately, making both blueprints completely unusable as shipped.

dimos/robot/manipulators/openarm/blueprints.py needs the two missing imports before the RS blueprints can be used.

Important Files Changed

Filename Overview
dimos/robot/manipulators/openarm/blueprints.py Adds coordinator_openarm_rs and openarm_rs_planner_coordinator blueprints, but both use JointState and LCMTransport which are never imported — module import raises NameError immediately.
dimos/hardware/manipulators/openarm_rs/adapter.py New OpenArmRSAdapter delegating to DamiaoArmAdapterBase; correctly selects per-side joint limits and validates constructor arguments.
dimos/hardware/manipulators/damiao/base_adapter.py New shared base adapter for Damiao-backed arms; implements connect/disconnect, MIT control, gravity compensation, and enable/disable lifecycle.
dimos/hardware/manipulators/registry.py Registry refactored to use lightweight registry.py manifests for lazy discovery; adapter implementations are only imported when selected.
dimos/hardware/manipulators/damiao/specs.py New typed DamiaoArmSpec and DamiaoMotorSpec dataclasses with length and ID uniqueness validation.
dimos/robot/catalog/openarm.py Minor additions: exports OPENARM_V10_RIGHT_MODEL and merges adapter_kwargs properly so the side key is always preserved when callers extend it.
dimos/hardware/manipulators/test_registry.py New registry tests including lazy-import enforcement and can_motor_control import isolation during discovery.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["adapter_registry.discover()"] --> B["Scan manipulators subpackages"]
    B --> C{"__registry__.py exists?"}
    C -->|No| D["Skip subpackage"]
    C -->|Yes| E["import __registry__.py (lightweight manifest)"]
    E --> F["Read ADAPTER_FACTORIES {name → module:Class}"]
    F --> G["register_path(name, factory_path) (lazy — no adapter import yet)"]
    G --> H["adapter_registry.available() returns sorted keys"]
    H --> I["adapter_registry.create('openarm_rs', ...)"]
    I --> J["_resolve_adapter('openarm_rs')"]
    J --> K["importlib.import_module('openarm_rs.adapter')"]
    K --> L["OpenArmRSAdapter(**kwargs)"]
    L --> M["DamiaoArmAdapterBase.__init__ builds DamiaoArmSpec (side-specific limits)"]
    M --> N["adapter.connect()"]
    N --> O["_build_robot() SocketCanBus + DamiaoCodec"]
    O --> P["robot.connect()"]
    P --> Q["refresh_state(force=True)"]
    Q --> R["write_enable(True)"]
    R --> S["robot.enable()"]
    S --> T["write_joint_positions (hold current pose)"]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A["adapter_registry.discover()"] --> B["Scan manipulators subpackages"]
    B --> C{"__registry__.py exists?"}
    C -->|No| D["Skip subpackage"]
    C -->|Yes| E["import __registry__.py (lightweight manifest)"]
    E --> F["Read ADAPTER_FACTORIES {name → module:Class}"]
    F --> G["register_path(name, factory_path) (lazy — no adapter import yet)"]
    G --> H["adapter_registry.available() returns sorted keys"]
    H --> I["adapter_registry.create('openarm_rs', ...)"]
    I --> J["_resolve_adapter('openarm_rs')"]
    J --> K["importlib.import_module('openarm_rs.adapter')"]
    K --> L["OpenArmRSAdapter(**kwargs)"]
    L --> M["DamiaoArmAdapterBase.__init__ builds DamiaoArmSpec (side-specific limits)"]
    M --> N["adapter.connect()"]
    N --> O["_build_robot() SocketCanBus + DamiaoCodec"]
    O --> P["robot.connect()"]
    P --> Q["refresh_state(force=True)"]
    Q --> R["write_enable(True)"]
    R --> S["robot.enable()"]
    S --> T["write_joint_positions (hold current pose)"]
Loading

Reviews (8): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile

Comment thread dimos/hardware/manipulators/openarm_rs/adapter.py Outdated
Comment on lines +480 to +490
def write_clear_errors(self) -> bool:
if self._robot is None:
return False
try:
self._robot.disable()
self._robot.enable()
except Exception as exc:
logger.error(f"{type(self).__name__} {self._hardware_id} clear errors failed: {exc}")
return False
self._enabled = True
return True

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 write_clear_errors() re-enables the motors but does not issue a hold command for the current position, unlike write_enable(True) which calls write_joint_positions(positions) after enabling. On a gravity-loaded arm this means clearing errors leaves the arm unpowered at its last position for one control cycle before the caller sends the next command, which could cause uncontrolled droop or jerk.

Suggested change
def write_clear_errors(self) -> bool:
if self._robot is None:
return False
try:
self._robot.disable()
self._robot.enable()
except Exception as exc:
logger.error(f"{type(self).__name__} {self._hardware_id} clear errors failed: {exc}")
return False
self._enabled = True
return True
def write_clear_errors(self) -> bool:
if self._robot is None:
return False
try:
self._robot.disable()
self._robot.enable()
except Exception as exc:
logger.error(f"{type(self).__name__} {self._hardware_id} clear errors failed: {exc}")
return False
self._enabled = True
positions = self.read_joint_positions()
if not self.write_joint_positions(positions):
logger.error(f"{type(self).__name__} {self._hardware_id} clear errors hold failed")
return False
return True

Comment on lines +302 to +315
def disconnect(self) -> None:
if self._robot is not None:
try:
self._robot.disable()
except Exception as exc:
logger.warning(
f"{type(self).__name__} {self._hardware_id} disable on disconnect failed: {exc}"
)
self._enabled = False
self._connected = False
self._robot = None
self._arm = None
self._state_cache = None

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 disconnect() only disables motors, no connection teardown

connect() calls robot.connect() but disconnect() only calls robot.disable(). If the can_motor_control binding keeps sockets, threads, or file descriptors open until an explicit disconnect is called, resources will leak on every reconnect or clean shutdown. The original OpenArmAdapter.disconnect() closes the bus (bus.closed is True in its test). Consider calling self._robot.disconnect() (or equivalent) if the binding exposes one, before nulling out self._robot.

Comment on lines +100 to +120
import dimos.hardware.manipulators as pkg

for root in pkg.__path__:
for child in sorted(Path(root).iterdir()):
if not child.is_dir() or child.name.startswith(("_", ".")):
continue
if not (child / "__registry__.py").exists():
continue

module_name = f"dimos.hardware.manipulators.{child.name}.__registry__"
module = importlib.import_module(module_name)
adapter_factories_obj = getattr(module, "ADAPTER_FACTORIES", None)
if not isinstance(adapter_factories_obj, Mapping):
raise TypeError(f"{module_name} must define ADAPTER_FACTORIES")
adapter_factories = cast("Mapping[object, object]", adapter_factories_obj)
for name, factory_path in adapter_factories.items():
if not isinstance(name, str) or not isinstance(factory_path, str):
raise TypeError(
f"{module_name}.ADAPTER_FACTORIES must map strings to strings"
)
self.register_path(name, factory_path)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 discover() no longer silences import errors from __registry__.py files

The old discover() wrapped each adapter import in except ImportError and logged a debug message, so a broken adapter never blocked discovery of others. The new implementation calls importlib.import_module(module_name) for each __registry__.py with no error handling. A SyntaxError, missing transitive dependency, or any other exception in a __registry__.py (even a third-party plugin) will now abort discovery entirely and make all adapters unavailable. Adding a narrow except Exception around each importlib.import_module call with a warning log would restore the resilience property.

@TomCC7
TomCC7 force-pushed the cc/openarm-rust-adapter branch from b675674 to b5a0e2c Compare June 8, 2026 05:32
Comment thread openspec/changes/archive/2026-06-06-add-dm-motor-arm-adapter/tasks.md Outdated
adapter.connect()


def test_lifecycle_read_write_disable() -> None:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are many low value tests in this file. Tests should check functionality.

A good test is structured like this:

  1. setup the test
  2. execute the functionality
  3. check that the desired result was achieved

But a test like this one just constructs one object and asserts every minor aspect. It's not clear what behavior is even desired given that so much is asserted.

Tests that over-assert make the system hard to change and introduce uncertainty.

Comment thread docs/development/openspec.md Outdated
@@ -0,0 +1,102 @@
# OpenSpec Workflow

DimOS uses OpenSpec as the checked-in planning layer for behavior changes. OpenSpec artifacts live under `openspec/` and should describe what the system is supposed to do, why it is changing, and how contributors or agents should validate the work.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want to use OpenSpec, that should be a separate PR, it shouldn't be coupled to this openarm stuff.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the confusion added here. I based all my branches on an openspec initialization commit. I cleaned that out and created this pr: #2428. will remove openspec stuff in this branch

The FloatArray alias and its numpy.typing.NDArray import were never
referenced. Remove both.
The OpenArmRSMotorSpecConfig alias for DamiaoMotorSpec was only
referenced by its own __all__ entry; nothing imports it. Remove both.
Move 'import time' out of FakeState.__init__ to the module top, per the
imports-at-top convention. FakeState.timestamp is still read by the
adapter's staleness check, so it stays.
gravity_comp=True and canfd=True are already the OpenArmRSAdapter
defaults. The blueprint should only specify what differs, so keep just
gravity_model_path.
The OpenArm integration guide inlined the kp/kd preset numbers, which
drift from the adapter code. Replace them with a pointer to
OpenArmRSAdapter._DEFAULT_KP/_DEFAULT_KD (and the openarm adapter's
own constants).
@paul-nechifor

Copy link
Copy Markdown
Contributor

@TomCC7 My auto fixer created this PR: https://github.com/dimensionalOS/dimos/pull/2426/changes

Do you agree with the changes? If so, please merge them into this PR.

…utofixes

Auto-fixes for cc/openarm-rust-adapter
@github-actions github-actions Bot added the ready-to-merge Required CI checks have passed on this PR label Jun 8, 2026
@github-actions github-actions Bot removed the ready-to-merge Required CI checks have passed on this PR label Jun 8, 2026
Comment on lines +452 to +478
def write_stop(self) -> bool:
if self._arm is None or self._robot is None:
return False
if self._gravity_comp and self._enabled:
try:
q_now = self.read_joint_positions()
except RuntimeError:
return False
return self.write_mit_commands(
q=q_now,
dq=self._zero_vector(),
kp=list(self._kp),
kd=list(self._kd),
tau=self.compute_gravity_torques(q_now),
)
try:
self._robot.disable()
except Exception:
logger.warning(
"damiao adapter stop disable failed",
adapter=type(self).__name__,
hardware_id=self._hardware_id,
exc_info=True,
)
return False
self._enabled = False
return True

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 write_stop() leaves motors powered on gravity-comp state-read failure

When gravity_comp=True and _enabled=True, a RuntimeError from read_joint_positions() (e.g., a CAN bus fault) causes the method to return False without ever calling _robot.disable(). The motors remain hardware-powered with no position hold issued — the opposite of a stop. The fallthrough _robot.disable() path at the bottom of the method is never reached because the gravity-comp branch returns early. A safe fallback would be to attempt _robot.disable() before returning False in the except RuntimeError block.

Comment on lines +480 to +503
def write_enable(self, enable: bool) -> bool:
if self._robot is None:
return False
try:
self._robot.enable() if enable else self._robot.disable()
except Exception:
logger.exception(
"damiao adapter enable failed",
adapter=type(self).__name__,
hardware_id=self._hardware_id,
enable=enable,
)
return False
self._enabled = enable
if enable:
positions = self.read_joint_positions()
if not self.write_joint_positions(positions):
logger.error(
"damiao adapter startup hold failed",
adapter=type(self).__name__,
hardware_id=self._hardware_id,
)
return False
return True

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 _enabled=True persists after a failed startup hold position write

_enabled = enable is set unconditionally at line 493 once _robot.enable() succeeds. If the subsequent write_joint_positions(positions) call returns False (for example, a transient CAN error during the MIT write), the method returns False to the caller but _enabled remains True. The hardware motors are enabled (from _robot.enable()) but no hold position was written, so the arm is powered with no reference. Any subsequent method call that guards on self._enabled (such as write_joint_positions, write_joint_torques, write_mit_commands) will proceed against an arm in an undefined state. Consider setting _enabled = False and calling _robot.disable() before returning False from the startup hold failure path.

@github-actions github-actions Bot added the ready-to-merge Required CI checks have passed on this PR label Jun 9, 2026
@greptile-apps

greptile-apps Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Want your agent to iterate on Greptile's feedback? Try greploops.

@TomCC7
TomCC7 force-pushed the cc/openarm-rust-adapter branch from 6f77783 to 2125808 Compare June 9, 2026 00:37
@github-actions github-actions Bot removed the ready-to-merge Required CI checks have passed on this PR label Jun 9, 2026
Comment thread dimos/hardware/manipulators/damiao/base_adapter.py Outdated
@github-actions github-actions Bot added the ready-to-merge Required CI checks have passed on this PR label Jun 9, 2026
@github-actions github-actions Bot removed the ready-to-merge Required CI checks have passed on this PR label Jun 19, 2026
Comment on lines +103 to +120
("joint_state", JointState): LCMTransport("/coordinator/joint_state", JointState),
}
)

openarm_rs_planner_coordinator = autoconnect(
ManipulationModule.blueprint(
robots=[_openarm_rs_hw.to_robot_model_config()],
planning_timeout=10.0,
enable_viz=True,
),
ControlCoordinator.blueprint(
hardware=[_openarm_rs_hw.to_hardware_component()],
tasks=[_openarm_rs_hw.to_task_config()],
),
).transports(
{
("joint_state", JointState): LCMTransport("/coordinator/joint_state", JointState),
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Missing imports cause NameError at module load

JointState and LCMTransport are referenced at module level in both coordinator_openarm_rs and openarm_rs_planner_coordinator, but neither is imported anywhere in this file. Because the .transports({...}) call is evaluated when the module is imported, loading the module — which happens as soon as any blueprint from this file is selected — will raise NameError: name 'JointState' is not defined. Both blueprints are registered in all_blueprints.py, so dimos run coordinator-openarm-rs will fail immediately.

Add the two missing imports:

  • from dimos.core.transport import LCMTransport
  • from dimos.msgs.sensor_msgs.JointState import JointState

@TomCC7
TomCC7 marked this pull request as draft June 20, 2026 01:04
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs.

@github-actions github-actions Bot added the stale label Jul 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically closed because it has been stale for 30 days with no activity. Feel free to reopen it if you plan to continue working on it.

@github-actions github-actions Bot closed this Jul 21, 2026
@TomCC7 TomCC7 reopened this Jul 21, 2026
@github-actions github-actions Bot removed the stale label Jul 22, 2026
@TomCC7

TomCC7 commented Aug 7, 2026

Copy link
Copy Markdown
Member Author

close in lieu of #3388

@TomCC7 TomCC7 closed this Aug 7, 2026
@TomCC7
TomCC7 deleted the cc/openarm-rust-adapter branch August 7, 2026 22:14
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.

2 participants