# Apriltag as a reference cordinate

Source: https://forum.modalai.com/topic/4118/apriltag-as-a-reference-cordinate
Category: Autonomy: VIO, Mapping and Navigation (https://forum.modalai.com/category/19/autonomy-vio-mapping-and-navigation)
Tags: apriltag
Posted: 2025-01-24 13:03:39 UTC by Amin Bassiri
Replies: 4 · Views: 3517

## Amin Bassiri · 2025-01-24 13:03:39 UTC

Hello,

I would like to use apriltag as a reference (0, 0, 0). I mean, for example, when the drone detects the tag, show it in the "T_imu_wrt_vio (m)" (0, 0, 0) coordinate. 
How can I do that? 

Drone Model: RB5
Hardware Version: M0052
VOXL-Suite Version: 1.1.2
PX4 Version: 1.14.0dev

Thanks,
Amin

## Reply by Amin Bassiri · 2025-01-31 12:23:23 UTC

@Amin-Bassiri could you please someone answering my question.

## Reply by Alex Kushleyev (ModalAI staff) · 2025-02-07 19:46:57 UTC (in reply to Amin Bassiri)

@Amin-Bassiri , can you please clarify the question?

The april tag detector detects the tag in the camera frame and using extrinsics file, the tag's coordinate can be converted into the vehicle's reference frame.

With that in mind, what would you like to do? What is unclear to me is the following statement : "show it in the "T_imu_wrt_vio (m)" (0, 0, 0) coordinate"

Alex

## Reply by Amin Bassiri · 2025-02-11 09:38:14 UTC (in reply to Alex Kushleyev)

@Alex-Kushleyev 

I have an RB5 drone that I plan to fly indoors, but I require very accurate localization. For this purpose, I need a fixed reference coordinate system. For example, I want to designate point A (associated with Apriltag0) as (X=0, Y=0, Z=0). This means that even if the drone flies away and later returns to point A, once it detects the AprilTag, its coordinates should reset exactly to (0, 0, 0) without any error.
Since I plan to fly the drone multiple times along a route from point A to point B and back to point A, I need the system to reliably reset the drone’s position to (0, 0, 0) whenever it sees Apriltag0—even if there are slight changes in the tag's position. 
How can I achieve this using the AprilTag as a reference coordinate?
I want to reset T_imu_wrt_vio  to 0,0,0, when the drone detect the Apriltag.![Screenshot from 2025-02-11 10-34-36.png](https://forum.modalai.com/assets/uploads/files/1739266671681-screenshot-from-2025-02-11-10-34-36.png)

## Reply by Amin Bassiri · 2025-02-11 13:03:40 UTC

Problem solved, 
Thanks anyway
