Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kinect-experiments
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
B1aze
kinect-experiments
Commits
9ef96f44
Commit
9ef96f44
authored
6 years ago
by
Malte Schmitz
Browse files
Options
Downloads
Patches
Plain Diff
Remove debug prints
parent
ddfe539f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
b1aze.py
+1
-6
1 addition, 6 deletions
b1aze.py
with
1 addition
and
6 deletions
b1aze.py
+
1
−
6
View file @
9ef96f44
...
@@ -100,7 +100,7 @@ def eyes_direction(dir):
...
@@ -100,7 +100,7 @@ def eyes_direction(dir):
def
do_eye_blink
():
def
do_eye_blink
():
global
eye_blink
global
eye_blink
while
True
:
while
True
:
time
.
sleep
(
random
.
randint
(
5
,
15
))
time
.
sleep
(
random
.
randint
(
3
,
8
))
for
i
in
range
(
0
,
7
):
for
i
in
range
(
0
,
7
):
eye_blink
=
i
eye_blink
=
i
draw_eye
()
draw_eye
()
...
@@ -156,7 +156,6 @@ print('Press ESC in window to stop')
...
@@ -156,7 +156,6 @@ print('Press ESC in window to stop')
def
sync
():
def
sync
():
global
last_sync
,
position
global
last_sync
,
position
print
(
"
SYNC!
"
)
do_move
(
-
5000
)
do_move
(
-
5000
)
sleep
(
0.5
)
sleep
(
0.5
)
do_move
(
3800
/
2
)
do_move
(
3800
/
2
)
...
@@ -173,7 +172,6 @@ def goto(new_position):
...
@@ -173,7 +172,6 @@ def goto(new_position):
if
abs
(
delta
)
>
100
:
if
abs
(
delta
)
>
100
:
move
(
delta
)
move
(
delta
)
d
=
min
(
2
,
max
(
-
2
,
int
(
round
(
delta
/
-
750.0
))))
d
=
min
(
2
,
max
(
-
2
,
int
(
round
(
delta
/
-
750.0
))))
print
(
d
)
eyes_direction
(
d
)
eyes_direction
(
d
)
position
=
new_position
position
=
new_position
...
@@ -211,11 +209,9 @@ def trackDepth():
...
@@ -211,11 +209,9 @@ def trackDepth():
if
center
!=
None
:
if
center
!=
None
:
target_x
=
(
300
-
center
[
0
])
*
-
5
target_x
=
(
300
-
center
[
0
])
*
-
5
#print(target_x)
goto
(
target_x
)
goto
(
target_x
)
target_y
=
(
450
-
center
[
1
])
/
15
target_y
=
(
450
-
center
[
1
])
/
15
#print(target_y)
eyes_goto
(
target_y
)
eyes_goto
(
target_y
)
if
SHOW_IMAGE
:
if
SHOW_IMAGE
:
...
@@ -267,7 +263,6 @@ def track():
...
@@ -267,7 +263,6 @@ def track():
if
center
!=
None
:
if
center
!=
None
:
target_x
=
(
300
-
center
[
0
])
*
-
5
target_x
=
(
300
-
center
[
0
])
*
-
5
print
(
target_x
)
goto
(
target_x
)
goto
(
target_x
)
return
frame
return
frame
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment