Clarification on px4 home position in vvpx4

  • Hello,

    Can you please clear up how the home position is used in vvpx4? I am looking at the offboard figure eight example and it seems to be sent the same way (same px4 function call uart_mavlink_send_fixed_setpoint, and struct mavlink_set_position_target_local_ned_t) as the offboard path. My confusion is why it needs to be sent if it is just the same message? If any of the three sections in offboard figure eight that send the home position are removed, the drone refuses to switch to offboard mode (before HOME, waiting to switch to offboard mode, and before switching to offboard mode). To clarify my questions...

    1. does the px4 differentiate between between the mavlink message containing the home position vs a path setpoint? If not, why does sending the set points of the path in a loop not allow me to switch to offboard mode, like sending the home position in a loop first does?
    2. why does the home position need to be sent, specifically in the three locations (listed above) to be able to switch to offboard mode?
    3. Is there a limit to how many home position messages need to be sent to switch to offboard mode? In the example it appears to be set for 2 seconds, however I believe that is to give the drone enough time to return to the hardcoded path start (0, 0, FLIGHT_ALTITUDE).

Log in to reply