l1.5-safety-system/safety_user_plugin/scripts/user_info.py

30 lines
753 B
Python

#!/usr/bin/env python
from robot_info import RobotInfo
class UserInfo:
def __init__(self):
self.selected_robot = None
self.robots_id_list = []
self.user_stop_state = None
self.master_stop_state = None
self.clutch_state = None
def select_robot(self,robot_id):
self.selected_robot = RobotInfo(robot_id)
def release_robot(self):
self.selected_robot = None
def update_robots_id_list(self,robots_id_list):
self.robots_id_list = robots_id_list
def update_selected_robot_info(self,new_robot_info):
raise NotImplementedError
def get_user_stop_state(self):
return self.user_stop_state
def get_clutch_state(self):
return self.clutch_state