Skip to content

Commit

Permalink
challenge 1
Browse files Browse the repository at this point in the history
  • Loading branch information
marcogil93 committed Jun 25, 2017
1 parent 621e195 commit 6c93616
Show file tree
Hide file tree
Showing 836 changed files with 33 additions and 28 deletions.
11 changes: 4 additions & 7 deletions challenges.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,13 @@ def get_destination(self,image):
green_area_max=area
biggest_green=contorno
foundGreen=True

x1=0;
x2=0;


if foundRed:
x1,y1,dx1,dy1 = cv2.boundingRect(biggest_red)
if float(dy1)/dx1<1.2:
foundRed=False
#print(x1+dx1,y1+dy1)y
#print(x1+dx1,y1+dy1)
cv2.rectangle(image2,(x1,y1),(x1+dx1,y1+dy1),(0,0,255),-1,8)

if foundGreen:
Expand All @@ -109,23 +107,22 @@ def get_destination(self,image):
foundGreen=False
#print(x2+dx2,y2+dy2)
cv2.rectangle(image2,(x2,y2),(x2+dx2,y2+dy2),(0,255,0),-1,8)
if x1>x2:
print('Rojo a la izquierda, ignorar rojo.')
return False, True, x2,y2, image2

#cv2.waitKey(0)
if foundRed and foundGreen:
x=int((x1+x2)/2)
y=int((y1+y2)/2)
cv2.circle(image2,(x,y),10,(255,255,255),-1,8)
cv2.imshow('image2',image2)

return foundRed,foundGreen,x,y,image2
else:
if foundRed:
x=x1
y=y1
cv2.circle(image2,(x,y),10,(255,255,255),-1,8)
cv2.imshow('image2',image2)

return foundRed,foundGreen,x,y,image2
elif foundGreen:
x=x2
Expand Down
7 changes: 4 additions & 3 deletions lib/boat.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
course = 3
challenge_pos = 4
dock = 5

dockId = 0;

def start_mission():
imu.init();
Expand Down Expand Up @@ -160,8 +160,9 @@ def send_testing():
print("Receiving")
s = x.receive_from_station();
resp = s[enable_pos];
counter += 1
print("Go to dock : ", s[dock])
counter += 1;
dockId = int(s[dock]);
print("Go to dock : ", s[dock]);

