Source Code

Histogram.py

  1. import cv2
  2. import pandas as pd
  3. import random
  4. import numpy as np
  5. import sys
  6. import math
  7. import matplotlib.pyplot as plt
  8. #used for making a histogram to display where cozmo thinks he is
  9. def makeHistogram():
  10. df = pd.read_csv("/Accounts/turing/students/s19/ainsma01/AnkiCozmo/FinalProject/data.csv")
  11. pano = cv2.imread("/Accounts/turing/students/s19/ainsma01/AnkiCozmo/FinalProject/Panorama.jpeg")
  12. dimensions = pano.shape
  13. width = dimensions[1]
  14. a = df['X']
  15. fig = plt.hist(a,range = [0,width], bins = width)
  16. plt.title('Robot')
  17. plt.savefig("hist.png")
  18. makeHistogram()
import cv2
import pandas as pd
import random
import numpy as np
import sys
import math
import matplotlib.pyplot as plt

#used for making a histogram to display where cozmo thinks he is
def makeHistogram():
	
	df = pd.read_csv("/Accounts/turing/students/s19/ainsma01/AnkiCozmo/FinalProject/data.csv")
	pano = cv2.imread("/Accounts/turing/students/s19/ainsma01/AnkiCozmo/FinalProject/Panorama.jpeg")

	dimensions = pano.shape
	width = dimensions[1]

	a = df['X']
	
	fig = plt.hist(a,range = [0,width], bins = width)
	plt.title('Robot')
	plt.savefig("hist.png")

makeHistogram()

MotionUpdate.py

  1. #This class updates our data for when we move the cozmo to make a new picture to compare to the panorama
  2. import cv2
  3. import pandas as pd
  4. import random
  5. import numpy as np
  6. import sys
  7. import math
  8. def motionUpdate():
  9. #reads in the panorama and the data
  10. data = pd.read_csv("/Accounts/turing/students/s19/ainsma01/AnkiCozmo/FinalProject/data.csv")
  11. pano = cv2.imread("/Accounts/turing/students/s19/ainsma01/AnkiCozmo/FinalProject/Panorama.jpeg")
  12. dimensions = pano.shape
  13. width = dimensions[1]
  14. #gives a rough estamite of how many pixels to the right we are moving in the panorama image
  15. toAdd = math.floor(width / 360)
  16. data['X'] = data['X'].apply(lambda x: x + (5 * toAdd))
  17. #data['X'] = data['X'] + (10 * toAdd)
  18. data.loc[data.X > (width - 320), 'X'] = random.randint(1, width - 330)
  19. data.to_csv("/Accounts/turing/students/s19/ainsma01/AnkiCozmo/FinalProject/data.csv", index = False)
#This class updates our data for when we move the cozmo to make a new picture to compare to the panorama
import cv2
import pandas as pd
import random
import numpy as np
import sys
import math

def motionUpdate():
	#reads in the panorama and the data
	data = pd.read_csv("/Accounts/turing/students/s19/ainsma01/AnkiCozmo/FinalProject/data.csv")
	pano = cv2.imread("/Accounts/turing/students/s19/ainsma01/AnkiCozmo/FinalProject/Panorama.jpeg")

	dimensions = pano.shape
	width = dimensions[1]
	
	#gives a rough estamite of how many pixels to the right we are moving in the panorama image
	toAdd = math.floor(width / 360)
	data['X'] = data['X'].apply(lambda x: x + (5 * toAdd))
	#data['X'] = data['X'] + (10 * toAdd)
	data.loc[data.X > (width - 320), 'X'] = random.randint(1, width - 330)	
	data.to_csv("/Accounts/turing/students/s19/ainsma01/AnkiCozmo/FinalProject/data.csv", index = False)

