Troubleshooting

Fixes for black camera feeds, usbipd V4L2 timeouts, WEAK markers, folded-rest INVALID_PARAM, SESSION_NOT_IN_CONTROL, red faults, and HELP NEEDED states.

Common hardware, camera, WSL2, and ROS 2 issues encountered during bring-up and games, along with exact fixes.

Black Camera Feed or Wrong Webcam

  • Uncompressed USB bandwidth limit: OpenCV defaults to raw frames, which saturate laptop USB controllers and return solid black frames. Both camera_stream.py and check_markers.py force MJPG at 1280x720.
  • Power / hub issue: Plug the LifeCam Studio directly into a laptop USB port rather than an unpowered USB hub, or test --width 640 --height 480.
  • Wrong index (0 vs 1): If the laptop's built-in webcam opens instead of the LifeCam, pass --camera 0 or -Camera 0 to game_terminals.ps1. Checking CAP_PROP_FOCUS != -1 distinguishes the LifeCam from fixed-focus laptop cameras.

usbipd V4L2 Timeout in WSL2

Avoid usbipd for the LifeCam

Attaching the LifeCam directly into WSL2 via usbipd frequently drops UVC isochronous packets and fails with V4L2 select() timeout.

Instead, run the lightweight MJPEG streamer on Windows and read the stream URL from WSL:

Windows -> WSL MJPEG stream
# Windows
python tools/camera_stream.py --camera 1

# WSL
host=$(ip route show default | awk '{print $3}')
ros2 run unbeatabot marker_input --ros-args -p camera:="http://$host:8765/video"

WEAK or Missed X Markers

  • Glare & focus: Reduce overhead specular glare on the tokens and ensure fixed focus is locked (focus:=15).
  • Print scale: Verify the printed 100 mm ruler on markers.pdf actually measures 100 mm and that matte paper was used with white quiet-zone borders intact.
  • Small X marker (15 mm): If 1280x720 still misses an X marker occasionally, switch to 1080p or note that marker_input treats a covered square (?) safely without misreading it as empty.

INVALID_PARAM & Folded Rest Pose

From the Kinova Gen3 Lite's folded rest pose, joint 3 sits around 159°, outside the Cartesian IK solver's working region. Any Cartesian /set_tool call aborts with INVALID_PARAM while the driver still returns status: true.

  • Always call /home first (python3 tools/arm_cli.py home) before sending Cartesian moves.
  • If the arm sagged beside the base when powered off, lift it first using a slow joint-space move in the Kinova Web App (http://192.168.1.10).

SESSION_NOT_IN_CONTROL & Red Faults

  • Single control session: Only one Kortex client can hold motion control at a time. Stop kinova_gen3_node before running direct Kortex scripts or taking control in the Kinova Web App.
  • Red fault ring on arm: Stop the driver, clear hardware faults via Kortex ClearFaults() (or the Web App), inspect /get_tool, and re-home before resuming.

HELP NEEDED States & Config Reloads

If game_manager enters PICK_HELP, PLACE_HELP, or BOARD_HELP:

  1. Read the banner message in /play (or game_view).
  2. Fix the physical token (e.g., stand an O piece upright or undo an illegal board change).
  3. Click Resume in /play (calls POST /api/resume), or press R in game_view.

Edited YAML files not taking effect?

In ROS 2, installed config symlinks point through build/. After editing calibration.yaml, grasp.yaml, or marker_calibration.yaml, re-run colcon build --symlink-install in ros2_ws/ and restart the nodes.

Unbeatabot — an EECS 4421 project. Layout based on Animate UI. Source on GitHub.