Repository navigation
Conversation
…ition-astronaut-sub-mission
…c camera, created standalone endpoint for state machine integration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR does the following:
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
ament_flake8