work ok
This commit is contained in:
parent
fa776c91d2
commit
4b04411c20
|
@ -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":
|
||||||
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]
|
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(
|
self.convert_to_joint(
|
||||||
"free",
|
(
|
||||||
self.convert_to_joint(
|
prep.get("X", 0),
|
||||||
(
|
prep.get("Y", 0),
|
||||||
prep.get("X", 0),
|
prep.get("Z", 0),
|
||||||
prep.get("Y", 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):
|
||||||
|
|
Loading…
Reference in New Issue