PictureTaking.py

  1. #!/usr/bin/env python3
  2. # Copyright (c) 2016 Anki, Inc.
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License in the file LICENSE.txt or at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. '''Hello World
  16. Make Cozmo say 'Hello World' in this simple Cozmo SDK example program.
  17. '''
  18. #implementation of montecarlo locolization
  19. from PIL import Image
  20. import cozmo
  21. import cv2
  22. from cozmo.util import degrees, distance_mm, speed_mmps
  23. import Stitching
  24. import random
  25. import Localize
  26. import MotionUpdate
  27. import Histogram
  28. #spins the cozmo 360 degrees to get a panorama image of its current environment
  29. def cozmo_program(robot: cozmo.robot.Robot):
  30. robot.say_text("Okay Here we goooooooo").wait_for_completed()
  31. move_arms = robot.set_lift_height(0)
  32. move_arms.wait_for_completed()
  33. set_head = robot.set_head_angle((cozmo.robot.MAX_HEAD_ANGLE) / 3, in_parallel = True)
  34. set_head.wait_for_completed()
  35. #Enabling Cozmo Camera
  36. robot.camera.image_stream_enabled = True
  37. degree = 0
  38. while(degree < 360) :
  39. fileName = "/Accounts/turing/students/s19/ainsma01/AnkiCozmo/FinalProject/Cozmopics/takingpics" + str(degree)
  40. robot.turn_in_place(degrees(10)).wait_for_completed()
  41. latest_image = robot.world.latest_image
  42. annotated = latest_image.annotate_image()
  43. if latest_image is not None:
  44. print("image = %s" % latest_image)
  45. converted = annotated.convert()
  46. converted.save(fileName, "JPEG", resolution=10)
  47. degree += 10
  48. #turns the robot a random amount simulating a kidnapping robot problem
  49. def randomTurn(robot: cozmo.robot.Robot):
  50. #Enabling Cozmo Camera
  51. robot.camera.image_stream_enabled = True
  52. #rotate a random degree
  53. deg = random.randint(0, 60)
  54. robot.turn_in_place(degrees(deg + 20)).wait_for_completed()
  55. #take a picture and write it out
  56. latest_image = robot.world.latest_image
  57. annotated = latest_image.annotate_image()
  58. if latest_image is not None:
  59. converted = annotated.convert()
  60. converted.save("latestImage", "JPEG", resolution=10)
  61. robot.say_text("Oh Noooooooo they kidnapped me").wait_for_completed()
  62. return deg
  63. def madeItHome(robot: cozmo.robot.Robot):
  64. robot.say_text("Im hoooooooome").wait_for_completed()
  65. #rotates the robot in 5 degree intervals as it gathers data to try and localize
  66. def rotato(robot: cozmo.robot.Robot):
  67. #Enabling Cozmo Camera
  68. robot.camera.image_stream_enabled = True
  69. #rotate a random degree
  70. robot.turn_in_place(degrees(5 * - 1)).wait_for_completed()
  71. #take a picture and write it out
  72. latest_image = robot.world.latest_image
  73. annotated = latest_image.annotate_image()
  74. if latest_image is not None:
  75. converted = annotated.convert()
  76. converted.save("latestImage", "JPEG", resolution=10)
  77. #initial set up for the panorama
  78. cozmo.run_program(cozmo_program)
  79. #runs the stitching alrgorithm
  80. Stitching.run()
  81. #turns the cozmo a random direction
  82. degree = cozmo.run_program(randomTurn)
  83. #calls the initial localizing algorithm
  84. Localize.localize()
  85. #runs the algorithm until it believes it is localized
  86. for i in range (25):
  87. cozmo.run_program(rotato)
  88. MotionUpdate.motionUpdate()
  89. Localize.localize2()
  90. Histogram.makeHistogram()
  91. cozmo.run_program(madeItHome)
#!/usr/bin/env python3

# Copyright (c) 2016 Anki, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License in the file LICENSE.txt or at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

'''Hello World

Make Cozmo say 'Hello World' in this simple Cozmo SDK example program.
'''
#implementation of montecarlo locolization
from PIL import Image
import cozmo
import cv2
from cozmo.util import degrees, distance_mm, speed_mmps
import Stitching
import random
import Localize
import MotionUpdate
import Histogram

