|
|
@ -89,7 +89,7 @@ class Hexapod(Thread):
|
|
|
|
self.leg_0 = Leg(0,
|
|
|
|
self.leg_0 = Leg(0,
|
|
|
|
[self.pca_left.servo[15], self.pca_left.servo[2],
|
|
|
|
[self.pca_left.servo[15], self.pca_left.servo[2],
|
|
|
|
self.pca_left.servo[1]],
|
|
|
|
self.pca_left.servo[1]],
|
|
|
|
correction=[4, 4, 4])
|
|
|
|
correction=[4, 6, 2])
|
|
|
|
# center right
|
|
|
|
# center right
|
|
|
|
self.leg_1 = Leg(1,
|
|
|
|
self.leg_1 = Leg(1,
|
|
|
|
[self.pca_left.servo[7], self.pca_left.servo[8],
|
|
|
|
[self.pca_left.servo[7], self.pca_left.servo[8],
|
|
|
@ -99,22 +99,22 @@ class Hexapod(Thread):
|
|
|
|
self.leg_2 = Leg(2,
|
|
|
|
self.leg_2 = Leg(2,
|
|
|
|
[self.pca_left.servo[0], self.pca_left.servo[14],
|
|
|
|
[self.pca_left.servo[0], self.pca_left.servo[14],
|
|
|
|
self.pca_left.servo[13]],
|
|
|
|
self.pca_left.servo[13]],
|
|
|
|
correction=[8, 6, -1])
|
|
|
|
correction=[2, 8, -1])
|
|
|
|
# rear left
|
|
|
|
# rear left
|
|
|
|
self.leg_3 = Leg(3,
|
|
|
|
self.leg_3 = Leg(3,
|
|
|
|
[self.pca_right.servo[15], self.pca_right.servo[1],
|
|
|
|
[self.pca_right.servo[15], self.pca_right.servo[1],
|
|
|
|
self.pca_right.servo[2]],
|
|
|
|
self.pca_right.servo[2]],
|
|
|
|
correction=[-5, 8, -6])
|
|
|
|
correction=[-3, 10, -8])
|
|
|
|
# center left
|
|
|
|
# center left
|
|
|
|
self.leg_4 = Leg(4,
|
|
|
|
self.leg_4 = Leg(4,
|
|
|
|
[self.pca_right.servo[7], self.pca_right.servo[6],
|
|
|
|
[self.pca_right.servo[7], self.pca_right.servo[6],
|
|
|
|
self.pca_right.servo[8]],
|
|
|
|
self.pca_right.servo[8]],
|
|
|
|
correction=[-8, 2, -1])
|
|
|
|
correction=[-6, 2, -4])
|
|
|
|
# front left
|
|
|
|
# front left
|
|
|
|
self.leg_5 = Leg(5,
|
|
|
|
self.leg_5 = Leg(5,
|
|
|
|
[self.pca_right.servo[0], self.pca_right.servo[13],
|
|
|
|
[self.pca_right.servo[0], self.pca_right.servo[13],
|
|
|
|
self.pca_right.servo[14]],
|
|
|
|
self.pca_right.servo[14]],
|
|
|
|
correction=[0, 0, -8])
|
|
|
|
correction=[0, 0, -10])
|
|
|
|
|
|
|
|
|
|
|
|
# self.leg_0.reset(True)
|
|
|
|
# self.leg_0.reset(True)
|
|
|
|
# self.leg_1.reset(True)
|
|
|
|
# self.leg_1.reset(True)
|
|
|
@ -150,7 +150,7 @@ class Hexapod(Thread):
|
|
|
|
# self.leg_0.set_angle(1, 30)
|
|
|
|
# self.leg_0.set_angle(1, 30)
|
|
|
|
|
|
|
|
|
|
|
|
# for mm in range(0, 10):
|
|
|
|
# for mm in range(0, 10):
|
|
|
|
# self.move(self.forward_path, 0.005)
|
|
|
|
self.move(self.forward_path)
|
|
|
|
# for mm in range(0, 10):
|
|
|
|
# for mm in range(0, 10):
|
|
|
|
# self.move(self.backward_path, 0.005)
|
|
|
|
# self.move(self.backward_path, 0.005)
|
|
|
|
# for mm in range(0, 10):
|
|
|
|
# for mm in range(0, 10):
|
|
|
|