minor fix
This commit is contained in:
Binary file not shown.
@@ -856,10 +856,10 @@ class PreDos(object):
|
|||||||
|
|
||||||
|
|
||||||
class RobotInit(object):
|
class RobotInit(object):
|
||||||
def __init__(self, hr: HmiRequest, pd: PreDos, conf_path: str = ""):
|
def __init__(self, hr: HmiRequest, pd: PreDos, reg_path: str = ""):
|
||||||
self.hr: HmiRequest = hr
|
self.hr: HmiRequest = hr
|
||||||
self.pd: PreDos = pd
|
self.pd: PreDos = pd
|
||||||
self.conf_path: str = conf_path
|
self.reg_path: str = reg_path
|
||||||
|
|
||||||
def robot_init(self):
|
def robot_init(self):
|
||||||
# 推送配置文件
|
# 推送配置文件
|
||||||
@@ -873,12 +873,12 @@ class RobotInit(object):
|
|||||||
|
|
||||||
user_settings = "/home/luoshi/bin/controller/user_settings"
|
user_settings = "/home/luoshi/bin/controller/user_settings"
|
||||||
interactive_data = f"/home/luoshi/bin/controller/interactive_data/{robot_type}"
|
interactive_data = f"/home/luoshi/bin/controller/interactive_data/{robot_type}"
|
||||||
if self.conf_path == "":
|
if self.reg_path == "":
|
||||||
self.conf_path = f"{clibs.base_path}/assets/confs"
|
self.reg_path = f"{clibs.base_path}/assets/confs"
|
||||||
config_files = [
|
config_files = [
|
||||||
f"{clibs.base_path}/assets/confs/fieldbus_device.json",
|
f"{clibs.base_path}/assets/confs/fieldbus_device.json",
|
||||||
f"{self.conf_path}/registers.json",
|
f"{self.reg_path}/registers.json",
|
||||||
f"{self.conf_path}/registers.xml"
|
f"{self.reg_path}/registers.xml"
|
||||||
]
|
]
|
||||||
for config_file in config_files:
|
for config_file in config_files:
|
||||||
filename = os.path.basename(config_file)
|
filename = os.path.basename(config_file)
|
||||||
|
@@ -212,7 +212,7 @@ class PreDos:
|
|||||||
def pull_file_from_server(self, server_file: str, local_file: str): ...
|
def pull_file_from_server(self, server_file: str, local_file: str): ...
|
||||||
|
|
||||||
class RobotInit:
|
class RobotInit:
|
||||||
def __init__(self, hr: HmiRequest, pd: PreDos, conf_path: str = '') -> None: ...
|
def __init__(self, hr: HmiRequest, pd: PreDos, reg_path: str = '') -> None: ...
|
||||||
def robot_init(self) -> None: ...
|
def robot_init(self) -> None: ...
|
||||||
def fw_updater(self, fw_file: str): ...
|
def fw_updater(self, fw_file: str): ...
|
||||||
|
|
||||||
|
@@ -1,266 +0,0 @@
|
|||||||
import socket
|
|
||||||
import threading
|
|
||||||
from codes import clibs as clibs
|
|
||||||
from pymodbus.client.tcp import ModbusTcpClient
|
|
||||||
|
|
||||||
class HmiRequest:
|
|
||||||
c: socket.socket
|
|
||||||
c_xs: socket.socket
|
|
||||||
t_rx_pkg: threading.Thread
|
|
||||||
t_rx_pkg_xs: threading.Thread
|
|
||||||
t_s_heart: threading.Thread
|
|
||||||
data: bytes
|
|
||||||
is_connected: bool
|
|
||||||
def __init__(self) -> None: ...
|
|
||||||
def sock_conn(self) -> None: ...
|
|
||||||
def close(self) -> None: ...
|
|
||||||
def s_heart(self) -> None: ...
|
|
||||||
@staticmethod
|
|
||||||
def tx_pkg(cmd): ...
|
|
||||||
@staticmethod
|
|
||||||
def tx_pkg_xs(cmd): ...
|
|
||||||
def rx_pkg(self, sock) -> None: ...
|
|
||||||
def get_response(self, data: bytes) -> None: ...
|
|
||||||
def get_response_xs(self, data: bytes) -> None: ...
|
|
||||||
@staticmethod
|
|
||||||
def get_from_id(msg_id: str) -> str: ...
|
|
||||||
def exec_cmd(self, cmd: str, **kwargs): ...
|
|
||||||
|
|
||||||
class ModbusRequest:
|
|
||||||
c: ModbusTcpClient
|
|
||||||
def __init__(self) -> None: ...
|
|
||||||
def sock_conn(self) -> None: ...
|
|
||||||
def r_clear_alarm(self) -> None: ...
|
|
||||||
def r_reset_estop(self) -> None: ...
|
|
||||||
def r_reset_estop_clear_alarm(self) -> None: ...
|
|
||||||
def r_motor_on(self) -> None: ...
|
|
||||||
def r_motor_off(self) -> None: ...
|
|
||||||
def r_motor_on_off(self, action: bool): ...
|
|
||||||
def r_motoron_pp2main_start(self) -> None: ...
|
|
||||||
def r_motoron_start(self) -> None: ...
|
|
||||||
def r_pulse_motoroff(self) -> None: ...
|
|
||||||
def r_pp2main(self) -> None: ...
|
|
||||||
def r_program_start(self) -> None: ...
|
|
||||||
def r_program_stop(self) -> None: ...
|
|
||||||
def r_program_start_stop(self, action: bool): ...
|
|
||||||
def r_set_program_speed(self, speed: int): ...
|
|
||||||
def r_soft_estop(self, action: bool): ...
|
|
||||||
def r_switch_auto_motoron(self) -> None: ...
|
|
||||||
def r_switch_auto(self) -> None: ...
|
|
||||||
def r_switch_manual(self) -> None: ...
|
|
||||||
def r_switch_auto_manual(self, action: bool): ...
|
|
||||||
def r_reduced_mode(self, action: bool): ...
|
|
||||||
def r_switch_safe_region(self, idx: int, enable: bool): ...
|
|
||||||
@property
|
|
||||||
def w_alarm_state(self): ...
|
|
||||||
@property
|
|
||||||
def w_sta_collision(self): ...
|
|
||||||
@property
|
|
||||||
def w_sta_collision_alarm(self): ...
|
|
||||||
@property
|
|
||||||
def w_sta_collision_open(self): ...
|
|
||||||
@property
|
|
||||||
def w_controller_is_running(self): ...
|
|
||||||
@property
|
|
||||||
def w_encoder_low_battery(self): ...
|
|
||||||
@property
|
|
||||||
def w_sta_error_code(self): ...
|
|
||||||
@property
|
|
||||||
def w_sta_estop(self): ...
|
|
||||||
@property
|
|
||||||
def w_sta_heartbeat(self): ...
|
|
||||||
@property
|
|
||||||
def w_sta_home(self): ...
|
|
||||||
@property
|
|
||||||
def w_sta_motor(self): ...
|
|
||||||
@property
|
|
||||||
def w_sta_operation_mode(self): ...
|
|
||||||
@property
|
|
||||||
def w_sta_program(self): ...
|
|
||||||
@property
|
|
||||||
def w_sta_program_full(self): ...
|
|
||||||
@property
|
|
||||||
def w_sta_program_not_run(self): ...
|
|
||||||
@property
|
|
||||||
def w_sta_program_reset(self): ...
|
|
||||||
@property
|
|
||||||
def w_sta_program_speed(self): ...
|
|
||||||
@property
|
|
||||||
def w_sta_reduce_mode(self): ...
|
|
||||||
@property
|
|
||||||
def w_sta_robot_is_busy(self): ...
|
|
||||||
@property
|
|
||||||
def w_sta_robot_is_moving(self): ...
|
|
||||||
@property
|
|
||||||
def w_safe_door_state(self): ...
|
|
||||||
@property
|
|
||||||
def w_sta_safe_jnt_pos(self): ...
|
|
||||||
@property
|
|
||||||
def w_sta_soft_estop(self): ...
|
|
||||||
@property
|
|
||||||
def w_sta_safe_region(self): ...
|
|
||||||
@property
|
|
||||||
def w_sta_on_path(self): ...
|
|
||||||
@property
|
|
||||||
def w_sta_near_path(self): ...
|
|
||||||
@property
|
|
||||||
def w_sta_cart_pose(self) -> list: ...
|
|
||||||
@property
|
|
||||||
def w_sta_cart_vel(self) -> list: ...
|
|
||||||
@property
|
|
||||||
def w_sta_jnt_pose(self) -> list: ...
|
|
||||||
@property
|
|
||||||
def w_sta_jnt_vel(self) -> list: ...
|
|
||||||
@property
|
|
||||||
def w_sta_tcp_pose(self) -> list: ...
|
|
||||||
@property
|
|
||||||
def w_sta_tcp_vel(self) -> list: ...
|
|
||||||
@property
|
|
||||||
def w_sta_tcp_vel_mag(self): ...
|
|
||||||
def io_write_coils(self, addr, value: bool): ...
|
|
||||||
def io_read_coils(self): ...
|
|
||||||
def io_read_discretes(self): ...
|
|
||||||
|
|
||||||
class EcRequest:
|
|
||||||
c: socket.socket
|
|
||||||
exec_desc: str
|
|
||||||
def __init__(self) -> None: ...
|
|
||||||
def sock_conn(self) -> None: ...
|
|
||||||
def sr_string(self, directive, description, more_desc: str = ''): ...
|
|
||||||
def s_string(self, directive: str): ...
|
|
||||||
def r_string(self): ...
|
|
||||||
def motor_on(self): ...
|
|
||||||
def motor_off(self): ...
|
|
||||||
def pp_to_main(self): ...
|
|
||||||
def program_start(self): ...
|
|
||||||
def program_stop(self): ...
|
|
||||||
def clear_alarm(self): ...
|
|
||||||
def switch_operation_auto(self): ...
|
|
||||||
def switch_operation_manual(self): ...
|
|
||||||
def open_drag_mode(self): ...
|
|
||||||
def close_drag_mode(self): ...
|
|
||||||
def get_project_list(self): ...
|
|
||||||
def get_current_project(self): ...
|
|
||||||
def load_project(self, project_name): ...
|
|
||||||
def estop_reset(self): ...
|
|
||||||
def estopreset_and_clearalarm(self): ...
|
|
||||||
def motoron_pp2main_start(self): ...
|
|
||||||
def motoron_start(self): ...
|
|
||||||
def pause_motoroff(self): ...
|
|
||||||
def set_program_speed(self, speed: int = 20): ...
|
|
||||||
def set_soft_estop(self, enable: str): ...
|
|
||||||
def switch_auto_motoron(self): ...
|
|
||||||
def open_safe_region(self, number: int): ...
|
|
||||||
def close_safe_region(self, number: int): ...
|
|
||||||
def open_reduced_mode(self): ...
|
|
||||||
def close_reduced_mode(self): ...
|
|
||||||
def setdo_value(self, do_name: str, do_value: str): ...
|
|
||||||
def set_robot_time(self, robot_time: str = ...): ...
|
|
||||||
@property
|
|
||||||
def motor_on_state(self): ...
|
|
||||||
@property
|
|
||||||
def robot_running_state(self): ...
|
|
||||||
@property
|
|
||||||
def estop_state(self): ...
|
|
||||||
@property
|
|
||||||
def operation_mode(self): ...
|
|
||||||
@property
|
|
||||||
def home_state(self): ...
|
|
||||||
@property
|
|
||||||
def fault_state(self): ...
|
|
||||||
@property
|
|
||||||
def collision_state(self): ...
|
|
||||||
@property
|
|
||||||
def task_state(self): ...
|
|
||||||
@property
|
|
||||||
def get_cart_pos(self): ...
|
|
||||||
@property
|
|
||||||
def get_joint_pos(self): ...
|
|
||||||
@property
|
|
||||||
def get_joint_vel(self): ...
|
|
||||||
@property
|
|
||||||
def get_joint_trq(self): ...
|
|
||||||
@property
|
|
||||||
def reduced_mode_state(self): ...
|
|
||||||
def get_io_state(self, io_list: str): ...
|
|
||||||
@property
|
|
||||||
def alarm_state(self): ...
|
|
||||||
@property
|
|
||||||
def collision_alarm_state(self): ...
|
|
||||||
@property
|
|
||||||
def collision_open_state(self): ...
|
|
||||||
@property
|
|
||||||
def controller_is_running(self): ...
|
|
||||||
@property
|
|
||||||
def encoder_low_battery_state(self): ...
|
|
||||||
@property
|
|
||||||
def robot_error_code(self): ...
|
|
||||||
@property
|
|
||||||
def rl_pause_state(self): ...
|
|
||||||
@property
|
|
||||||
def program_reset_state(self): ...
|
|
||||||
@property
|
|
||||||
def program_speed_value(self): ...
|
|
||||||
@property
|
|
||||||
def robot_is_busy(self): ...
|
|
||||||
@property
|
|
||||||
def robot_is_moving(self): ...
|
|
||||||
@property
|
|
||||||
def safe_door_state(self): ...
|
|
||||||
@property
|
|
||||||
def soft_estop_state(self): ...
|
|
||||||
@property
|
|
||||||
def get_cart_vel(self): ...
|
|
||||||
@property
|
|
||||||
def get_tcp_pos(self): ...
|
|
||||||
@property
|
|
||||||
def get_tcp_vel(self): ...
|
|
||||||
@property
|
|
||||||
def get_tcp_vel_mag(self): ...
|
|
||||||
@property
|
|
||||||
def ext_estop_state(self): ...
|
|
||||||
@property
|
|
||||||
def hand_estop_state(self): ...
|
|
||||||
@property
|
|
||||||
def sta_on_path(self): ...
|
|
||||||
@property
|
|
||||||
def sta_near_path(self): ...
|
|
||||||
|
|
||||||
class PreDos:
|
|
||||||
def __init__(self) -> None: ...
|
|
||||||
def push_prj_to_server(self, prj_file: str): ...
|
|
||||||
def pull_prj_from_server(self, prj_name: str, local_prj_path: str): ...
|
|
||||||
def push_file_to_server(self, local_file: str, server_file: str): ...
|
|
||||||
def pull_file_from_server(self, server_file: str, local_file: str): ...
|
|
||||||
|
|
||||||
class RobotInit:
|
|
||||||
hr: HmiRequest
|
|
||||||
pd: PreDos
|
|
||||||
conf_path: str
|
|
||||||
def __init__(self, hr: HmiRequest, pd: PreDos, conf_path: str = '') -> None: ...
|
|
||||||
def robot_init(self) -> None: ...
|
|
||||||
def fw_updater(self, fw_file: str): ...
|
|
||||||
|
|
||||||
class UpgradeRequest:
|
|
||||||
c: socket.socket
|
|
||||||
def __init__(self) -> None: ...
|
|
||||||
def sock_conn(self) -> None: ...
|
|
||||||
def s_pkg(self, command: dict): ...
|
|
||||||
def r_pkg(self): ...
|
|
||||||
def sr_pkg(self, command: dict): ...
|
|
||||||
def erase_cfg(self) -> None: ...
|
|
||||||
def clear_rubbish(self) -> None: ...
|
|
||||||
def soft_reboot(self) -> None: ...
|
|
||||||
def version_query(self) -> None: ...
|
|
||||||
def robot_reboot(self) -> None: ...
|
|
||||||
def backup_origin(self) -> None: ...
|
|
||||||
def origin_recovery(self) -> None: ...
|
|
||||||
|
|
||||||
class PlotTrajectory:
|
|
||||||
hr: HmiRequest
|
|
||||||
md: ModbusRequest
|
|
||||||
curve_name: str
|
|
||||||
prj_name: str
|
|
||||||
tasks: list
|
|
||||||
def __init__(self, hr: HmiRequest, md: ModbusRequest, prj_name: str, tasks: list, curve_name: str = 'hw_cart_pos_feedback_tcp_in_world') -> None: ...
|
|
||||||
def draw_traj(self) -> None: ...
|
|
Reference in New Issue
Block a user