#spins the cozmo 360 degrees to get a panorama image of its current environment
def cozmo_program(robot: cozmo.robot.Robot):

	robot.say_text("Okay Here we goooooooo").wait_for_completed()

	move_arms = robot.set_lift_height(0)
	move_arms.wait_for_completed()

	set_head = robot.set_head_angle((cozmo.robot.MAX_HEAD_ANGLE) / 3, in_parallel = True)
	set_head.wait_for_completed()

   	#Enabling Cozmo Camera
	robot.camera.image_stream_enabled = True
	
	degree = 0
	
	
	while(degree < 360) :
		fileName = "/Accounts/turing/students/s19/ainsma01/AnkiCozmo/FinalProject/Cozmopics/takingpics" + str(degree)
 
		robot.turn_in_place(degrees(10)).wait_for_completed()
		

		latest_image = robot.world.latest_image
		annotated = latest_image.annotate_image()

		if latest_image is not None:
			print("image = %s" % latest_image)

			converted = annotated.convert()
			converted.save(fileName, "JPEG", resolution=10)


		degree += 10

		
#turns the robot a random amount simulating a kidnapping robot problem
def randomTurn(robot: cozmo.robot.Robot):


	#Enabling Cozmo Camera
	robot.camera.image_stream_enabled = True

	#rotate a random degree
	deg = random.randint(0, 60)	
	robot.turn_in_place(degrees(deg + 20)).wait_for_completed()
		
	#take a picture and write it out
	latest_image = robot.world.latest_image
	annotated = latest_image.annotate_image()

	if latest_image is not None:
		converted = annotated.convert()
		converted.save("latestImage", "JPEG", resolution=10)

	robot.say_text("Oh Noooooooo they kidnapped me").wait_for_completed()

	return deg

def madeItHome(robot: cozmo.robot.Robot):
	robot.say_text("Im hoooooooome").wait_for_completed()

#rotates the robot in 5 degree intervals as it gathers data to try and localize
def rotato(robot: cozmo.robot.Robot):

	#Enabling Cozmo Camera
	robot.camera.image_stream_enabled = True

	#rotate a random degree
	robot.turn_in_place(degrees(5 * - 1)).wait_for_completed()
		
	#take a picture and write it out
	latest_image = robot.world.latest_image
	annotated = latest_image.annotate_image()

	if latest_image is not None:
		converted = annotated.convert()
		converted.save("latestImage", "JPEG", resolution=10)

#initial set up for the panorama
cozmo.run_program(cozmo_program)

#runs the stitching alrgorithm 
Stitching.run()

#turns the cozmo a random direction
degree = cozmo.run_program(randomTurn)

#calls the initial localizing algorithm
Localize.localize()

#runs the algorithm until it believes it is localized
for i in range (25):
	cozmo.run_program(rotato)
	MotionUpdate.motionUpdate()
	Localize.localize2()

Histogram.makeHistogram()
cozmo.run_program(madeItHome)

Stitching.py

  1. #code needed to stitch images together
  2. import cv2
  3. def run():
  4. images = []
  5. for i in range(36):
  6. images.append(cv2.imread('/Accounts/turing/students/s19/ainsma01/AnkiCozmo/FinalProject/Cozmopics/takingpics' + str((i * 10))))
  7. stitcher = cv2.Stitcher.create()
  8. ret,pano = stitcher.stitch(images)
  9. cv2.imwrite('Panorama.jpeg',pano)
#code needed to stitch images together 
import cv2

def run():
	images = []
	for i in range(36):
		images.append(cv2.imread('/Accounts/turing/students/s19/ainsma01/AnkiCozmo/FinalProject/Cozmopics/takingpics' + str((i * 10))))   		

	stitcher = cv2.Stitcher.create()
	ret,pano = stitcher.stitch(images)
	cv2.imwrite('Panorama.jpeg',pano)

