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

    Home position offset in offboard flight

    VOXL m500 Reference Drone
    1
    2
    263
    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

      In vvpx4 I am trying to update the offboard_figure_eight script so that before switching to offboard mode, the home position gets set to the current drone position, and the path gets offset so that it is centered about the current drone state. As a preliminary step I changed the _send_position_in_path function to send the home position instead. I have been using T_body_wrt_local from the vio_manager, after making it externally accessible, but there still seems to be some offset I can't account for that moves the drone along -x and -y from what should be the home position (current state at the time of switch to offboard). Is there a different reference frame I should be using? I noticed that there is a T_body_wrt_fixed that is updated by the apriltag_manager and fixed_pose_input, but this seems to be accounted for in the uart_mavlink_send_fixed_setpoint function that the path waypoints get sent to. Can you please clear up what reference frame would be the correct drone state to use to set my home position to? The current goal is to have the drone hover where it is when it switches to offboard mode, and once this is working, using that same home position to offset the figure8 path, which is centered about the origin by default.

      1 Reply Last reply Reply Quote 0
      • PawelJP
        PawelJ
        last edited by

        I've gone further down the rabbit hole and see now that the tag detections update the fixed frame, as does the fixed_pose_input sink, which as far as I can tell does not get used and is setup for alternative fixed frame references. I also see now that the setpoints get converted in the uart_mavlink.c file from fixed to local frame, and when no april tags are used this keeps the value the same. This being said, it seems that, when april tags are not used, the setpoints and the vio position are both set in local frame. If I am understanding this correctly, I should be able to set my home position to T_body_wrt_local before sending the home position as a setpoint in offboard mode, but the drone seems to always move to some other location. Can you please clarify what my misunderstaning is in this case, if any?

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