Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bigprint
twins-controller
Commits
dcc5df41
Commit
dcc5df41
authored
Jan 12, 2021
by
Jayant Khatkar
Browse files
Manually wait for Traj finish using status monitoring (
#10
)
parent
2e3651c9
Changes
1
Show whitespace changes
Inline
Side-by-side
src/Controller.py
View file @
dcc5df41
...
...
@@ -167,8 +167,12 @@ class Controller(object):
self
.
group
.
execute
(
plan
,
wait
=
False
)
s
=
time
.
time
()
while
time
.
time
()
-
s
<
traj
.
points
[
-
1
].
time_from_start
.
to_sec
():
#not self.traj_complete:
pass
t
=
traj
.
points
[
-
1
].
time_from_start
.
to_sec
()
while
not
self
.
traj_complete
:
if
time
.
time
()
-
s
>
t
+
3
:
Exception
(
"traj_complete failed"
)
break
self
.
traj_complete
=
False
return
True
...
...
@@ -290,6 +294,8 @@ class Controller(object):
if
len
(
msg
.
status_list
)
>
0
:
self
.
traj_complete
=
(
msg
.
status_list
[
-
1
].
status
==
3
or
msg
.
status_list
[
-
1
].
status
==
2
)
if
self
.
traj_complete
:
print
(
"Trajectory Execution Completed"
)
def
getR_ET
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment