# Retrieving Apriltag offset from MAV local frame offset

Source: https://forum.modalai.com/topic/4074/retrieving-apriltag-offset-from-mav-local-frame-offset
Category: General Questions (https://forum.modalai.com/category/2/general-questions)
Posted: 2025-01-08 22:21:44 UTC by JoeAR_21
Replies: 2 · Views: 604

## JoeAR_21 · 2025-01-08 22:21:44 UTC

Re: [Fixed frame pose MPA to ROS](/topic/2041/fixed-frame-pose-mpa-to-ros)

Similar to the various above threads, I am trying to figure out if there already exists some way of getting the detected April tag's offset relative the the MAV's local frame  (for reference I'm using the frame that /mavros/local_position/pose provides).  I'm unsure of how I can achieve this aside from manually piping and shifting through the data outputted by the voxl-inspect-tags command and converting into a ROS Pose.  Do let me know if there already exists a method for accomplishing this or if there would be an easier way to retrieve this offset into a ROS pose.

For reference I am using a Starling with VOXL2 and system image: 1.7.6 

My goal is to visualize the position of the drone relative to the detected April tag for accurate position targeting.

## Reply by Moderator (ModalAI staff) · 2025-01-09 23:31:46 UTC

@JoeAR_21 to correct VIO drift, voxl-vision-hub can correct using an AprilTag without any ROS involvement. If you just need to send the data to ROS for another purpose, you should extend voxl-mpa-to-ros to support tag detections

Source: https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-mpa-to-ros/-/tree/master/catkin_ws/src/src/interfaces?ref_type=heads

We love incorporating merge requests if you do end up with something useful!

## Reply by JoeAR_21 · 2025-02-15 02:24:16 UTC (in reply to Moderator)

@Moderator said in [Retrieving Apriltag offset from MAV local frame offset](/post/20396):
> We love incorporating merge requests if you do end up with something useful!
> 
> Reply

I've made a quick fix here for anyone looking for it, ill try to make a merge request/real fix for it soon

https://github.com/Joe1Ontiveros/ApriltagPublisher_Starling
