Skip to content

Commit 9c943c2

Browse files
authored
[SW-736] Only sit on shutdown if driver holds the estop (#417)
## Change Overview Currently, when you CTRL+C the driver, Spot will sit. If the estop is held by the tablet, this is annoying to deal with if you are starting and stopping the driver often, so this PR removes this feature. If the estop is held by the driver, we still need to force sitting on shutdown, otherwise the robot will collapse to the ground if you CTRL+C. EDIT: bdaiinstitute/spot_wrapper#122 and #420 need to go in first so I can use the blocking version of the sit command. ## Testing Done - [x] started driver without an estop (i.e., estop is controlled by the tablet). Upon CTRL+C'ing the driver, the robot doesn't sit. - [x] started driver with an estop (i.e., added `start_estop: True` to my config yaml). Robot cleanly sits down upon driver CTRL+C
1 parent 483770a commit 9c943c2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spot_driver/spot_driver/spot_ros2.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2913,8 +2913,9 @@ def step(self) -> None:
29132913
def destroy_node(self) -> None:
29142914
self.get_logger().info("Shutting down ROS driver for Spot")
29152915
if self.spot_wrapper is not None:
2916-
if self.spot_wrapper.check_is_powered_on():
2917-
self.spot_wrapper.sit()
2916+
if self.spot_wrapper.check_is_powered_on() and self.start_estop.value:
2917+
self.get_logger().info("Sitting down...")
2918+
self.spot_wrapper.sit_blocking()
29182919
self.spot_wrapper.disconnect()
29192920
super().destroy_node()
29202921

0 commit comments

Comments
 (0)