Quick Start & Launching

Play immediately in Browser Demo mode, or launch the full Windows + WSL ROS 2 Jazzy stack with game_terminals.ps1 or ros2 launch.

Choose the workflow that matches what you have in front of you: pure browser simulation, the one-command Windows Terminal lab launcher, or manual Windows + WSL ROS 2 launch.

1. Browser Demo Mode (No Hardware)

To try the web interface and play against the unbeatable minimax AI locally without ROS 2 or a Kinova arm:

web/
cd web
pnpm install
pnpm dev

Open http://localhost:3000/play (or the live Vercel deployment), select Demo, and click any square.

2. One-Command Lab Launcher (Windows Terminal)

On the lab laptop (Windows + WSL Ubuntu 24.04), tools/game_terminals.ps1 stops stale processes and opens six dedicated Windows Terminal tabs in dependency order:

PowerShell (repo root)
# Start all 6 tabs (default LifeCam index 1)
.\tools\game_terminals.ps1

# Override camera index if built-in webcam is 1
.\tools\game_terminals.ps1 -Camera 0

# Stop all running camera, ROS 2, and web processes
.\tools\game_terminals.ps1 -StopOnly
TabHostCommand
cameraWindowspython tools/camera_stream.py --camera 1 (MJPEG on :8765/video)
driverWSLros2 run kinova_gen3 kinova_gen3_node --ip 192.168.1.10
markersWSLros2 run unbeatabot marker_input --ros-args -p camera:=http://$host:8765/video
bridgeWSLros2 run unbeatabot web_bridge (HTTP/SSE on :8780)
gameWSLPrompts for e-stop confirmation, then starts game_manager
webWindowspnpm dev in web/

Hand on the e-stop before pressing Enter

The game tab waits for you to press Enter before starting game_manager because game_manager immediately homes/parks the arm at startup.

3. Manual Windows Camera Stream + WSL Launch

If you prefer launching manually instead of using Windows Terminal tabs, serve the USB camera on Windows over HTTP so WSL avoids USB/IP (usbipd) frame drops:

Start the camera stream on Windows

Windows PowerShell
python tools/camera_stream.py --camera 1

Launch ROS 2 stack in WSL

WSL Ubuntu 24.04
source /opt/ros/jazzy/setup.bash
source ~/unbeatabot/ros2_ws/install/setup.bash
export ROS_DOMAIN_ID=87 ROS_LOCALHOST_ONLY=1

host=$(ip route show default | awk '{print $3}')
ros2 launch unbeatabot unbeatabot.launch.py \
  fake:=false \
  input:=markers \
  camera:="http://$host:8765/video" \
  web:=true
WSL Ubuntu 24.04 (no hardware)
source /opt/ros/jazzy/setup.bash
source ~/unbeatabot/ros2_ws/install/setup.bash
ros2 launch unbeatabot unbeatabot.launch.py view:=true web:=true

ROS 2 Jazzy & Kortex Workspace Setup

On Ubuntu 24.04 / ROS 2 Jazzy (Python 3.12), Kinova's wheel pins an older protobuf version, so install kortex_api and protobuf==3.20.3 into ~/kortex and build with colcon:

WSL one-time setup
# 1. Kinova Kortex API (Jazzy / Python 3.12)
sudo apt install python3-deprecated
curl -fsSLO https://artifactory.kinovaapps.com:443/artifactory/generic-public/kortex/API/2.6.0/kortex_api-2.6.0.post3-py3-none-any.whl
python3 -m pip install --target ~/kortex --no-deps kortex_api-2.6.0.post3-py3-none-any.whl protobuf==3.20.3
export PYTHONPATH=$HOME/kortex:$PYTHONPATH

# 2. Clone Kinova ROS 2 packages into ros2_ws/src (gitignored)
git clone --depth 1 https://github.com/YorkCFR/kinova /tmp/kinova
cp -r /tmp/kinova/kinova_ws/src/kinova_gen3_interfaces /tmp/kinova/kinova_ws/src/kinova_gen3 ros2_ws/src/

# 3. Install dependencies and build
cd ros2_ws
rosdep install --from-paths src --ignore-src -y
colcon build --symlink-install
source install/setup.bash

Launch Arguments Reference

ArgumentDefaultDescription
faketruetrue runs fake_arm; false runs kinova_gen3_node
playerXHuman shape (X or O); X always moves first
ip192.168.1.10Kinova Gen3 Lite IP address when fake:=false
inputkeyboardmarkers, camera, or keyboard
camera0OpenCV camera index or MJPEG URL (e.g., http://<win-host>:8765/video)
viewfalseLaunch OpenCV game_view window
webfalseLaunch web_bridge HTTP/SSE server on port 8780

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