Localize.py

  1. import cv2
  2. import pandas as pd
  3. import random
  4. import numpy as np
  5. import sys
  6. import MotionUpdate
  7. #computes the mse value used for comparing images
  8. def mse(imageA, imageB):
  9. # the 'Mean Squared Error' between the two images is the
  10. # sum of the squared difference between the two images;
  11. # NOTE: the two images must have the same dimension
  12. err = np.sum((imageA.astype("float") - imageB.astype("float")) ** 2)
  13. err /= float(imageA.shape[0] * imageA.shape[1])
  14. # return the MSE, the lower the error, the more "similar"
  15. # the two images are
  16. return err
  17. #compares the two images
  18. def compare_images(imageA, imageB):
  19. # compute the mean squared error and structural similarity
  20. # index for the images
  21. m = mse(imageA, imageB)
  22. #s = ssim(imageA, imageB)
  23. # setup the figure
  24. #print("MSE: %.2f" % (m))
  25. return m
  26. #the initial localization that generates a normal distribution of random hypothesis
  27. #and then resamples over the hyptohtesis based on the comparison to the first image from the cozmo
  28. def localize():
  29. pano = cv2.imread("/Accounts/turing/students/s19/ainsma01/AnkiCozmo/FinalProject/Panorama.jpeg")
  30. dimensions = pano.shape
  31. width = dimensions[1]
  32. height = dimensions[0]
  33. height = min(240, height)
  34. #generate the random points
  35. randomPoints = []
  36. numPics = 1000
  37. for i in range(numPics):
  38. # When generating pictures we subtract 320 so that
  39. # the program does not go out of bounds when
  40. # selecting from panorama
  41. current = random.randint(1, width - 320)
  42. randomPoints.append(current)
  43. pointFrame = pd.DataFrame(randomPoints, columns=['X'])
  44. #get the pictures at those points
  45. randomPictures = []
  46. for randomPoint in randomPoints:
  47. randomPictures.append(pano[0:height, randomPoint:randomPoint+320])
  48. #grab the latest image from the cozmo and calculate the mse values
  49. homePic = cv2.imread("/Accounts/turing/students/s19/ainsma01/AnkiCozmo/FinalProject/latestImage")
  50. homePic = homePic[0:height, 0:320]
  51. MSEList = []
  52. for i in range(numPics):
  53. MSEList.append(compare_images(homePic, randomPictures[i]))
  54. df = pd.DataFrame(MSEList, columns = ['MSE'])
  55. df = df.join(pointFrame)
  56. #Get the sum of the values
  57. MSESum = sum(df['MSE'])
  58. #invert values
  59. df['normalizedMSE'] = (df['MSE']/MSESum)
  60. df['invertedMSE'] = (1/df['normalizedMSE'])
  61. #Normalize the values
  62. newSum = sum(df['invertedMSE'])
  63. df['newProbs'] = (df['invertedMSE']/newSum)
  64. #if we pick the exact same picture, make its probability 1
  65. df = df.fillna(1)
  66. #renormalize in case we filled a NaN with 1
  67. probSum = sum(df['newProbs'])
  68. df['newProbs'] = (df['newProbs']/probSum)
  69. #remove unnnecessary information
  70. df = df.drop(columns=['normalizedMSE','invertedMSE'])
  71. #select new values according to the probabilities
  72. df['X'] = np.random.choice(df['X'], numPics, p=df['newProbs'])
  73. #randomize new x values
  74. df['X'] = df['X'].map(lambda x: abs(random.randint(x - 10, x + 10)))
  75. df.loc[df.X < 0, 'X'] = random.randint(1, width - 330)
  76. df.loc[df.X > width - 350, 'X'] = random.randint(1, width - 350)
  77. df = df.sort_values(by=['newProbs'], ascending=False)
  78. df.to_csv("/Accounts/turing/students/s19/ainsma01/AnkiCozmo/FinalProject/data.csv", index = False)
  79. #used for iterations after the initial stage to update our hypothesis based on the previous motions of the cozmo
  80. #and then resample again
  81. def localize2():
  82. data = pd.read_csv("/Accounts/turing/students/s19/ainsma01/AnkiCozmo/FinalProject/data.csv")
  83. data['X'] = data['X'].map(lambda x: abs(x))
  84. pano = cv2.imread("/Accounts/turing/students/s19/ainsma01/AnkiCozmo/FinalProject/Panorama.jpeg")
  85. dimensions = pano.shape
  86. width = dimensions[1]
  87. height = dimensions[0]
  88. height = min(240, height)
  89. #load in current pics
  90. currentPics = []
  91. cur = 0
  92. xValues = data['X'].tolist()
  93. for point in xValues:
  94. currentPics.append(pano[0:height, point:point+320])
  95. #print(width - (point + 320))
  96. #print(cur)
  97. #cur = cur + 1
  98. #print(pano[0:height, point:point+320].shape[1])
  99. #grab the new mse values for the new points
  100. homePic = cv2.imread("/Accounts/turing/students/s19/ainsma01/AnkiCozmo/FinalProject/latestImage")
  101. homePic = homePic[0:height, 0:320]
  102. MSEList = []
  103. for i in range(len(currentPics)):
  104. MSEList.append(compare_images(homePic,currentPics[i]))
  105. data.drop(columns=['MSE'])
  106. data['MSE'] = MSEList
  107. #Get the sum of the values
  108. MSESum = sum(data['MSE'])
  109. #invert values
  110. data['normalizedMSE'] = (data['MSE']/MSESum)
  111. data['invertedMSE'] = (1/data['normalizedMSE'])
  112. #Normalize the values
  113. newSum = sum(data['invertedMSE'])
  114. data['newProbs'] = (data['invertedMSE']/newSum)
  115. #if we pick the exact same picture, make its probability 1
  116. data = data.fillna(1)
  117. #renormalize in case we filled a NaN with 1
  118. probSum = sum(data['newProbs'])
  119. data['newProbs'] = (data['newProbs']/probSum)
  120. #remove unnnecessary information
  121. data = data.drop(columns=['normalizedMSE','invertedMSE'])
  122. #select new values according to the probabilities
  123. data['X'] = np.random.choice(data['X'], len(currentPics), p=data['newProbs'])
  124. #randomize new x values
  125. #TODO: Implement into motion model, not done here
  126. data['X'] = data['X'].map(lambda x: abs(random.randint(x - 10, x + 10)))
  127. data.loc[data.X < 0, 'X'] = random.randint(1, width - 330)
  128. data.loc[data.X > width - 350, 'X'] = random.randint(1, width - 350)
  129. data = data.sort_values(by=['newProbs'], ascending=False)
  130. data.to_csv("/Accounts/turing/students/s19/ainsma01/AnkiCozmo/FinalProject/data.csv", index = False)
