MeanLocalizationStrategy

class MeanLocalizationStrategy : public ILocalizationStrategy

For each tag in a given camera, only use the tag pose that has the lowest error. Then, compute the average of each tag pose and use this as the filtered_pose. This method is the default strategy for localization.

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.