Overview

AprilTags are a type of fiducial marker that can be used to achieve sub-millimeter precision. When using AprilTags, we recommend using large 36h11 tags printed on quality paper.

Almond Bot’s vision system is capable of detecting AprilTags and moving with respect to them.

Detect AprilTags that are in the camera’s field of view.


tags = await bot.detect_april_tags()

the returned tags are a list of AprilTag objects which contain the following fields:

  • id: The ID of the tag
  • pose: The pose of the tag
  • center: The center of the tag
  • corners: The corners of the tag

You can use the pose field to move the robot with respect to the tag.


first_tag = tags[0]

# Move to the center of the tag
await bot.align_with_apriltag(first_tag.id)

# Move 10mm to the right of the tag
await bot.align_with_apriltag(first_tag.id, offset=Pose(x=10))