Skip to content

Feat/gesture recognition astronaut sub mission - #344

Open
ngnryan wants to merge 7 commits into
masterfrom
feat/gesture-recognition-astronaut-sub-mission
Open

ngnryan wants to merge 7 commits into
masterfrom
feat/gesture-recognition-astronaut-sub-mission

Conversation

@ngnryan

@ngnryan ngnryan commented Nov 1, 2026 •

Copy link
Copy Markdown

Description

This PR does the following:

  • Defines the follow-command logic/definition. (Starfish arms)
  • Provides endpoint (/recognize_follow_gesture) for the state machine to integrate.
  • Provides ONNX model download for tests.
  • NOTE: NOT TESTED ON INTENDED HARDWARE (only mac camera has been used)

Testing Steps (if relevant)

Switch to this Branch:

git switch feat/gesture-recognition-astronaut-sub-mission

To close the camera, click Q or ESC

For mac:

Create the Python Environment (Python 3.10):

python3 -m venv .venv
source .venv/bin/activate

python -m pip install --upgrade pip
python -m pip install -r urc_perception/requirements.txt

Download the ONNX model

mkdir -p models:

curl --fail --location
https://raw.githubusercontent.com/RoboJackets/urc-software/b8b74d970d254592ecf66b8305153375044bde0b/yolo26n-pose.onnx
--output models/yolo26n-pose.onnx

Verification:

printf '%s %s\n'
f7db70cd50c69c9461f6b6b3c46dfc31959123d7bf113a396179052ac25e4ea0
models/yolo26n-pose.onnx | shasum -a 256 --check

It should print out : models/yolo26n-pose.onnx: OK

Run Camera Script: (Allow terminal to open camera)

python urc_perception/src/gesture_recognition.py
--backend yolo
--yolo-model "$(pwd)/models/yolo26n-pose.onnx"
--device auto

If the wrong camera opens:

python urc_perception/src/gesture_recognition.py
--backend yolo
--yolo-model "$(pwd)/models/yolo26n-pose.onnx"
--camera-index 1
--device auto

For Linux:

Set up + download:
git fetch origin
git switch feat/gesture-recognition-astronaut-sub-mission

python3 -m venv .venv
source .venv/bin/activate

python -m pip install --upgrade pip
python -m pip install -r urc_perception/requirements.txt

mkdir -p models

curl --fail --location
https://raw.githubusercontent.com/RoboJackets/urc-software/b8b74d970d254592ecf66b8305153375044bde0b/yolo26n-pose.onnx
--output models/yolo26n-pose.onnx

printf '%s %s\n'
f7db70cd50c69c9461f6b6b3c46dfc31959123d7bf113a396179052ac25e4ea0
models/yolo26n-pose.onnx | sha256sum --check

Should print out: models/yolo26n-pose.onnx: OK

Run the Camera

python urc_perception/src/gesture_recognition.py
--backend yolo
--yolo-model "$(pwd)/models/yolo26n-pose.onnx"
--device cpu

**If the wrong camera opens: **

python urc_perception/src/gesture_recognition.py
--backend yolo
--yolo-model "$(pwd)/models/yolo26n-pose.onnx"
--camera-index 1
--device cpu

**If access denied: **
sudo usermod -aG video "$USER"

**Windows: **

Set up + download:

git fetch origin
git switch feat/gesture-recognition-astronaut-sub-mission

py -3.10 -m venv .venv

Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
..venv\Scripts\Activate.ps1

python -m pip install --upgrade pip
python -m pip install -r urc_perception\requirements.txt

New-Item -ItemType Directory -Force models | Out-Null

Invoke-WebRequest -Uri "https://raw.githubusercontent.com/RoboJackets/urc-software/b8b74d970d254592ecf66b8305153375044bde0b/yolo26n-pose.onnx"
-OutFile "models\yolo26n-pose.onnx"

**Verify: **

$ExpectedHash = "f7db70cd50c69c9461f6b6b3c46dfc31959123d7bf113a396179052ac25e4ea0"
$ActualHash = (Get-FileHash models\yolo26n-pose.onnx -Algorithm SHA256).Hash.ToLower()

if ($ActualHash -ne $ExpectedHash) {
throw "Model checksum failed. Expected $ExpectedHash but received $ActualHash"
}

Write-Host "models\yolo26n-pose.onnx: OK"

Run The Camera:

$ModelPath = (Resolve-Path models\yolo26n-pose.onnx).Path

python urc_perception\src\gesture_recognition.py --backend yolo
--yolo-model $ModelPath `
--device cpu

**If the wrong camera opens: **

$ModelPath = (Resolve-Path models\yolo26n-pose.onnx).Path

python urc_perception\src\gesture_recognition.py --backend yolo
--yolo-model $ModelPath --camera-index 1
--device cpu

Expectation: When an active recognition goal receives camera images showing the follow gesture for the configured number of consecutive frames, the endpoint returns success with the detected person’s bounding box.

Design Presentation (only required for major additions)

https://gtvault-my.sharepoint.com/:p:/g/personal/anguyen600_gatech_edu/IQCLmshX5W9ISrELT8dRCIQzATImvowGl4x3TgeHKuC6XaE?e=qaLnsE

Self Checklist

  • I have formatted my code using ament_flake8
  • I have tested that the new behavior works

@ngnryan
ngnryan requested a review from Hiptostee November 6, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant