Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-capstone-design1
/
JSH_Project7
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
이유진
2020-06-19 10:50:32 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9e9dcfdb3fb16711cfeb8dd5c47d5aef0fa28439
9e9dcfdb
1 parent
0b5bed6b
오타수정
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
step3/step3.py
step3/step3.py
View file @
9e9dcfd
...
...
@@ -11,7 +11,7 @@ posiRange = 10 # position (x, y) 변화 인지 거리
def
setHeight
(
_sHeight
,
_master
):
while
True
:
_mHeight
=
_m
lave
.
get_height
()
_mHeight
=
_m
aster
.
get_height
()
if
_sHeight
-
errorRange
<=
_mHeight
<=
_sHeight
+
errorRange
:
print
(
'[hit]'
)
return
...
...
@@ -48,12 +48,11 @@ def main():
sPosition
=
slave
.
get_opt_flow_position
()
sHeight
=
slave
.
get_height
()
# slave고도
print
(
"master [x={} y={} z={}] slave [x={} y={} z={}]"
.
format
(
mPosition
.
X
,
mPosition
.
Y
,
mHeight
,
sPosition
.
X
,
sPosition
.
.
format
(
mPosition
.
X
,
mPosition
.
Y
,
mHeight
,
sPosition
.
X
,
sPosition
.
Y
,
sHeight
))
# slave의 전 높이 대비 heightRange 만큼의 차이가 있으면 master가 움직이도록
if
abs
(
sHeight
-
bHeight
)
>
heightRange
:
print
(
'[height change!]'
)
setHeight
(
sHeight
,
master
)
# master의 높이 이동
# slave의 이전 좌표값 저장
...
...
@@ -61,9 +60,5 @@ def main():
if
__name__
==
'__main__'
:
main
()
...
...
Please
register
or
login
to post a comment