MAVLink NAV commands

DIYDrones,

I have two question related to MAVLink commands.  First, I'm trying to send a MAVLink command to my MAV which will make the plane fly to the desired waypoint and then continue on its mission.  For example, If the MAV's mission was A-B-C-D-HOME and the MAV has already reached waypoint A in autopilot mode.  I am wondering if there is a MAVLink command so that I can insert a waypoint into the middle of a mission.  Therefore, the mission would end up something like A-X-B-C-D-HOME.  Obviously the X MAVLink would either have to send lat,long and alt of a waypoint struct.  Is there a predefined MAVLink command to do this?  

Secondly, I was wondering if there was a way to send my MAV and guided waypoint.  For example, if my MAV was in autopilot mode flying the same mission A-B-C-D-HOME and I sent my MAV a MAVLink command to go the X waypoint in guided mode.  Is there a MAVLink command to do this?

I know that this page shows all of the predefined APM MAVLink commands, but there isn't very much description on what they do.  It seems that one of the NAV commands might be designed for what i'm trying to do but i'm not sure.  Any help would be very appreciated.

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Hi Matthew,

    im working on a project that sound like the one you did and i want to know if you solve your problem and if it works fine for you?

    Actuelly im trying to send message to PiX4 using mavlink lib (mavlink_msg_set_mode_pack(..))and i wonder how you did to find the 

    @brief Pack a set_mode message
    @param system_id ID of this system

    @param component_id ID of this component (e.g. 200 for IMU)
    @param msg The MAVLink message to compress the data into

  • Hi David, in regards to your message

    "Matthew, 

    I have been able to successfully send a guided waypoint in a MAVLink message.  Is this what you are trying to do?" 

    This is exactly what I am trying to do, I take it you saw my work on the link I provided, I'm just a little stuck with what exactly I need to send, and how, I don't suppose you could help me out with this problem and share your experiencewith sending guided waypoint ?

    Thanks, Matt

  • So, I've been doing some research and I think the do_jump command is not what I am looking for. Here is the description of the do_jump command: 

    entry value="177" name="MAV_CMD_DO_JUMP">
      description>Jump to the desired command in the mission list. Repeat this action only the specified number of times</description>
      param index="1">Sequence number</param>
      param index="2">Repeat count</param>
      param index="3">Empty</param>
      param index="4">Empty</param>
      param index="5">Empty</param>
      param index="6">Empty</param>
      param index="7">Empty</param>
      </entry>
    the description says that using this command jumps to a desired command in the mission list.  Although I may have alluded to this above, this is not what I am looking for.  I want a mavlink message that will allow me to send lat,lng and alt for a waypoint.  Then, the APM will recieve this message and proceed to fly to this waypoint.  Once reaching this waypoint, the UAV will proceed to continue on the mission it was already flying.
    I'm not exactly sure, but it seems like either MAV_CMD_NAV_PATHPLANNING or a MAV_GOTO command will conquer what i'm trying to achieve.  Although, i'm not very familiar with these commands and the code isn't clear explaining this.  Randy, or anyone else, do you have any insight into this? 
  • Developer

    David,

          i think there's a do_jump command.  so you could make it jump after a to wp E and then jump back to B maybe?

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…