@@ -473,10 +473,10 @@ def _start_query(self) -> None:
473
473
self ._logger .error ("Error when getting robot command feedback: %s" , e )
474
474
self ._spot_wrapper .last_trajectory_command = None
475
475
476
- if self ._spot_wrapper ._last_navigate_to_command is not None :
476
+ if self ._spot_wrapper .last_navigate_to_command is not None :
477
477
is_moving = True
478
478
479
- self ._spot_wrapper ._is_moving = is_moving
479
+ self ._spot_wrapper .is_moving = is_moving
480
480
481
481
# We must check if any command currently has a non-None value for its id. If we don't do this, this stand
482
482
# command can cause other commands to be interrupted before they get to start
@@ -593,6 +593,7 @@ class RobotCommandData:
593
593
# Was the last trajectory command requested to be precise
594
594
last_trajectory_command_precise : typing .Optional [bool ] = None
595
595
last_velocity_command_time : typing .Optional [float ] = None
596
+ last_navigate_to_command : typing .Optional [int ] = None
596
597
597
598
598
599
class SpotWrapper :
@@ -658,7 +659,6 @@ def __init__(
658
659
self ._state = RobotState ()
659
660
self ._trajectory_status_unknown = False
660
661
self ._command_data = RobotCommandData ()
661
- self ._last_navigate_to_command = None
662
662
self ._state_navigate_to_valid = None
663
663
664
664
self ._front_image_requests = []
@@ -1186,6 +1186,14 @@ def last_velocity_command_time(self) -> typing.Optional[float]:
1186
1186
def last_velocity_command_time (self , command_time : float ) -> None :
1187
1187
self ._command_data .last_velocity_command_time = command_time
1188
1188
1189
+ @property
1190
+ def last_navigate_to_command (self ) -> typing .Optional [int ]:
1191
+ return self ._command_data .last_navigate_to_command
1192
+
1193
+ @last_navigate_to_command .setter
1194
+ def last_navigate_to_command (self , command_id : int ) -> None :
1195
+ self ._command_data .last_navigate_to_command = command_id
1196
+
1189
1197
def is_estopped (self , timeout : typing .Optional [float ] = None ) -> bool :
1190
1198
return self ._robot .is_estopped (timeout = timeout )
1191
1199
@@ -2607,15 +2615,15 @@ def _start_navigate_to(
2607
2615
leases = [sublease .lease_proto ],
2608
2616
command_id = nav_to_cmd_id ,
2609
2617
)
2610
- self ._last_navigate_to_command = nav_to_cmd_id
2618
+ self .last_navigate_to_command = nav_to_cmd_id
2611
2619
except ResponseError as e :
2612
2620
self ._logger .error ("Error while navitation: %s" , e )
2613
2621
break
2614
2622
2615
2623
if self ._check_success (nav_to_cmd_id ):
2616
2624
break
2617
2625
2618
- self ._last_navigate_to_command = None
2626
+ self .last_navigate_to_command = None
2619
2627
self ._lease = self ._lease_wallet .advance ()
2620
2628
self ._lease_keepalive = LeaseKeepAlive (self ._lease_client )
2621
2629
0 commit comments