Skip to content

Commit

Permalink
Add shebang delete feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ma-shangao committed Aug 7, 2023
1 parent be6bf82 commit 16b1a80
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions scripts/waypoint_following.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#! /usr/bin/env python3
# Copyright 2023
# Author: MA Song
#
Expand Down Expand Up @@ -51,15 +52,15 @@ def single_pose_nav(x, y, o_z, o_w, argv=sys.argv[1:]):

# Do something with the feedback
i = i + 1
feedback = navigator.getFeedback()
if feedback and i % 5 == 0:
print('Estimated time of arrival: ' + '{0:.0f}'.format(
Duration.from_msg(feedback.estimated_time_remaining).nanoseconds / 1e9)
+ ' seconds.')

# Some navigation timeout to demo cancellation
if Duration.from_msg(feedback.navigation_time) > Duration(seconds=600.0):
navigator.cancelNav()
# feedback = navigator.getFeedback()
# if feedback and i % 5 == 0:
# print('Estimated time of arrival: ' + '{0:.0f}'.format(
# Duration.from_msg(feedback.estimated_time_remaining).nanoseconds / 1e9)
# + ' seconds.')

# # Some navigation timeout to demo cancellation
# if Duration.from_msg(feedback.navigation_time) > Duration(seconds=600.0):
# navigator.cancelNav()

# Do something depending on the return code
result = navigator.getResult()
Expand Down

0 comments on commit 16b1a80

Please sign in to comment.