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')". - Prefer Python >= 3.10 (
uv venv --python 3.11orpython3.11/3.12) when available; on Python 3.9-only hosts, pass--prefer-binaryfor wheel deps (pinningmink<1.0, pluslibusb-packageon macOS if Homebrewlibusbis absent) and--ignore-requires-python --no-deps --no-build-isolationfori2rtsopipdoes not attempt slow source builds ofmujoco/scipyor fail on Python>=3.10metadata. - 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
-
YAM Speed Limits & Hardware Teardown (follows
physical_robot_safety.md):-
Speeds:
0.75 rad/sdefault /1.50 rad/sceiling (smooth ramps; seewave.py). -
YAM-specific failure modes:
robot.close()immediately zeroes all Damiao torques; multi-second GIL/blocking stalls trigger Damiao0xD LOST_COMMwatchdog drops; Motor 7 (gripper) over-temp during long idle clamps kills the entirei2rtCAN thread; never park elevated inzero_gravity_mode=True. When streaming a USB camera on the same USB hub as ags_usbCAN adapter, requestMJPGat low FPS (e.g.,640x480at10–15 fps) or move the camera to a separate USB root port—uncompressed UVC video can starve bulk CAN reads and drop the motor chain mid-motion. -
Session pattern (
SIGTERM→finally:, smooth ramp from liveget_joint_pos()toQ_HOMEat<= 0.50 rad/sbeforerobot.close()):pythonfrom contextlib import contextmanager import signal, sys, time import numpy as np @contextmanager def yam_session(robot, q_home, park_vel_rad_s=0.50, dt_s=0.01): prev = signal.signal( signal.SIGTERM, lambda *_: sys.exit(128 + signal.SIGTERM) ) try: yield robot finally: try: q0 = np.asarray(robot.get_joint_pos(), dtype=np.float64) q1 = q0.copy() q1[:len(q_home)] = q_home dq = float(np.max(np.abs(q1[:6] - q0[:6]))) dur = max(0.5, 0.5 * np.pi * dq / park_vel_rad_s) for u in np.linspace(0.0, 1.0, max(2, int(dur / dt_s)) + 1): s = 0.5 * (1.0 - np.cos(np.pi * u)) robot.command_joint_pos(q0 + s * (q1 - q0)) time.sleep(dt_s) finally: robot.close() signal.signal(signal.SIGTERM, prev) with yam_session(robot, Q_HOME) as arm: # Motor heartbeat is live: fast control (<50 ms/step) in this process # only; run heavy encoding/VLM in a separate process or after this block. ...
-
-
Bring-Up Wave Task (
wave.md,wave.py):- Run
wave.py(--simoffline or--channel can0on hardware) for a free-space wave smoke test; seereferences/tasks/wave.mdfor keyframes and flags.
- Run


