KMeansLocalizationStrategy

class KMeansLocalizationStrategy : public ILocalizationStrategy

EXPERIMENTAL.

Choose the pose that the most tags agree with. Consider both possible pose locations for every visible tag. Only use unique tags per camera (i.e. only the newest tag if there are multiple detections of the same tag on the same camera)

NEW Cluster similar poses. Select the geometric mean of the cluster with the

  1. Most amount of points (?)

  2. Lowest error (?)

  1. Substantial # of points and lowest error (?)

Public Functions

virtual bool Compute(TagArray &fresh_poses, RobotPose &filtered_pose) override

Calculate the location of the robot in 3d space.

Parameters:
  • fresh_poses – An array of poses recently received from the cameras. More than one pose per tag per camera is likely to be received, as all possible poses per Apriltag are computed.

  • filtered_pose – The calculated location of the robot.

Returns:

true if at least one tag was used to calculate the filtered_pose of the robot. false if no tags were used to calculate the filtered_pose.