Conversation
Greptile SummaryAdds a from-scratch Damiao MIT-mode CAN driver,
Confidence Score: 4/5Safe to merge after fixing gravity feedforward in write_joint_velocities and the --classical docstring error. Two P1 findings: missing gravity compensation in velocity mode causes real hardware arm sag, and the broken --classical CLI example will block the hardware bring-up workflow for new users. Everything else — driver correctness, frame encoding, catalog, blueprints, tests — is solid. dimos/hardware/manipulators/openarm/adapter.py (write_joint_velocities gravity comp) and dimos/robot/manipulators/openarm/scripts/openarm_set_mit_mode.py (docstring --classical flag) Important Files Changed
Sequence DiagramsequenceDiagram
participant App as Application
participant Adapter as OpenArmAdapter
participant Bus as OpenArmBus
participant CAN as SocketCAN (hw)
participant Motor as Damiao Motor
App->>Adapter: connect()
Adapter->>Bus: open() → start RX thread
Adapter->>Bus: write_ctrl_mode(MIT) × 7
Bus->>CAN: 0x7FF param-write frames
Adapter->>Bus: enable_all()
Bus->>CAN: 0xFC enable frames × 7
Motor-->>CAN: state reply frames
CAN-->>Bus: RX thread caches MotorState
Adapter->>Bus: wait_all_states(0.5s)
loop Control tick (100 Hz)
App->>Adapter: write_joint_positions(q_target)
Adapter->>Bus: get_states() → q_current
Adapter->>Adapter: computeGeneralizedGravity(q_current)
Adapter->>Bus: send_mit_many(q, dq=0, kp, kd, tau_g) × 7
Bus->>CAN: MIT frames × 7 (0.5 ms gaps)
Motor-->>CAN: updated state replies
end
App->>Adapter: disconnect()
Adapter->>Bus: disable_all()
Adapter->>Bus: close() → join RX thread
Reviews (1): Last reviewed commit: "reduced docstring to minimal" | 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.