Conversation
Greptile SummaryThis PR introduces a complete from-scratch OpenArm v10 integration: a Damiao MIT-mode CAN driver ( Confidence Score: 5/5Safe to merge — no P0 or P1 issues; all findings are minor style or robustness P2s. No blocking issues found. The driver, adapter, and tests are well-structured. Previous P1 comments have been addressed. Remaining findings (duplicate import, weak bounds check in a rarely-triggered branch, unclosed file handles in CLI scripts, potential NaN in workspace sampling for unlimited joints) are all P2 and do not affect correctness on the target hardware. dimos/perception/detection/type/imageDetections.py (duplicate import), dimos/utils/workspace.py (unbounded joint sampling), dimos/robot/manipulators/openarm/scripts/openarm_set_mit_mode.py (struct bounds check) Important Files Changed
Sequence DiagramsequenceDiagram
participant App as Application / Blueprint
participant Adapter as OpenArmAdapter
participant Bus as OpenArmBus
participant RX as RX Thread (daemon)
participant HW as Damiao Motors (CAN)
App->>Adapter: connect()
Adapter->>Bus: open() → start RX thread
Bus->>RX: spawn thread
Adapter->>Bus: write_ctrl_mode(MIT) × 7
Bus->>HW: 0x7FF param-write frame
Adapter->>Bus: enable_all()
Bus->>HW: ENABLE frame × 7
HW-->>RX: state reply frames
RX->>Bus: _states[recv_id] = MotorState
Adapter->>Bus: wait_all_states(0.5s)
Adapter->>Adapter: load Pinocchio model (gravity comp)
loop Control tick
App->>Adapter: write_joint_positions(q)
Adapter->>Bus: get_states() [read lock]
Adapter->>Adapter: _compute_gravity_torques(q_current)
Adapter->>Bus: send_mit_many(commands)
Bus->>HW: MIT frame × 7 (inter-frame 0.5ms)
HW-->>RX: state replies → cache update
end
App->>Adapter: disconnect()
Adapter->>Bus: disable_all()
Adapter->>Bus: close() → stop RX thread
Reviews (4): Last reviewed commit: "converted relateive paths to absolute pa..." | Re-trigger Greptile |
Problem
OpenArm is a bimanual 7-DOF research arm built from Damiao DM-J motors. Unlike every other arm in dimos, it ships no Python SDK — only raw CAN. Need a from-scratch driver + adapter + blueprints to run it.
Closes DIM-386
Solution
From-scratch Damiao MIT-mode CAN driver (ported from
enactic/openarm_can) +ManipulatorAdapterwrapper with Pinocchio gravity-comp feedforward + bimanual blueprints. Auto-writesCTRL_MODE=MITon connect. Per-side URDFs avoid phantom-arm Drake collisions. Generic reachability tool added todimos.utilssince it works on any URDF.Added:
dimos/hardware/manipulators/openarm/{driver,adapter,test_driver}.pydimos/robot/catalog/openarm.pydimos/robot/manipulators/openarm/blueprints.pydimos/robot/manipulators/openarm/scripts/{openarm_can_up.sh, openarm_can_probe.py, openarm_set_mit_mode.py}dimos/utils/workspace.pydocs/capabilities/manipulation/openarm_integration.mdModified:
dimos/robot/all_blueprints.pyBreaking Changes
None.
How to Test
Unit tests (no hardware):
Mock (no hardware, Drake viz):
Real hardware:
Full guide: openarm_integration.md.