Using optional AprilTags
With any robot, precise navigation and localization are crucial for the effective operation of autonomous systems. AprilTags, a simple type of fiducial marker system, have emerged as a reliable and efficient solution for enhancing robotic guidance. These visual markers, easily detected and recognized by a camera, provide valuable positional information that can be utilized to guide robots with high accuracy.
Not all environments require the use of AprilTags – they are an option in MARC 5 Series robots to offer an option for those using MARC in environments that are challenging to map consistently.
AprilTags are a form of two-dimensional barcodes designed for reliable detection and identification by computer vision systems. They consist of a black-and-white square grid with a unique pattern that encodes a specific identifier. This identifier can be decoded by a camera and associated algorithms to determine the tag's position and orientation relative to the camera's viewpoint. The simplicity and robustness of AprilTags make them ideal for various applications in robotics and automation.
Starting with the MARC 5 Series products, the functions needed for AprilTags use are included in the hardware (3D cameras) and software. While there are specific requirements for using AprilTags, the system is ready to go. AprilTags can help MARC localize in environments that are challenging to keep aligned.
Though everyone’s facilities and situations are different, here are some areas where AprilTags shine:
- Highly dynamic environments with few static objects in the area.
- Areas that are very similar to other areas – for example the aisles in a warehouse.
- Areas where the drive wheels may slip regularly – extremely dusty or wet areas, for example.
- Other environmental areas where MARC carts appear to be getting ‘lost’ with consistency.
AprilTags are visual markers that consist of a unique black and white pattern that cameras can easily recognize and use to determine the tag's 3D position and orientation in relation to the camera.
How AprilTags work:
- Tag Detection: Cameras identify the unique black and white pattern of an AprilTag.
- Pose Estimation: The software uses the pattern to calculate the tag's 3D position and orientation relative to the camera, including angle and distance.
- Localization/Navigation: By knowing the tag's position and the camera's position, the robot can quickly calculate its own position and orientation more accurately.
Benefits of Using AprilTags:
- Accuracy: when mounted properly, AprilTags provide accurate and reliable pose estimation.
- Simplicity: The system is relatively easy to implement and use.
- Flexibility: AprilTags can be used in a wide range of applications.
- Real-time Processing: They allow for fast and efficient detection and processing.
AprilTags must be affixed to static, fixed objects so that their location is consistent. If tags are printed on flimsy material, are moved around or are blocked from view, they can be ineffective.
MARC uses AprilTags to assist with:
- Mapping
AprilTags can assist in the mapping process (while in Active Map Mode) when programming a path. For example, if an AprilTag is located at the start, then when MARC is pushed back to the start area and sees the AprilTag for a second time it will more accurately align the map.
- Navigation
MARC carts can use AprilTags placed in the environment to navigate predefined paths or avoid obstacles. By continuously detecting and decoding the tags, MARC can adjust trajectories and ensure accurate movement.
- Localization
AprilTags can serve as landmarks for MARC to determine the current precise location within an environment. This allows MARC to continuously realign its map to the environment precisely.
Since environments can vary infinitely, AprilTag capabilities offer an additional tool to keep MARC moving efficiently and offering the best possible return on your investment.
ENABLING AprilTags with MARC's Software
To integrate AprilTags with the robot's control system, follow these steps:
- Log in to your MARC cart's Web User Interface. Directions for this can be found in the MARC User's Guide, in the section "Accessing MARC's Web User Interface".
- Once logged in to the Web User Interface, you will see the section labelled "Enabled AprilTags". Note that each individual AprilTag you plan to use must be enabled by number to let MARC know to look for and use that specific tag.
- Once the 'enabled' box is checked for a specific tag number, that tag will be recognized by MARC carts. Note that you can use the same tag for more than one MARC unit, and different MARC units can have different tags enabled.
- Please follow the guidelines and best practices outlined below.
You can also view this video on implementing AprilTags in MARC's software:

Best Practices for Implementing AprilTags
While AprilTags offer significant advantages in robotic guidance, certain challenges and considerations must be addressed:
- To be effective, tags require that they be very flat (for example against a surface) and securely mounted to prevent bending, twisting or other distortions.
- All tags must remain clean and without blemishes or smears that change the overall pattern.
- Steer clear of areas where other dynamic or static objects might block the camera's view of the tags. In order to help MARC navigate, tags must be visible to the 3D cameras front and back.
- Lighting Conditions: Variations in lighting can affect the detection accuracy of AprilTags. Ensuring consistent and adequate lighting is crucial for reliable performance.
- Tag Placement: The placement of AprilTags within the environment should be carefully planned to ensure they are within the camera's field of view and not obscured by obstacles.
- Tag Positioning: When considering the areas where MARC will see the AprilTag placards, consider how they can be closest to the center of the cameras view, and as close as possible to perpendicular to a line from the camera to the placard. The 'flatter' the camera sees the AprilTag, the better.
View of camera field of view from above:

- Same goes for vertical height: for optimal effectivity, AprilTag placards should be mounted below 60cm/40" for the highest visibility. Note that this maximum is measured from the floor to the top of the placard.

- Each time an AprilTag is recognized the audio cue “LandMARC detected” is played, the lack of this audio cue playing would indicate the AprilTag was not detected as expected. This is a handy way to verify that a tag has been implemented correctly.
- In certain more complex scenarios, MARC carts can benefit from multiple AprilTags within view of a camera simultaneously. For example, using multiple tags would be recommended for an area prone to MARC carts becoming 'lost' (mis-localized) even when a single AprilTag is present.
Potential Environmental Challenges
While AprilTags offer significant advantages in robotic guidance, certain challenges and considerations must be addressed:
- Lighting Conditions: While the high contrast of the codes is helpful, variations in lighting can affect the detection accuracy of AprilTags. Ensuring adequate lighting is crucial for reliable performance. This would include conditions that are too bright (for example sunlight shining through a skylight onto an AprilTag) as well as too dim or dark.
- Tag Placement: The placement of AprilTags within the environment should be carefully planned to ensure they are within the camera's field of view and not obscured by obstacles.
- Temporary Objects: In highly dynamic environments, items may be left in areas that they are not normally in. It's important that workers in the robots' area of operation understand not to leave items blocking the cart's view of the AprilTag placards.
To order a set of plastic AprilTag placards, please visit our online shop.