This commit is contained in:
aarizona 2024-10-11 14:27:05 +03:00
parent fa776c91d2
commit 4b04411c20
1 changed files with 25 additions and 16 deletions

View File

@ -133,7 +133,9 @@ class SocketRobotArm:
+ [self.set_physical_speed(False), self.set_output_laser(False)] + [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.config(text=f"Отправка данных...")
self.tkinter_info_label.pack() self.tkinter_info_label.pack()
@ -262,7 +264,11 @@ class SocketRobotArm:
"ckStatus": "0x3F", "ckStatus": "0x3F",
} }
if type == "line" or type == "free": if type == "line" or type == "free":
if type == "line":
pairs = zip(self.start_world_coordinates, point) 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] m0, m1, m2, m3, m4, m5 = [round(sum(i), 3) for i in pairs]
if type == "line": if type == "line":
step.update({"action": "10"}) step.update({"action": "10"})
@ -325,21 +331,24 @@ class SocketRobotArm:
for item in data: for item in data:
prep[item[:1]] = float(item[1:]) prep[item[:1]] = float(item[1:])
result.append( pj = list(
self.make_world_step(
"free",
self.convert_to_joint( self.convert_to_joint(
( (
prep.get("X", 0), prep.get("X", 0),
prep.get("Y", 0), prep.get("Y", 0),
prep.get("Z", 0), prep.get("Z", 0),
# prep.get("U", 0),
# prep.get("V", 0),
# prep.get("W", 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 return result
def steps_from_file(self): def steps_from_file(self):