import cv2
import pandas as pd
import random
import numpy as np
import sys
import MotionUpdate

#computes the mse value used for comparing images
def mse(imageA, imageB):
	# the 'Mean Squared Error' between the two images is the
	# sum of the squared difference between the two images;
	# NOTE: the two images must have the same dimension
	err = np.sum((imageA.astype("float") - imageB.astype("float")) ** 2)
	err /= float(imageA.shape[0] * imageA.shape[1])
	
	# return the MSE, the lower the error, the more "similar"
	# the two images are
	return err

#compares the two images
def compare_images(imageA, imageB):
	# compute the mean squared error and structural similarity
	# index for the images
	m = mse(imageA, imageB)
	#s = ssim(imageA, imageB)
 
	# setup the figure
	
	#print("MSE: %.2f" % (m))
	return m
	

#the initial localization that generates a normal distribution of random hypothesis 
#and then resamples over the hyptohtesis based on the comparison to the first image from the cozmo
def localize():
	pano = cv2.imread("/Accounts/turing/students/s19/ainsma01/AnkiCozmo/FinalProject/Panorama.jpeg")

	dimensions = pano.shape
	width = dimensions[1]
	height = dimensions[0]

	height = min(240, height)
	
	#generate the random points
	randomPoints = []


	numPics = 1000
	for i in range(numPics):
