@@ -648,7 +648,7 @@ def __init__(
648
648
self ._last_velocity_command_time = None
649
649
self ._last_docking_command = None
650
650
self ._last_navigate_to_command = None
651
- self ._state_navigation_valid = None
651
+ self ._state_navigate_to_valid = None
652
652
653
653
self ._front_image_requests = []
654
654
for source in front_image_sources :
@@ -1729,12 +1729,14 @@ def set_localization_waypoint(self, waypoint_id: str) -> typing.Tuple[bool, str]
1729
1729
f"Got an error while localizing the robot to the waypoint { waypoint_id } : { e } " ,
1730
1730
)
1731
1731
1732
- def cancel_navigation (self ) -> None :
1733
- """Cancel navigation of a robot from start_navigation ()"""
1732
+ def cancel_navigate_to (self ) -> None :
1733
+ """Cancel navigation of a robot from start_navigate_to ()"""
1734
1734
self ._cancel_navigate_to ()
1735
1735
1736
1736
@try_claim
1737
- def start_navigation (self , target_waypoint_id : str ) -> typing .Tuple [bool , str , str ]:
1737
+ def start_navigate_to (
1738
+ self , target_waypoint_id : str
1739
+ ) -> typing .Tuple [bool , str , str ]:
1738
1740
"""Navigate a robot to specified waypoint id with GraphNav
1739
1741
1740
1742
Args:
@@ -2506,7 +2508,7 @@ def _cancel_navigate_to(self):
2506
2508
self ._navigate_to_valid = False
2507
2509
2508
2510
@try_claim
2509
- def _start_navigation (self , target_waypoint_id ):
2511
+ def _start_navigate_to (self , target_waypoint_id ) -> typing . Tuple [ bool , str , str ] :
2510
2512
self ._lease = self ._lease_wallet .get_lease ()
2511
2513
destination_waypoint = graph_nav_util .find_unique_waypoint_id (
2512
2514
target_waypoint_id ,
@@ -2531,9 +2533,9 @@ def _start_navigation(self, target_waypoint_id):
2531
2533
sublease = self ._lease .create_sublease ()
2532
2534
self ._lease_keepalive .shutdown ()
2533
2535
2534
- self ._state_navigation_valid = True
2536
+ self ._state_navigate_to_valid = True
2535
2537
nav_to_cmd_id = None
2536
- while self ._state_navigation_valid :
2538
+ while self ._state_navigate_to_valid :
2537
2539
time .sleep (0.5 )
2538
2540
try :
2539
2541
nav_to_cmd_id = self ._graph_nav_client .navigate_to (
@@ -2554,7 +2556,7 @@ def _start_navigation(self, target_waypoint_id):
2554
2556
self ._lease = self ._lease_wallet .advance ()
2555
2557
self ._lease_keepalive = LeaseKeepAlive (self ._lease_client )
2556
2558
2557
- if self ._state_navigation_valid :
2559
+ if self ._state_navigate_to_valid :
2558
2560
return False , "Navigation is canceled" , "preempted"
2559
2561
2560
2562
status = self ._graph_nav_client .navigation_feedback (nav_to_cmd_id )
0 commit comments