i2rt-yam-bringup
Installation
SKILL.md
I2RT YAM SDK & CAN Bringup
Ensure the official I2RT YAM Python SDK (i2rt) and host CAN transport are ready before running YAM robot code (i2rt drives physical YAM Damiao motors over 1 Mbps CAN via python-can; only get_yam_robot(..., sim=True) runs without CAN):
-
SDK Check & Install:
- Check
python3 -c "from i2rt.robots.utils import ArmType, GripperType; print('i2rt ready')". - If missing (
i2rtis not on PyPI), clonegit clone https://github.com/i2rt-robotics/i2rt.gitand install withpip install -e ./i2rt(orpip install --no-deps --no-build-isolation -e ./i2rtplusnumpy mujoco mink ruckig python-can pyyaml portal crcmod-plus dm-envifpyproject.tomlpins conflict with host Python).
- Check
-
Real-Hardware CAN Bringup (Linux
socketcanvs. macOSmacos_can.py):- Linux: Bring up
socketcanat 1 Mbps (sudo ip link set can0 up type can bitrate 1000000) and passchannel="can0"toget_yam_robot. - macOS (Apple Silicon & Intel):
i2rt'sget_yam_robotandrun_startup_checksrequire"can"inchanneland hardcodebustype="socketcan", which macOS lacks; moreover,python-can's built-inGsUsbBuscallsdetach_kernel_driver(0)(Access deniedwithoutsudo) anddev.reset()(wedginggs_usbSTM32EP 0x81when TX echoes are unread). - On macOS, ensure
libusbandgs-usbare installed (brew install libusb && pip install gs-usb pyusbfor candleLight / CANable / I2RT USB-CAN adapters) and callinstall_mac_can()from bundledmacos_can.pyonce beforeget_yam_robot(channel="can0", ...):- Safe no-op on Linux; auto-discovers
libusb-1.0.dylibacross/opt/homebrew/lib,/usr/local/lib, and/opt/local/libinside isolatedvenv/condaenvironments withoutDYLD_LIBRARY_PATH. - Maps
"can0","can1", ... deterministically across single or bimanualgs_usbadapters withoutdetach_kernel_driverordev.reset(), filters TX echoes (echo_id != GS_USB_NONE_ECHO_ID), drainsclean_errorbursts, runs a silent motor-independentGS_CAN_MODE_LOOP_BACKhealth check (with DFU auto-recovery only ifEP 0x81is wedged), and also supports PCAN (interface="pcan") or SLCAN (interface="slcan", backend_channel="/dev/cu.usbmodem...").
- Safe no-op on Linux; auto-discovers
- Linux: Bring up
-
Safe Shutdown:
- Park the arm gently near the table before calling
robot.close()so it never drops (sincerobot.close()sets all motor torques to zero).
- Park the arm gently near the table before calling