2024-03-20 09:50:19 +08:00
|
|
|
import time
|
2024-05-21 06:45:59 +08:00
|
|
|
|
|
|
|
|
2024-03-20 09:50:19 +08:00
|
|
|
class SafetyHypervisor():
|
|
|
|
def __init__(self, robot):
|
|
|
|
self.robot = robot
|
|
|
|
|
|
|
|
def unsafe(self):
|
|
|
|
return False
|
2024-05-21 06:45:59 +08:00
|
|
|
|
2024-03-20 09:50:19 +08:00
|
|
|
def controlTimeout(self):
|
|
|
|
if time.time() - self.robot.latest_command_stamp > 0.1:
|
|
|
|
print('controller timeout')
|
|
|
|
return True
|
|
|
|
else:
|
2024-05-21 06:45:59 +08:00
|
|
|
return False
|