Skip to content

Commit 1a69d3a

Browse files
committed
Clean up Python ex06.
1 parent 0e35ac0 commit 1a69d3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python_examples/ex06_async_nodes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ def run(self):
3737
start = np.asarray(self.get_input("start"))
3838
goal = np.asarray(self.get_input("goal"))
3939

40-
for t in np.linspace(0.0, 1.0, num=10):
40+
t0 = time.time()
41+
while (t := time.time() - t0) < 1.0:
4142
command = (1.0 - t) * start + t * goal
4243
self.set_output("command", command)
4344
yield
4445

4546
print("Trajectory finished!")
46-
4747
return NodeStatus.SUCCESS
4848

4949
def on_halted(self):

0 commit comments

Comments
 (0)