Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/subsystems/navigation/aruco_bt/aruco_bt/aruco_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ def __init__(self):

aruco_dict = cv2.aruco.getPredefinedDictionary(cv2.aruco.DICT_4X4_50)
aruco_params = cv2.aruco.DetectorParameters()

# Tightening up parameters to reduce false positives
aruco_params.minMarkerPerimeterRate = 0.04 # rejects markers that are too small, default 0.03
aruco_params.maxMarkerPerimeterRate = 2.0 # rejects markers that are too large, default 4.0
aruco_params.polygonalApproxAccuracyRate = 0.02 # controls how loosely the detected contour is approximated to a quadrilateral, default 0.03
aruco_params.errorCorrectionRate = 0.4 # controls how much error correction is applied, default 0.6

self.aruco_detector_ = cv2.aruco.ArucoDetector(aruco_dict, aruco_params)

self.tf_buffer_ = tf2_ros.Buffer()
Expand Down
Loading