✨
This commit is contained in:
@ -51,10 +51,8 @@ def find_arucos(arlo):
|
|||||||
position = cv2.aruco.estimatePoseSingleMarkers(
|
position = cv2.aruco.estimatePoseSingleMarkers(
|
||||||
np.array([aruco]), 14.5, CAMERA_MATRIX, DIST_COEF
|
np.array([aruco]), 14.5, CAMERA_MATRIX, DIST_COEF
|
||||||
)[1][0][0]
|
)[1][0][0]
|
||||||
print(position)
|
|
||||||
position = np.array([position[2], position[0]])
|
position = np.array([position[2], position[0]])
|
||||||
position[0] += 22.5
|
position[0] += 22.5
|
||||||
print(position)
|
|
||||||
aruco_dict[id_] = position
|
aruco_dict[id_] = position
|
||||||
|
|
||||||
if len(aruco_dict) >= 2:
|
if len(aruco_dict) >= 2:
|
||||||
@ -70,6 +68,7 @@ def find_arucos(arlo):
|
|||||||
def main():
|
def main():
|
||||||
arlo = Robot()
|
arlo = Robot()
|
||||||
aruco_positions = find_arucos(arlo)
|
aruco_positions = find_arucos(arlo)
|
||||||
|
print(aruco_positions)
|
||||||
|
|
||||||
position = [
|
position = [
|
||||||
np.average(aruco_positions[:,0]),
|
np.average(aruco_positions[:,0]),
|
||||||
|
Reference in New Issue
Block a user