From 17619ea41d260b0ceda72da119940486fdac9e2b Mon Sep 17 00:00:00 2001 From: Philip Arola Date: Tue, 6 Nov 2018 17:12:48 -0800 Subject: [PATCH] Fixed head rotation and increased deadzone --- catkin_ws/src/face_detection/src/detect.py | 2 +- catkin_ws/src/gesture_controls/src/gestures.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/catkin_ws/src/face_detection/src/detect.py b/catkin_ws/src/face_detection/src/detect.py index b6bf8c3..25b4626 100755 --- a/catkin_ws/src/face_detection/src/detect.py +++ b/catkin_ws/src/face_detection/src/detect.py @@ -11,7 +11,7 @@ webcam = cv2.VideoCapture(0) webcamWidth = webcam.get(3) webcamHeight = webcam.get(4) -deadzone = 100 +deadzone = 200 # Create the haar cascade faceCascade = cv2.CascadeClassifier(cascPath) diff --git a/catkin_ws/src/gesture_controls/src/gestures.py b/catkin_ws/src/gesture_controls/src/gestures.py index f7fef76..cec931f 100755 --- a/catkin_ws/src/gesture_controls/src/gestures.py +++ b/catkin_ws/src/gesture_controls/src/gestures.py @@ -7,7 +7,7 @@ face_angle_global = None face_count_global = None -deadzone = 100 +deadzone = 200 def angle_callback(data): global face_angle_global @@ -37,7 +37,7 @@ def leftWave(): LArmShoulderHori.publish(0.84) LArmElbowVert.publish(1.05) LArmElbowHori.publish(0) - NeckHori.publish(-0.94) + NeckHori.publish(0.95) NeckVert.publish(0.8) time.sleep(1) LArmElbowHori.publish(1.05) @@ -64,7 +64,7 @@ def rightWave(): LArmShoulderHori.publish(1.89) LArmElbowVert.publish(1.05) LArmElbowHori.publish(0) - NeckHori.publish(0.95) + NeckHori.publish(-0.94) NeckVert.publish(0.8) time.sleep(1) RArmElbowHori.publish(0)