work ok
This commit is contained in:
parent
fa776c91d2
commit
4b04411c20
|
@ -106,7 +106,7 @@ class SocketRobotArm:
|
|||
self.tkinter_root.geometry("700x400")
|
||||
|
||||
self.tkinter_imitate.pack()
|
||||
self.tkinter_upd_model.pack()
|
||||
self.tkinter_upd_model.pack()
|
||||
|
||||
self.tkinter_start_cycle.pack(pady=20)
|
||||
self.tkinter_exit.pack(pady=20)
|
||||
|
@ -133,7 +133,9 @@ class SocketRobotArm:
|
|||
+ [self.set_physical_speed(False), self.set_output_laser(False)]
|
||||
)
|
||||
|
||||
# print(self.convert_file_to_join())
|
||||
print(self.convert_file_to_join())
|
||||
print(self.steps_from_file())
|
||||
|
||||
|
||||
self.tkinter_info_label.config(text=f"Отправка данных...")
|
||||
self.tkinter_info_label.pack()
|
||||
|
@ -262,7 +264,11 @@ class SocketRobotArm:
|
|||
"ckStatus": "0x3F",
|
||||
}
|
||||
if type == "line" or type == "free":
|
||||
pairs = zip(self.start_world_coordinates, point)
|
||||
if type == "line":
|
||||
pairs = zip(self.start_world_coordinates, point)
|
||||
if type == "free":
|
||||
pairs = zip(self.start_axis_coordinates, point)
|
||||
|
||||
m0, m1, m2, m3, m4, m5 = [round(sum(i), 3) for i in pairs]
|
||||
if type == "line":
|
||||
step.update({"action": "10"})
|
||||
|
@ -325,21 +331,24 @@ class SocketRobotArm:
|
|||
for item in data:
|
||||
prep[item[:1]] = float(item[1:])
|
||||
|
||||
result.append(
|
||||
self.make_world_step(
|
||||
"free",
|
||||
self.convert_to_joint(
|
||||
(
|
||||
prep.get("X", 0),
|
||||
prep.get("Y", 0),
|
||||
prep.get("Z", 0),
|
||||
# prep.get("U", 0),
|
||||
# prep.get("V", 0),
|
||||
# prep.get("W", 0),
|
||||
)
|
||||
),
|
||||
pj = list(
|
||||
self.convert_to_joint(
|
||||
(
|
||||
prep.get("X", 0),
|
||||
prep.get("Y", 0),
|
||||
prep.get("Z", 0),
|
||||
)
|
||||
)
|
||||
)
|
||||
pj.extend(
|
||||
[
|
||||
prep.get("U", 0),
|
||||
prep.get("V", 0),
|
||||
prep.get("W", 0),
|
||||
]
|
||||
),
|
||||
print(pj)
|
||||
result.append(self.make_world_step("free", tuple(pj)))
|
||||
return result
|
||||
|
||||
def steps_from_file(self):
|
||||
|
|
Loading…
Reference in New Issue