diff --git a/launch/robot_facial_expression.launch b/launch/robot_facial_expression.launch index e187ae7a4c935cd05470769f0c82a1de8025569b..dd4f0413171e4042dad0965affe35ab5ff1c2467 100644 --- a/launch/robot_facial_expression.launch +++ b/launch/robot_facial_expression.launch @@ -5,7 +5,6 @@ <!-- Start screen_listener node --> <node name="rsdk_xdisplay_image" pkg="robot_facial_expression" type="screen_listener.py" /> - <param name = "robot_gender" value ="male"/> <!-- Start control_physical node <node name="control" pkg="robot_facial_expression" type="control_physical.py" /> diff --git a/scripts/Eye.py b/scripts/Eye.py index bcf1975b749095529d18bc7cba456bf0a473bb1c..d04a6ea82f824c7b2d05dca8232399156d1ab214 100755 --- a/scripts/Eye.py +++ b/scripts/Eye.py @@ -12,7 +12,7 @@ import rospy class Eye: def __init__(self): - self.robot_gender = rospy.get_param("/robot_gender") + self.robot_gender = rospy.get_param("/gender") self.eyes = Image.open("data/"+self.robot_gender+"/baxter_eye.png") # eye image self.positionX = 0 # keeps the x position as a coordinate self.positionY = 0 # keeps the y position as a coordinate diff --git a/scripts/Eye.pyc b/scripts/Eye.pyc index ff6a2a6488b43c93e1fdc6c978d5acff8a6751ed..61fdeb054230c96e155d550d7e33e0e27dbdd963 100644 Binary files a/scripts/Eye.pyc and b/scripts/Eye.pyc differ diff --git a/scripts/Eyebrow.py b/scripts/Eyebrow.py index cd7b2b69e7d7657567ad8fb677b230557c72461d..f7f1e5a92dbfacac71eb866684b8e56c4b6b1863 100755 --- a/scripts/Eyebrow.py +++ b/scripts/Eyebrow.py @@ -13,7 +13,7 @@ class Eyebrow: indexOfEyebrow = 0 # choosen element of the array def __init__(self, initEyebrow): - self.robot_gender = rospy.get_param("/robot_gender") + self.robot_gender = rospy.get_param("/gender") # This array keeps the diffirent shape of eyebrow self.eyebrows = [ Image.open("data/"+self.robot_gender+"/eyebrow/baxter_eyebrow_0.png"), diff --git a/scripts/Eyebrow.pyc b/scripts/Eyebrow.pyc index 7f26fede1df2a0449bf57e952549f41022d24c6d..dcb617e7661fcdbeead82aaaaded00e01af862bd 100644 Binary files a/scripts/Eyebrow.pyc and b/scripts/Eyebrow.pyc differ diff --git a/scripts/Eyelid.py b/scripts/Eyelid.py index e96eb830623b21d2c516f4d0a5566c27b607c82e..ec601ccc001aec01e4e0cc76443a56d8f1ca8394 100755 --- a/scripts/Eyelid.py +++ b/scripts/Eyelid.py @@ -11,7 +11,7 @@ import rospy class Eyelid: def __init__(self): - self.robot_gender = rospy.get_param("/robot_gender") + self.robot_gender = rospy.get_param("/gender") self.eyelid = Image.open("data/"+self.robot_gender+"/baxter_eyelid.png") # eyelid image self.position = 0 # y position, we don't need x position because of vertical movment. diff --git a/scripts/Eyelid.pyc b/scripts/Eyelid.pyc index 5114c50444f883c8456520e7c7e28a5cdf74d3c6..00fb3ffe82729dc21326efd11679135b63162fb4 100644 Binary files a/scripts/Eyelid.pyc and b/scripts/Eyelid.pyc differ diff --git a/scripts/Face.py b/scripts/Face.py index 455e7bc649b90e0c5072e4d16906dcb9ac70e344..3bb4ad01e8870ff67171f798f4feafbc8d4ab870 100755 --- a/scripts/Face.py +++ b/scripts/Face.py @@ -54,7 +54,7 @@ import rospy class Face: def __init__(self): - self.robot_gender = rospy.get_param("/robot_gender") + self.robot_gender = rospy.get_param("/gender") # determine the path and set the default path place os.chdir(r'/home/{}/pal/cognitive_game_ws/src/robot_facial_expression/scripts'.format(getpass.getuser())) @@ -219,7 +219,7 @@ class Face: self.winkMove(cv2, -330, 0.3, publish) # Eyelids are not seen. self.skin.setSkin(2) mouthIndex = 4#random.choice(mouthArray) - eyebrowIndex = random.choice(eyeBrowArray) + eyebrowIndex = 0#random.choice(eyeBrowArray) self.showEmotion(mouthIndex, eyebrowIndex, cv2, publish) def emotion_neutral(self, cv2, publish): @@ -253,7 +253,7 @@ class Face: eyeBrowArray = [4] self.winkMove(cv2, -330, 0.3, publish) # Eyelids are not seen. self.skin.setSkin(1) - mouthIndex = random.choice(mouthArray) + mouthIndex = 3#random.choice(mouthArray) eyebrowIndex = random.choice(eyeBrowArray) self.showEmotion(mouthIndex, eyebrowIndex, cv2, publish) diff --git a/scripts/Face.pyc b/scripts/Face.pyc index fc9db794fbbe5b61f8c9eddbb6f3310497da69d6..3d477a427e483241ba5c53f2aba7848ee01072d3 100644 Binary files a/scripts/Face.pyc and b/scripts/Face.pyc differ diff --git a/scripts/Mouth.py b/scripts/Mouth.py index f28bb5edd0bf022b62c50ddd039591565175da20..e0ecf68e2910d92587bc26e48cd7cc56a4649677 100755 --- a/scripts/Mouth.py +++ b/scripts/Mouth.py @@ -13,16 +13,16 @@ class Mouth: indexOfMouth = 0 # choosen element of the array def __init__(self, initMouth): - self.robot_gender = rospy.get_param("/robot_gender") + self.robot_gender = rospy.get_param("/gender") # This array keeps the diffirent shape of mouth self.mouths = [ Image.open("data/"+self.robot_gender+"/mouth/baxter_mouth_angry.png"), - Image.open("data/"+self.robot_gender+"/mouth/baxter_mouth_boring_1.png"), + Image.open("data/"+self.robot_gender+"/mouth/baxter_mouth_boring.png"), Image.open("data/"+self.robot_gender+"/mouth/baxter_mouth_confused.png"), - Image.open("data/"+self.robot_gender+"/mouth/baxter_mouth_sad_1.png"), - Image.open("data/"+self.robot_gender+"/mouth/baxter_mouth_smile_open_1.png"), - Image.open("data/"+self.robot_gender+"/mouth/baxter_mouth_neutral_1.png") + Image.open("data/"+self.robot_gender+"/mouth/baxter_mouth_sad.png"), + Image.open("data/"+self.robot_gender+"/mouth/baxter_mouth_smile_open.png"), + Image.open("data/"+self.robot_gender+"/mouth/baxter_mouth_neutral.png") #Image.open("data/mouth/baxter_mouth_smile_open.png") ] diff --git a/scripts/Mouth.pyc b/scripts/Mouth.pyc index 8ef1899040974bc4381a1937119d70aa08651599..1e41997307f79ba77ab069bf33a5130bab39d7cf 100644 Binary files a/scripts/Mouth.pyc and b/scripts/Mouth.pyc differ diff --git a/scripts/Skin.py b/scripts/Skin.py index 74375c14aecac51f1976ee3234bd16692f8a9e4d..258cba91bdf76ebdf67afc27cfc992fc43a64260 100755 --- a/scripts/Skin.py +++ b/scripts/Skin.py @@ -13,7 +13,7 @@ class Skin: indexOfSkin = 5 # choosen element of the array def __init__(self, initSkin): - self.robot_gender = rospy.get_param("/robot_gender") + self.robot_gender = rospy.get_param("/gender") # This array keeps the diffirent colour version of skin self.skins = [ diff --git a/scripts/Skin.pyc b/scripts/Skin.pyc index a52dd11f2a200eb017f11932bacaf5c5e5a4522f..dab675d1ad92b6450d6c9617e4a6d35f9a2c0d32 100644 Binary files a/scripts/Skin.pyc and b/scripts/Skin.pyc differ diff --git a/scripts/data/female/baxter_eye.png b/scripts/data/female/baxter_eye.png index 151f6f1e27e21aa98c29a37083c0903ce7e273e4..b9fb54058e01492b7533da38a187c586578bd680 100644 Binary files a/scripts/data/female/baxter_eye.png and b/scripts/data/female/baxter_eye.png differ diff --git a/scripts/data/female/eyebrow/baxter_eyebrow_0.png b/scripts/data/female/eyebrow/baxter_eyebrow_0.png index e6cb9a77bdf5a5515eccb25d874b9b488817a1ab..8459cbf00b967da9febac0307f74e3c46324da56 100644 Binary files a/scripts/data/female/eyebrow/baxter_eyebrow_0.png and b/scripts/data/female/eyebrow/baxter_eyebrow_0.png differ diff --git a/scripts/data/female/eyebrow/baxter_eyebrow_1.png b/scripts/data/female/eyebrow/baxter_eyebrow_1.png index b6b789d5466eafd5e9485c402d20e70dab61a4fb..f1bb93ea3a036cfc4a57528ec713fbb964181c3c 100644 Binary files a/scripts/data/female/eyebrow/baxter_eyebrow_1.png and b/scripts/data/female/eyebrow/baxter_eyebrow_1.png differ diff --git a/scripts/data/female/eyebrow/baxter_eyebrow_2.png b/scripts/data/female/eyebrow/baxter_eyebrow_2.png index a2413e899c147e49f30bf9930ad6b7408f837686..a15a559f467e03d445c6edf04ba7a1d47b6c1486 100644 Binary files a/scripts/data/female/eyebrow/baxter_eyebrow_2.png and b/scripts/data/female/eyebrow/baxter_eyebrow_2.png differ diff --git a/scripts/data/female/eyebrow/baxter_eyebrow_4.png b/scripts/data/female/eyebrow/baxter_eyebrow_4.png index 160297d10e46637f6fb0beeeba431cab9abf61cd..f1bb93ea3a036cfc4a57528ec713fbb964181c3c 100644 Binary files a/scripts/data/female/eyebrow/baxter_eyebrow_4.png and b/scripts/data/female/eyebrow/baxter_eyebrow_4.png differ diff --git a/scripts/data/female/mouth/baxter_mouth_boring.png b/scripts/data/female/mouth/baxter_mouth_boring.png index 0f443bb0ba4e6c08eb5acae0dd0d7b58971f91c9..6048759713db47020cb315592d961a946c198aac 100644 Binary files a/scripts/data/female/mouth/baxter_mouth_boring.png and b/scripts/data/female/mouth/baxter_mouth_boring.png differ diff --git a/scripts/data/female/mouth/baxter_mouth_neutral.png b/scripts/data/female/mouth/baxter_mouth_neutral.png new file mode 100644 index 0000000000000000000000000000000000000000..95b0ec449fbede5350bb4b4a9d3440f5d4c1e81b Binary files /dev/null and b/scripts/data/female/mouth/baxter_mouth_neutral.png differ diff --git a/scripts/data/female/mouth/baxter_mouth_sad.png b/scripts/data/female/mouth/baxter_mouth_sad.png index 6dce973de3d1d5103b77e490a0e9033bd492e274..7c818109125000477506f756e862a1976826134f 100644 Binary files a/scripts/data/female/mouth/baxter_mouth_sad.png and b/scripts/data/female/mouth/baxter_mouth_sad.png differ diff --git a/scripts/data/female/mouth/baxter_mouth_smile_open.png b/scripts/data/female/mouth/baxter_mouth_smile_open.png index bbd862d2ea733f565b444faa597502e3a6233734..ae590f930543c4163bb1dc11b9abe3d96ba87f09 100644 Binary files a/scripts/data/female/mouth/baxter_mouth_smile_open.png and b/scripts/data/female/mouth/baxter_mouth_smile_open.png differ diff --git a/scripts/data/female/skin/baxter_skin_0_1.png b/scripts/data/female/skin/baxter_skin_0_1.png new file mode 100644 index 0000000000000000000000000000000000000000..a4e339b69c45694c1de59f60450bd05fed498af6 Binary files /dev/null and b/scripts/data/female/skin/baxter_skin_0_1.png differ diff --git a/scripts/data/male/baxter_eye.png b/scripts/data/male/baxter_eye.png index 3dcb6f368d4da697fe310b1169aa5fc050d49b00..bb22a9495e9ccd9459b3309026a74ee1a39724cc 100644 Binary files a/scripts/data/male/baxter_eye.png and b/scripts/data/male/baxter_eye.png differ diff --git a/scripts/data/male/baxter_eyelid_1.png b/scripts/data/male/baxter_eyelid_1.png new file mode 100644 index 0000000000000000000000000000000000000000..6870c72211d1586527f2e21024e987921ebe8d90 Binary files /dev/null and b/scripts/data/male/baxter_eyelid_1.png differ diff --git a/scripts/data/male/eyebrow/baxter_eyebrow_0.png b/scripts/data/male/eyebrow/baxter_eyebrow_0.png index 82cd3564cae6135bd294982164e3c3ad250bb03a..eb83ffde12aa8b6c40a7512e1afca9cb30b4fc52 100644 Binary files a/scripts/data/male/eyebrow/baxter_eyebrow_0.png and b/scripts/data/male/eyebrow/baxter_eyebrow_0.png differ diff --git a/scripts/data/male/eyebrow/baxter_eyebrow_1.png b/scripts/data/male/eyebrow/baxter_eyebrow_1.png index 0d54811bfaca1487ae87651fa173358c6175f0a2..bf966110a64a06ffbf71f65bd2a19e1b8f4af6a7 100644 Binary files a/scripts/data/male/eyebrow/baxter_eyebrow_1.png and b/scripts/data/male/eyebrow/baxter_eyebrow_1.png differ diff --git a/scripts/data/male/eyebrow/baxter_eyebrow_2.png b/scripts/data/male/eyebrow/baxter_eyebrow_2.png index a2413e899c147e49f30bf9930ad6b7408f837686..f1de4ccc3385a83d365442aef5df08f9366a2933 100644 Binary files a/scripts/data/male/eyebrow/baxter_eyebrow_2.png and b/scripts/data/male/eyebrow/baxter_eyebrow_2.png differ diff --git a/scripts/data/male/eyebrow/baxter_eyebrow_3.png b/scripts/data/male/eyebrow/baxter_eyebrow_3.png index 94df4145e4aae0a6867dc110d01c98bcc8fba3d1..eb83ffde12aa8b6c40a7512e1afca9cb30b4fc52 100644 Binary files a/scripts/data/male/eyebrow/baxter_eyebrow_3.png and b/scripts/data/male/eyebrow/baxter_eyebrow_3.png differ diff --git a/scripts/data/male/eyebrow/baxter_eyebrow_4.png b/scripts/data/male/eyebrow/baxter_eyebrow_4.png index 6c1b6be28a00df531894de232ea2706c564f917a..bf966110a64a06ffbf71f65bd2a19e1b8f4af6a7 100644 Binary files a/scripts/data/male/eyebrow/baxter_eyebrow_4.png and b/scripts/data/male/eyebrow/baxter_eyebrow_4.png differ diff --git a/scripts/data/male/eyebrow/old/baxter_eyebrow_0.png b/scripts/data/male/eyebrow/old/baxter_eyebrow_0.png new file mode 100644 index 0000000000000000000000000000000000000000..82cd3564cae6135bd294982164e3c3ad250bb03a Binary files /dev/null and b/scripts/data/male/eyebrow/old/baxter_eyebrow_0.png differ diff --git a/scripts/data/male/eyebrow/old/baxter_eyebrow_1.png b/scripts/data/male/eyebrow/old/baxter_eyebrow_1.png new file mode 100644 index 0000000000000000000000000000000000000000..0d54811bfaca1487ae87651fa173358c6175f0a2 Binary files /dev/null and b/scripts/data/male/eyebrow/old/baxter_eyebrow_1.png differ diff --git a/scripts/data/male/eyebrow/old/baxter_eyebrow_2.png b/scripts/data/male/eyebrow/old/baxter_eyebrow_2.png new file mode 100644 index 0000000000000000000000000000000000000000..a2413e899c147e49f30bf9930ad6b7408f837686 Binary files /dev/null and b/scripts/data/male/eyebrow/old/baxter_eyebrow_2.png differ diff --git a/scripts/data/male/eyebrow/old/baxter_eyebrow_3.png b/scripts/data/male/eyebrow/old/baxter_eyebrow_3.png new file mode 100644 index 0000000000000000000000000000000000000000..94df4145e4aae0a6867dc110d01c98bcc8fba3d1 Binary files /dev/null and b/scripts/data/male/eyebrow/old/baxter_eyebrow_3.png differ diff --git a/scripts/data/male/eyebrow/old/baxter_eyebrow_4.png b/scripts/data/male/eyebrow/old/baxter_eyebrow_4.png new file mode 100644 index 0000000000000000000000000000000000000000..6c1b6be28a00df531894de232ea2706c564f917a Binary files /dev/null and b/scripts/data/male/eyebrow/old/baxter_eyebrow_4.png differ diff --git a/scripts/data/male/mouth/baxter_mouth_boring.png b/scripts/data/male/mouth/baxter_mouth_boring.png index 0f443bb0ba4e6c08eb5acae0dd0d7b58971f91c9..380bec74099e7039bffbbec3c79194bf3c76640f 100644 Binary files a/scripts/data/male/mouth/baxter_mouth_boring.png and b/scripts/data/male/mouth/baxter_mouth_boring.png differ diff --git a/scripts/data/male/mouth/baxter_mouth_neutral.png b/scripts/data/male/mouth/baxter_mouth_neutral.png index a7aca64a15df18d322a0fed46f50881789357576..afe59958375997dbde8622bef0fac5439ac9a82b 100644 Binary files a/scripts/data/male/mouth/baxter_mouth_neutral.png and b/scripts/data/male/mouth/baxter_mouth_neutral.png differ diff --git a/scripts/data/male/mouth/baxter_mouth_sad.png b/scripts/data/male/mouth/baxter_mouth_sad.png index 6dce973de3d1d5103b77e490a0e9033bd492e274..3c1aff61f1b45fb8c09d0943ac4f2d683f1fcc77 100644 Binary files a/scripts/data/male/mouth/baxter_mouth_sad.png and b/scripts/data/male/mouth/baxter_mouth_sad.png differ diff --git a/scripts/data/male/mouth/baxter_mouth_smile_open.png b/scripts/data/male/mouth/baxter_mouth_smile_open.png index bbd862d2ea733f565b444faa597502e3a6233734..98ce3399a2722c6ca33943051a476217ed4ed2a6 100644 Binary files a/scripts/data/male/mouth/baxter_mouth_smile_open.png and b/scripts/data/male/mouth/baxter_mouth_smile_open.png differ diff --git a/scripts/data/male/old/baxter_eye.png b/scripts/data/male/old/baxter_eye.png new file mode 100644 index 0000000000000000000000000000000000000000..3dcb6f368d4da697fe310b1169aa5fc050d49b00 Binary files /dev/null and b/scripts/data/male/old/baxter_eye.png differ diff --git a/scripts/data/male/old/baxter_eye_1.png b/scripts/data/male/old/baxter_eye_1.png new file mode 100644 index 0000000000000000000000000000000000000000..c05af149c3f4feaa85a646b64f79036a97df426a Binary files /dev/null and b/scripts/data/male/old/baxter_eye_1.png differ diff --git a/scripts/data/male/baxter_eye_2.png b/scripts/data/male/old/baxter_eye_2.png similarity index 100% rename from scripts/data/male/baxter_eye_2.png rename to scripts/data/male/old/baxter_eye_2.png diff --git a/scripts/data/male/skin/baxter_skin_0_1.png b/scripts/data/male/skin/baxter_skin_0_1.png index f4946e8572e67ee672cf0ba1a73787b55146a5f2..a08d8e7d31bcff9b9ff34955d5f1c6a4205f15c1 100644 Binary files a/scripts/data/male/skin/baxter_skin_0_1.png and b/scripts/data/male/skin/baxter_skin_0_1.png differ diff --git a/scripts/data/male/skin/baxter_skin_0_1_2.png b/scripts/data/male/skin/baxter_skin_0_1_2.png new file mode 100644 index 0000000000000000000000000000000000000000..288f975ad11ce744107aab87de0d2f845b828ed7 Binary files /dev/null and b/scripts/data/male/skin/baxter_skin_0_1_2.png differ diff --git a/scripts/data/male/skin/baxter_skin_0_1_4.png b/scripts/data/male/skin/baxter_skin_0_1_4.png new file mode 100644 index 0000000000000000000000000000000000000000..f4946e8572e67ee672cf0ba1a73787b55146a5f2 Binary files /dev/null and b/scripts/data/male/skin/baxter_skin_0_1_4.png differ diff --git a/scripts/data/male/skin/baxter_skin_0_1_6.png b/scripts/data/male/skin/baxter_skin_0_1_6.png new file mode 100644 index 0000000000000000000000000000000000000000..e479a200a624f1cdf6f2e16436d7e0c3a8ddd8d2 Binary files /dev/null and b/scripts/data/male/skin/baxter_skin_0_1_6.png differ