ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    AprilTag Localization and landing

    Ask your questions right here!
    2
    4
    143
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      Rupesh
      last edited by

      Hi,
      I'm using Starling 2 Max drone. I'm trying to localize the drone with AprilTag. I followed all the instructions from the ModalAI documentation, but cannot get it to work. I feel like the instructions for Relocalization are incomplete. The voxl-inspect-tags is working perfectly, and voxl-inspect-services also shows everything working. I also changed the offboard mode to "follow_tag" as shown in the figure below. Can anyone help me with how to proceed? Or i must use docker and run the script file? If so, is offboard_follow_tag.c safe to use? Because the documentation says "offboard_follow_tag.c: (may be outdated and no longer functional)".
      64bf53f2-71eb-4573-9bba-b45c5c6ce387-Screenshot 2025-09-24 184013.jpg
      bccd8a7f-cbb8-4df7-8214-be69c78b5b0e-Screenshot 2025-09-24 185439.png

      A 2 Replies Last reply Reply Quote 0
      • A
        ApoorvThapliyal @Rupesh
        last edited by

        @Rupesh Thanks for your question. Our subject matter expert is currently unavailable, but we will review this and get back to you within a few days.

        1 Reply Last reply Reply Quote 0
        • A
          ApoorvThapliyal @Rupesh
          last edited by

          @Rupesh What rotation matrix are you currently using in your tag_locations.conf?
          You can try setting it to:

          [[0, 1, 0],
          [0, 0, 1],
          [1, 0, 0]]
          Keep in mind that relocalization will only work reliably at certain viewing angles relative to the AprilTag. A good way to test is to rotate the tag and observe at which orientations voxl-vision-hub --debug_fixed_frame gives a value and not WARNING, apriltag roll/pitch out of bounds. Improvements are in progress to make this more robust across a wider range of angles.

          R 1 Reply Last reply Reply Quote 0
          • R
            Rupesh @ApoorvThapliyal
            last edited by

            @ApoorvThapliyal Thank you for your reply.
            I tried voxl-vision-hub --debug_fixed_frame while showing AprilTag to the tracking camera with different orientations, but got some warnings about qvio.
            682929b8-d9dd-49a6-b36a-b873d1f365d2-Screenshot 2025-10-03 182038.png
            Since this was a warning about qvio, I checked voxl-inspect-qvio, and it was working okay.

            Additionally, I wanted to integrate AprilTag Localization with voxl2_takeoff_land.py. Is it possible to make it work if I add the following code between the 'takeoff' and 'landing' commands?
            try:
            await drone.offboard.set_position_ned(PositionNedYaw(0, 0, -1.0, 0))
            await drone.offboard.start()
            except OffboardError as e:
            print(f"Offboard start failed: {e._result.result}")

            await asyncio.sleep(20)
            
            print("-- Stopping Offboard mode")
            try:
                await drone.offboard.stop()
            except OffboardError as e:
                print(f"Offboard stop failed: {e._result.result}")
            

            I tried to operate it without propellers and got the following logs in PX4.
            fecd98f3-682b-44e9-9c24-3cf7e95a5a9f-Screenshot 2025-10-03 183324.png
            The set points appear to be at the origin instead of those defined by AprilTag. Can you please help me with this?

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Powered by NodeBB | Contributors