This commit is contained in:
NikolajDanger
2022-09-28 14:02:18 +02:00
parent 0cb11b5264
commit 13bde48720

View File

@ -50,10 +50,9 @@ def find_arucos(arlo):
print(f"found box {id_}")
position = cv2.aruco.estimatePoseSingleMarkers(
np.array([aruco]), 14.5, CAMERA_MATRIX, DIST_COEF
)
)[1][0][0]
print(position)
exit()
position = np.array([position[0], position[1]])
position = np.array([position[1], position[0]])
position[0] += 22.5
print(id_, position)
aruco_dict[id_] = position
@ -77,7 +76,7 @@ def main():
np.average(aruco_positions[:,1])
]
angle = np.rad2deg(np.arctan(position[0]/position[1]))
angle = np.rad2deg(np.arctan(position[1]/position[0]))
drive_distance = np.sqrt(position[0]**2 + position[1]**2)
if angle < 0:
arlo.go_diff(POWER, POWER, 0, 1)