# When generating pictures we subtract 320 so that 
# the program does not go out of bounds when 
# selecting from panorama
		current = random.randint(1, width - 320)
		randomPoints.append(current)

	pointFrame = pd.DataFrame(randomPoints, columns=['X'])
	#get the pictures at those points
	randomPictures = []

	for randomPoint in randomPoints:
		randomPictures.append(pano[0:height, randomPoint:randomPoint+320])
		
	#grab the latest image from the cozmo and calculate the mse values
	homePic = cv2.imread("/Accounts/turing/students/s19/ainsma01/AnkiCozmo/FinalProject/latestImage")
	homePic = homePic[0:height, 0:320]
	MSEList = []
	for i in range(numPics):
		MSEList.append(compare_images(homePic, randomPictures[i]))

	df = pd.DataFrame(MSEList, columns = ['MSE'])
	df = df.join(pointFrame)



	#Get the sum of the values
	MSESum = sum(df['MSE'])

	#invert values
	df['normalizedMSE'] = (df['MSE']/MSESum)
	df['invertedMSE'] = (1/df['normalizedMSE'])

	#Normalize the values
	newSum = sum(df['invertedMSE'])
	df['newProbs'] = (df['invertedMSE']/newSum)

	#if we pick the exact same picture, make its probability 1
	df = df.fillna(1)

	#renormalize in case we filled a NaN with 1
	probSum = sum(df['newProbs'])
	df['newProbs'] = (df['newProbs']/probSum)

	#remove unnnecessary information
	df = df.drop(columns=['normalizedMSE','invertedMSE'])

	#select new values according to the probabilities
	df['X'] = np.random.choice(df['X'], numPics, p=df['newProbs'])

	#randomize new x values
	df['X'] = df['X'].map(lambda x: abs(random.randint(x - 10, x + 10)))
	df.loc[df.X < 0, 'X'] = random.randint(1, width - 330)	
	df.loc[df.X > width - 350, 'X'] = random.randint(1, width - 350)	
	df = df.sort_values(by=['newProbs'], ascending=False)

	df.to_csv("/Accounts/turing/students/s19/ainsma01/AnkiCozmo/FinalProject/data.csv", index = False)

#used for iterations after the initial stage to update our hypothesis based on the previous motions of the cozmo
#and then resample again
def localize2():
	data = pd.read_csv("/Accounts/turing/students/s19/ainsma01/AnkiCozmo/FinalProject/data.csv")
	data['X'] = data['X'].map(lambda x: abs(x))
	pano = cv2.imread("/Accounts/turing/students/s19/ainsma01/AnkiCozmo/FinalProject/Panorama.jpeg")

	dimensions = pano.shape
	width = dimensions[1]
	height = dimensions[0]
	height = min(240, height)
	
	#load in current pics
	currentPics = []
	cur = 0
	xValues = data['X'].tolist()
	for point in xValues:
		currentPics.append(pano[0:height, point:point+320])
		#print(width - (point + 320))
		#print(cur)
		#cur = cur + 1
		#print(pano[0:height, point:point+320].shape[1])

	#grab the new mse values for the new points
	homePic = cv2.imread("/Accounts/turing/students/s19/ainsma01/AnkiCozmo/FinalProject/latestImage")
	homePic = homePic[0:height, 0:320]
	MSEList = []
	for i in range(len(currentPics)):

		MSEList.append(compare_images(homePic,currentPics[i]))

	data.drop(columns=['MSE'])
	data['MSE'] = MSEList

	#Get the sum of the values
	MSESum = sum(data['MSE'])

	#invert values
	data['normalizedMSE'] = (data['MSE']/MSESum)
	data['invertedMSE'] = (1/data['normalizedMSE'])

	#Normalize the values
	newSum = sum(data['invertedMSE'])
	data['newProbs'] = (data['invertedMSE']/newSum)

	#if we pick the exact same picture, make its probability 1
	data = data.fillna(1)

	#renormalize in case we filled a NaN with 1
	probSum = sum(data['newProbs'])
	data['newProbs'] = (data['newProbs']/probSum)

	#remove unnnecessary information
	data = data.drop(columns=['normalizedMSE','invertedMSE'])

	#select new values according to the probabilities
	data['X'] = np.random.choice(data['X'], len(currentPics), p=data['newProbs'])

	#randomize new x values
        #TODO: Implement into motion model, not done here
	data['X'] = data['X'].map(lambda x: abs(random.randint(x - 10, x + 10)))
	data.loc[data.X < 0, 'X'] = random.randint(1, width - 330)	
	data.loc[data.X > width - 350, 'X'] = random.randint(1, width - 350)	
	data = data.sort_values(by=['newProbs'], ascending=False)
	
	data.to_csv("/Accounts/turing/students/s19/ainsma01/AnkiCozmo/FinalProject/data.csv", index = False)

css.php