MCPcopy Create free account
hub / github.com/SHAILAB-IPEC/OpenFly-Platform / __init__

Method __init__

train/eval.py:127–154  ·  view source on GitHub ↗
(self, ue_ip, ue_port, env_name)

Source from the content-addressed store, hash-verified

125
126class UEBridge:
127 def __init__(self, ue_ip, ue_port, env_name):
128 self.kill_failed_process()
129 time.sleep(10)
130
131 # port = self.find_available_port()
132
133 port = random.randint(9000, 9100)
134 print(f"Available port: {port}")
135 self.modify_port_in_ini(port, env_name)
136 ue_port = port
137
138 self.env_name = env_name
139 self._sim_thread = threading.Thread(target=self._init_ue_sim)
140 self._sim_thread.start()
141 time.sleep(15)
142
143 self._client = Client((ue_ip, ue_port))
144 self._connection_check()
145
146 self._camera_init()
147
148 # self._drone_init()
149 self.distance_to_goal = []
150 self.spl = []
151 self.success = []
152 self.traj_len = 0
153 self.pass_len = 1e-3
154 self.osr = []
155
156 def print_info(self):
157 print(f"SR: {self.success[-1]}, OSR: {self.osr[-1]}, NE: {self.distance_to_goal[-1]}, SPL: {self.spl[-1]}")

Callers

nothing calls this directly

Calls 5

kill_failed_processMethod · 0.95
modify_port_in_iniMethod · 0.95
_connection_checkMethod · 0.95
_camera_initMethod · 0.95
ClientClass · 0.85

Tested by

no test coverage detected