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

    Where is apriltag relocalization used in control error signal?

    Ask your questions right here!
    1
    2
    237
    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.
    • PawelJP
      PawelJ
      last edited by

      I am working on updating the positions of a custom path in vvpx4 so that it is updated to be offset by the current position prior to switching to offboard mode. At first I have been using T_body_wrt_local from the vio_manager.c, but I notice that this value does not get changed with april tag detections. Following the chain, I see...
      --> the tag_manager calls geometry when we detect new tags and have the correct config values set here
      --> we get our updated transform from the pose_filter, that updates the pointer to filter_local_to_fixed with what we calculted as new_T_local_wrt_fixed, which I believe is the new drone state I want to use, set here
      --> global variables get updated with rc_pose_filter_fetch where the pointer to T_local_wrt_fixed gets overwritten with the value we just pushed to the filter_local_to_fixed, here

      Now when we get the drone state from the vio_manager it only calls geometry_get_T_body_wrt_local, and I do not see where the drones state is updated with the new april tag offset. This could just be a misunderstanding on my part in how the system should work. The way I expect it to work is that the drone initializes it's state to be relative to starting position as the origin. This sets the global frame and is the reference frame the pixhawk expects drone state and targets to be set in. If this were the case, I would expect this to shift the state of the drone when a tag is detected (probably with some filtering on the px4 side that I'm also missing, to avoid the dicsontinuous jump in position). However, it appears that the drone state is set with geometry_get_T_body_wrt_local, and not the new fixed frame set by the april tag.

      Can you please clarify:

      1. Where does the april tag localization change the drone position being sent to the pixhawk to affect the error signal of target-position? I will need to use this position so I can correctly offset my path starting point
      2. Does the px4 expect path in the same reference frame as vio state (ie position in world coordinates, velocities in body frame?)
      1 Reply Last reply Reply Quote 0
      • PawelJP
        PawelJ
        last edited by

        1. Where does the april tag localization change the drone position being sent to the pixhawk to affect the error signal of target-position? I will need to use this position so I can correctly offset my path starting point

        The setpoints are are sent to uart_mavlink.c where they are transformed by
        geometry_transform_fixed_setpoints_to_local where the april tag transformation matrix is used to convert from fixed to local frame, which is sent off to the pixhawk. If no april tags are used local_frame == fixed_frame

        1. Does the px4 expect path in the same reference frame as vio state (ie position in world coordinates, velocities in body frame?)
        • px4 expects setpoints in local frame, but offboard figure eight assumes they are set in fixed frame (see above).

        Please correct me if I am wrong here.

        Cheers

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