Based on DFRobot Python code
Product Link: https://www.dfrobot.com/product-2914.html
Get code (you may want to use ~/robot_ws/src
here):
mkdir -p ~/gesture_ws/src
cd ~/gesture_ws/src
git clone https://github.com/slgrobotics/face_gesture_sensor.git
Install dependencies:
sudo rosdep init # do it once, if you haven't done it before
rosdep update
rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -r -y
Build it:
cd ~/gesture_ws
colcon build
Run the node:
ros2 run face_gesture_sensor fgs_node
Product:
Wiki:
Arduino library:
- https://github.com/DFRobot/DFRobot_GestureFaceDetection <- installs with Arduino IDE Manager, with RTU
- https://github.com/DFRobot/DFRobot_RTU
Playing with Python samples
mkdir ~/gesture
cd ~/gesture
git clone https://github.com/DFRobot/DFRobot_GestureFaceDetection.git
cd DFRobot_GestureFaceDetection
cd python/raspberrypi/examples
sudo apt install python3-smbus2
python3 get_pid_vid.py
FileNotFoundError: [Errno 2] No such file or directory: '/dev/ttyAMA0'
(edited get_pid_vid.py - set USE_I2C = True)
python3 get_pid_vid.py
When I moved in camera view, it printed and exited:
PID: 626
VID: 13123
After similarly editing,
python3 detect_gesture.py
face detection threshold: 60
gesture detection threshold: 60
gesture detection range: 100
Detect face at (x = 186, y = 380, score = 74)
Detect gesture 0, score = 0
...
Detect gesture 3, score = 93
Detect face at (x = 179, y = 383, score = 68)
...
Detect gesture 1, score = 85
Detect face at (x = 212, y = 365, score = 83)
Visit my Robots Notes repository