https://github.com/quantum-0/cv-sar-control
https://github.com/quantum-0/cv-sar-control
computer-vision cv2 esp8266-arduino python3 sar super-animal-rolaye
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/quantum-0/cv-sar-control
- Owner: Quantum-0
- Created: 2022-01-23T15:57:09.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-09T17:41:27.000Z (over 3 years ago)
- Last Synced: 2025-01-05T03:12:09.346Z (9 months ago)
- Topics: computer-vision, cv2, esp8266-arduino, python3, sar, super-animal-rolaye
- Language: Python
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Computer Vision SAR Controller
## About
This script allows [Super Animal Royale](https://animalroyale.com/) player to control game with their head.
It uses your web-camera and computer vision for detecting your head and hand.Available emotions and quick phrases:
- Yes (a nod of the head)
- No (head shaking)
- Heart/Kiss (make your lips like when you kissing)
- Hello (shake your hand in front of a camera)In addition, there is a hardware solution, based on ESP8266 (with Arduino framework) and gyroscope sensor (ITG3200).
It can be placed on your headset for example. Microcontroller detects your head shaking with a gyroscope and sends
information about it in your local Wi-Fi network to your computer, where another scripts handles UDP packets and
interacts with SAR. This solution supports only "Yes" and "No" quick phrases.## Files
- **cv_sar_controller.py** - Computer Vision controller for SAR (Main executable if you use camera)
- **hw_sar_controller.py** - UDP Handler for packets from microcontroller (Main executable if you use hardware solution)
- **esp_head_shaking_tracker.ino** - Arduino Sketch for ESP8266 with connected ITG3200 (Don't forget to set your Wi-Fi SSID and password)
- **sar_adapter.py** - Just a small module helps both main scripts to interact with game. Some kind of API, dunno.## Dependencies & Requirements
### For CV Solution
- **Python 3.9+ interpreter**
- **win32gui**
- **opencv-python**
- **mediapipe**### For HW Solution
- **Python 3.7+ interpreter**
- **win32gui**
- **ESP8266 Module**
- **ITG3200 Sensor**## Install Instruction (for CV solution)
- Install [Python Interpreter](https://www.python.org/)
- Install requirements with PIP: `pip install mediapipe opencv-python pywin32`
- Run the script (cv_sar_controller.py) with the interpreter
- Open the game and have fun## Demo
### Yes/No/Hello
[](https://www.youtube.com/watch?v=PyscIRAW2p0)### Moving Control
[](https://www.youtube.com/watch?v=i26YWqk0x7U)## Releases
I hope I'll found a way to compile it into executable EXE-file to simplify installing process >~<