if(counter < 5):
time.sleep(6-counter);
Expand Down
Binary file added postes/2017-06-24-09:05:31.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added postes/2017-06-24-09:05:32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added postes/2017-06-24-09:05:33.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added postes/2017-06-24-09:05:34.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added postes/2017-06-24-09:05:35.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added postes/2017-06-24-09:05:36.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added postes/2017-06-24-09:05:37.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added postes/2017-06-24-09:05:38.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added postes/2017-06-24-09:05:39.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added postes/2017-06-24-09:05:40.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added postes/2017-06-24-09:05:41.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added postes/2017-06-24-09:05:42.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added postes/2017-06-24-09:05:43.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added postes/2017-06-24-09:05:44.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added postes/2017-06-24-09:05:45.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added postes/2017-06-24-09:05:46.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added postes/2017-06-24-09:05:47.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added postes/2017-06-24-09:05:48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added postes/2017-06-24-09:05:49.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added postes/2017-06-24-09:05:50.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added postes/2017-06-24-09:05:51.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added postes/2017-06-24-09:05:52.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added postes/2017-06-24-09:05:53.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added postes/2017-06-24-09:05:54.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added postes/2017-06-24-09:05:55.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added postes/2017-06-24-09:05:56.png
Binary file added postes/2017-06-24-09:05:57.png
Binary file added postes/2017-06-24-09:05:58.png
Binary file added postes/2017-06-24-09:05:59.png
Binary file added postes/2017-06-24-09:06:00.png
Binary file added postes/2017-06-24-09:06:01.png
Binary file added postes/2017-06-24-09:06:02.png
Binary file added postes/2017-06-24-09:06:03.png
Binary file added postes/2017-06-24-09:06:04.png
Binary file added postes/2017-06-24-09:06:05.png
Binary file added postes/2017-06-24-09:06:06.png
Binary file added postes/2017-06-24-09:06:07.png
Binary file added postes/2017-06-24-09:06:08.png
Binary file added postes/2017-06-24-09:06:09.png
Binary file added postes/2017-06-24-09:06:10.png
Binary file added postes/2017-06-24-09:06:11.png
Binary file added postes/2017-06-24-09:06:12.png
Binary file added postes/2017-06-24-09:06:13.png
Binary file added postes/2017-06-24-09:06:14.png
Binary file added postes/2017-06-24-09:06:15.png
Binary file added postes/2017-06-24-09:06:16.png
Binary file added postes/2017-06-24-09:06:17.png
Binary file added postes/2017-06-24-09:06:18.png
Binary file added postes/2017-06-24-09:06:19.png
Binary file added postes/2017-06-24-09:06:20.png
Binary file added postes/2017-06-24-09:06:21.png
Binary file added postes/2017-06-24-09:06:22.png
Binary file added postes/2017-06-24-09:06:23.png
Binary file added postes/2017-06-24-09:06:24.png
Binary file added postes/2017-06-24-09:06:25.png
Binary file added postes/2017-06-24-09:06:26.png
Binary file added postes/2017-06-24-09:06:27.png
Binary file added postes/2017-06-24-09:06:28.png
Binary file added postes/2017-06-24-09:06:29.png
Binary file added postes/2017-06-24-09:06:30.png
Binary file added postes/2017-06-24-09:06:31.png
Binary file added postes/2017-06-24-09:06:32.png
Binary file added postes/2017-06-24-09:06:33.png
Binary file added postes/2017-06-24-09:06:34.png
Binary file added postes/2017-06-24-09:06:35.png
Binary file added postes/2017-06-24-09:06:36.png
Binary file added postes/2017-06-24-09:06:37.png
Binary file added postes/2017-06-24-09:06:38.png
Binary file added postes/2017-06-24-09:06:39.png
Binary file added postes/2017-06-24-09:06:40.png
Binary file added postes/2017-06-24-09:06:41.png
Binary file added postes/2017-06-24-09:06:42.png
Binary file added postes/2017-06-24-09:06:43.png
Binary file added postes/2017-06-24-09:06:44.png
Binary file added postes/2017-06-24-09:06:45.png
Binary file added postes/2017-06-24-09:06:46.png
Binary file added postes/2017-06-24-09:06:47.png
Binary file added postes/2017-06-24-09:06:48.png
Binary file added postes/2017-06-24-09:06:49.png
Binary file added postes/2017-06-24-09:06:50.png
Binary file added postes/2017-06-24-09:06:51.png
Binary file added postes/2017-06-24-09:06:52.png
Binary file added postes/2017-06-24-09:06:53.png
Binary file added postes/2017-06-24-09:06:54.png
Binary file added postes/2017-06-24-09:06:55.png
Binary file added postes/2017-06-24-09:06:56.png
Binary file added postes/2017-06-24-09:06:57.png
Binary file added postes/2017-06-24-09:06:58.png
Binary file added postes/2017-06-24-09:06:59.png
Binary file added postes/2017-06-24-09:07:00.png
Binary file added postes/2017-06-24-09:11:44.png
Binary file added postes/2017-06-24-09:11:45.png
Binary file added postes/2017-06-24-09:11:46.png
Binary file added postes/2017-06-24-09:11:47.png
Binary file added postes/2017-06-24-09:11:48.png
Binary file added postes/2017-06-24-09:11:49.png
Binary file added postes/2017-06-24-09:11:50.png
Binary file added postes/2017-06-24-09:11:51.png
Binary file added postes/2017-06-24-09:11:52.png
Binary file added postes/2017-06-24-09:11:53.png
Binary file added postes/2017-06-24-09:11:54.png
Binary file added postes/2017-06-24-09:11:55.png
Binary file added postes/2017-06-24-09:11:56.png
Binary file added postes/2017-06-24-09:11:57.png
Binary file added postes/2017-06-24-09:11:58.png
Binary file added postes/2017-06-24-09:11:59.png
Binary file added postes/2017-06-24-09:12:00.png
Binary file added postes/2017-06-24-09:12:01.png
Binary file added postes/2017-06-24-09:12:02.png
Binary file added postes/2017-06-24-09:12:03.png
Binary file added postes/2017-06-24-09:12:04.png
Binary file added postes/2017-06-24-09:12:05.png
Binary file added postes/2017-06-24-09:12:06.png
Binary file added postes/2017-06-24-09:12:07.png
Binary file added postes/2017-06-24-09:12:08.png
Binary file added postes/2017-06-24-09:12:09.png
Binary file added postes/2017-06-24-09:12:10.png
Binary file added postes/2017-06-24-09:12:11.png
Binary file added postes/2017-06-24-09:12:12.png
Binary file added postes/2017-06-24-09:12:13.png
Binary file added postes/2017-06-24-09:12:14.png
Binary file added postes/2017-06-24-09:12:15.png
Binary file added postes/2017-06-24-09:12:16.png
Binary file added postes/2017-06-24-09:12:17.png
Binary file added postes/2017-06-24-09:12:18.png
Binary file added postes/2017-06-24-09:12:19.png
Binary file added postes/2017-06-24-09:12:20.png
Binary file added postes/2017-06-24-09:12:21.png
Binary file added postes/2017-06-24-09:12:22.png
Binary file added postes/2017-06-24-09:12:23.png
Binary file added postes/2017-06-24-09:12:24.png
Binary file added postes/2017-06-24-09:12:25.png
Binary file added postes/2017-06-24-09:12:26.png
Binary file added postes/2017-06-24-09:12:27.png
Binary file added postes/2017-06-24-09:12:28.png
Binary file added postes/2017-06-24-09:12:29.png
Binary file added postes/2017-06-24-09:12:30.png
Binary file added postes/2017-06-24-09:12:31.png
Binary file added postes/2017-06-24-09:12:32.png
Binary file added postes/2017-06-24-09:12:33.png
Binary file added postes/2017-06-24-09:12:34.png
Binary file added postes/2017-06-24-09:12:35.png
Binary file added postes/2017-06-24-09:12:36.png
Binary file added postes/2017-06-24-09:12:37.png
Binary file added postes/2017-06-24-09:12:38.png
Binary file added postes/2017-06-24-09:12:39.png
Binary file added postes/2017-06-24-09:12:40.png
Binary file added postes/2017-06-24-09:12:41.png
Binary file added postes/2017-06-24-09:12:42.png
Binary file added postes/2017-06-24-09:12:43.png
Binary file added postes/2017-06-24-09:12:44.png
Binary file added postes/2017-06-24-09:12:45.png
Binary file added postes/2017-06-24-09:12:46.png
Binary file added postes/2017-06-24-09:12:47.png
Binary file added postes/2017-06-24-09:12:48.png
Binary file added postes/2017-06-24-09:12:49.png
Binary file added postes/2017-06-24-09:12:50.png
Binary file added postes/2017-06-24-09:12:51.png
Binary file added postes/2017-06-24-09:12:52.png
Binary file added postes/2017-06-24-09:12:53.png
Binary file added postes/2017-06-24-09:12:54.png
Binary file added postes/2017-06-24-09:12:55.png
Binary file added postes/2017-06-24-09:12:56.png
Binary file added postes/2017-06-24-09:12:57.png
Binary file added postes/2017-06-24-09:12:58.png
Binary file added postes/2017-06-24-09:12:59.png
Binary file added postes/2017-06-24-09:13:00.png
Binary file added postes/2017-06-24-09:13:01.png
Binary file added postes/2017-06-24-09:13:02.png
Binary file added postes/2017-06-24-09:13:03.png
Binary file added postes/2017-06-24-09:13:04.png
Binary file added postes/2017-06-24-09:13:05.png
Binary file added postes/2017-06-24-09:13:06.png
Binary file added postes/2017-06-24-09:13:07.png
Binary file added postes/2017-06-24-09:13:08.png
Binary file added postes/2017-06-24-09:13:09.png
Binary file added postes/2017-06-24-09:13:10.png
Binary file added postes/2017-06-24-09:13:11.png
Binary file added postes/2017-06-24-09:13:12.png
Binary file added postes/2017-06-24-09:13:13.png
Binary file added postes/2017-06-24-09:13:14.png
Binary file added postes/2017-06-24-09:13:15.png
Binary file added postes/2017-06-24-09:13:16.png
Binary file added postes/2017-06-24-09:13:17.png
Binary file added postes/2017-06-24-09:13:18.png
Binary file added postes/2017-06-24-09:13:19.png
Binary file added postes/2017-06-24-09:13:20.png
Binary file added postes/2017-06-24-09:13:21.png
Binary file added postes/2017-06-24-09:13:22.png
Binary file added postes/2017-06-24-09:13:23.png
Binary file added postes/2017-06-24-09:13:24.png
Binary file added postes/2017-06-24-09:13:25.png
Binary file added postes/2017-06-24-09:13:26.png
Binary file added postes/2017-06-24-09:13:27.png
Binary file added postes/2017-06-24-09:13:28.png
Binary file added postes/2017-06-24-09:13:29.png
Binary file added postes/2017-06-24-09:13:30.png
Binary file added postes/2017-06-24-09:13:31.png
Binary file added postes/2017-06-24-09:13:32.png
Binary file added postes/2017-06-24-09:13:33.png
Binary file added postes/2017-06-24-09:13:34.png
Binary file added postes/2017-06-24-09:13:35.png
Binary file added postes/2017-06-24-10:13:29.png
Binary file added postes/2017-06-24-10:13:30.png
Binary file added postes/2017-06-24-10:13:31.png
Binary file added postes/2017-06-24-10:13:32.png
Binary file added postes/2017-06-24-10:13:33.png
Binary file added postes/2017-06-24-10:13:34.png
Binary file added postes/2017-06-24-10:13:35.png
Binary file added postes/2017-06-24-10:13:36.png
Binary file added postes/2017-06-24-10:13:37.png
Binary file added postes/2017-06-24-10:13:38.png
Binary file added postes/2017-06-24-10:13:39.png
Binary file added postes/2017-06-24-10:13:40.png
Binary file added postes/2017-06-24-10:13:41.png
Binary file added postes/2017-06-24-10:13:42.png
Binary file added postes/2017-06-24-10:13:43.png
Binary file added postes/2017-06-24-10:13:44.png
Binary file added postes/2017-06-24-10:13:45.png
Binary file added postes/2017-06-24-10:13:46.png
Binary file added postes/2017-06-24-10:13:47.png
Binary file added postes/2017-06-24-10:13:48.png
Binary file added postes/2017-06-24-10:13:49.png
Binary file added postes/2017-06-24-10:13:50.png
Binary file added postes/2017-06-24-10:13:51.png
Binary file added postes/2017-06-24-10:13:52.png
Binary file added postes/2017-06-24-10:13:53.png
Binary file added postes/2017-06-24-10:13:54.png
Binary file added postes/2017-06-24-10:13:55.png
Binary file added postes/2017-06-24-10:13:56.png
Binary file added postes/2017-06-24-10:13:57.png
Binary file added postes/2017-06-24-10:13:58.png
Binary file added postes/2017-06-24-10:13:59.png
Binary file added postes/2017-06-24-10:14:00.png
Binary file added postes/2017-06-24-10:14:01.png
Binary file added postes/2017-06-24-10:14:02.png
Binary file added postes/2017-06-24-10:14:03.png
Binary file added postes/2017-06-24-10:14:04.png
Binary file added postes/2017-06-24-10:14:05.png
Binary file added postes/2017-06-24-10:14:06.png
Binary file added postes/2017-06-24-10:14:07.png
Binary file added postes/2017-06-24-10:14:08.png
Binary file added postes/2017-06-24-10:14:09.png
Binary file added postes/2017-06-24-10:14:10.png
Binary file added postes/2017-06-24-10:14:11.png
Binary file added postes/2017-06-24-10:14:12.png
Binary file added postes/2017-06-24-10:14:13.png
Binary file added postes/2017-06-24-10:14:14.png
Binary file added postes/2017-06-24-10:14:15.png
Binary file added postes/2017-06-24-10:14:16.png
Binary file added postes/2017-06-24-10:14:17.png
Binary file added postes/2017-06-24-10:14:18.png
Binary file added postes/2017-06-24-10:14:19.png
Binary file added postes/2017-06-24-10:14:20.png
Binary file added postes/2017-06-24-10:14:21.png
Binary file added postes/2017-06-24-10:14:22.png
Binary file added postes/2017-06-24-10:14:23.png
Binary file added postes/2017-06-24-10:14:24.png
Binary file added postes/2017-06-24-10:14:25.png
Binary file added postes/2017-06-24-10:14:26.png
Binary file added postes/2017-06-24-10:14:27.png
Binary file added postes/2017-06-24-10:14:28.png
Binary file added postes/2017-06-24-10:14:29.png
Binary file added postes/2017-06-24-10:14:30.png
Binary file added postes/2017-06-24-10:14:31.png
Binary file added postes/2017-06-24-10:14:32.png
Binary file added postes/2017-06-24-10:14:33.png
Binary file added postes/2017-06-24-10:14:34.png
Binary file added postes/2017-06-24-10:14:35.png
Binary file added postes/2017-06-24-10:14:36.png
Binary file added postes/2017-06-24-10:14:37.png
Binary file added postes/2017-06-24-10:14:38.png
Binary file added postes/2017-06-24-10:14:39.png
Binary file added postes/2017-06-24-10:14:40.png
Binary file added postes/2017-06-24-10:14:41.png
Binary file added postes/2017-06-24-10:14:42.png
Binary file added postes/2017-06-24-10:14:43.png
Binary file added postes/2017-06-24-10:14:44.png
Binary file added postes/2017-06-24-10:14:45.png
Binary file added postes/2017-06-24-10:14:46.png
Binary file added postes/2017-06-24-10:14:47.png
Binary file added postes/2017-06-24-10:14:48.png
Binary file added postes/2017-06-24-10:14:49.png
Binary file added postes/2017-06-24-10:29:58.png
Binary file added postes/2017-06-24-10:29:59.png
Binary file added postes/2017-06-24-10:30:00.png
Binary file added postes/2017-06-24-10:30:01.png
Binary file added postes/2017-06-24-10:30:02.png
Binary file added postes/2017-06-24-10:30:03.png
Binary file added postes/2017-06-24-10:30:04.png
Binary file added postes/2017-06-24-10:30:05.png
Binary file added postes/2017-06-24-10:30:06.png
Binary file added postes/2017-06-24-10:30:07.png
Binary file added postes/2017-06-24-10:30:08.png
Binary file added postes/2017-06-24-10:30:09.png
Binary file added postes/2017-06-24-10:30:10.png
Binary file added postes/2017-06-24-10:30:11.png
Binary file added postes/2017-06-24-10:30:12.png
Loading

0 comments on commit 6c93616

Please sign in to comment.