File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
spot_wrapper/testing/mocks Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 1
1
# Copyright (c) 2024 Boston Dynamics AI Institute LLC. See LICENSE file for more info.
2
2
3
+ from typing import Any
4
+
3
5
import grpc
4
6
from bosdyn .api .power_pb2 import (
5
7
FanPowerCommandFeedbackRequest ,
21
23
class MockPowerService (PowerServiceServicer , MockRobotStateService ):
22
24
"""A mock Spot power service."""
23
25
26
+ def __init__ (self , ** kwargs : Any ) -> None :
27
+ super ().__init__ (** kwargs )
28
+ self .robot_state .power_state .motor_power_state = PowerState .MotorPowerState .MOTOR_POWER_STATE_OFF
29
+
24
30
def PowerCommand (self , request : PowerCommandRequest , context : grpc .ServicerContext ) -> PowerCommandResponse :
25
31
response = PowerCommandResponse ()
26
32
if request .request == PowerCommandRequest .Request .REQUEST_ON_MOTORS :
You can’t perform that action at this time.
0 commit comments