Skip to content
Snippets Groups Projects
Commit bbd316f8 authored by pal's avatar pal
Browse files

code refactoring

parent 77ace59c
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python #!/usr/bin/env python
''' '''
@Author: Bilgehan NAL @Author: Antonio Andriella
This file has a class which defines the shape and movment of the baxter's eyes. This file has a class which defines the shape and movement of the Tiago's eyes.
Credits to Bilgehan NAL
''' '''
from PIL import Image from PIL import Image
...@@ -11,8 +12,9 @@ import rospy ...@@ -11,8 +12,9 @@ import rospy
class Eye: class Eye:
def __init__(self, file): def __init__(self, folder_path):
self.eyes = Image.open(file) # eye image
self.eyes = Image.open(folder_path+"pupil.png") # eye image
self.positionX = 0 # keeps the x position as a coordinate self.positionX = 0 # keeps the x position as a coordinate
self.positionY = 0 # keeps the y position as a coordinate self.positionY = 0 # keeps the y position as a coordinate
......
#!/usr/bin/env python #!/usr/bin/env python
""" """
@Author: Bilgehan NAL @Author: Antonio Andriella
This file has a class which defines the skin of the baxter's face. This file has a class which defines the skin of the baxter's face.
Credits to Bilgehan NAL
""" """
from PIL import Image from PIL import Image
...@@ -10,19 +11,13 @@ import rospy ...@@ -10,19 +11,13 @@ import rospy
class Skin: class Skin:
indexOfSkin = 5 # choosen element of the array indexOfSkin = 1 # choosen element of the array
def __init__(self, initSkin): def __init__(self, folder_path, initSkin):
# This array keeps the diffirent colour version of skin # This array keeps the diffirent colour version of skin
self.skins = [ self.skins = [
Image.open("test/skin.png"), Image.open(folder_path+"skin.png")
Image.open("test/skin.png"),
Image.open("test/skin.png"),
Image.open("test/skin.png"),
Image.open("test/skin.png"),
Image.open("test/skin.png")
] ]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment