Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions dimos/hardware/whole_body/damiao/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,16 @@ def _make_can_bus(self, name: str) -> Any:
if sys.platform == "linux":
return can_motor_control.SocketCanBus(device or f"can{index}")
if sys.platform == "darwin":
selector = {"serial_number": device} if device is not None else {"index": index}
if device is not None:
return can_motor_control.GsUsbBus(
vendor_id=self.gs_usb_vendor_id,
product_id=self.gs_usb_product_id,
serial_number=device,
)
return can_motor_control.GsUsbBus(
vendor_id=self.gs_usb_vendor_id,
product_id=self.gs_usb_product_id,
**selector,
index=index,
)
raise RuntimeError(f"Damiao CAN transport is unsupported on {sys.platform}")

Expand Down
Loading