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

Gremsy liked Gremsy's profile
Mar 12
DIY Robocars via Twitter
RT @chr1sa: Donkeycar 4.4 released with tons of new features, including path learning (useful with GPS outdoors), better Web and Lidar supp…
Nov 27, 2022
DIY Robocars via Twitter
RT @NXP: We are already biting our nails in anticipation of the #NXPCupEMEA challenge! 😉 Did you know there are great cash prizes to be won…
Nov 24, 2022
DIY Robocars via Twitter
RT @gclue_akira: レースまであと3日。今回のコースは激ムズかも。あと一歩 #jetracer https://t.co/GKcEjImQ3t
Nov 24, 2022
DIY Robocars via Twitter
UC Berkeley's DIY robocar program https://roar.berkeley.edu/
Nov 24, 2022
DIY Robocars via Twitter
RT @chr1sa: The next @DIYRobocars autonomous car race at @circuitlaunch will be on Sat, Dec 10. Thrills, spills and a Brazilian BBQ. Fun…
Nov 24, 2022
DIY Robocars via Twitter
RT @arthiak_tc: Donkey car platform ... Still training uses behavioral cloning #TCXpo #diyrobocar @OttawaAVGroup https://t.co/PHBYwlFlnE
Nov 20, 2022
DIY Robocars via Twitter
RT @emurmur77: Points for style. @donkeycar racing in @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/Y2hMyj1…
Nov 20, 2022
DIY Robocars via Twitter
RT @SmallpixelCar: Going to @diyrobocars race at @UCSDJacobs https://t.co/Rrf9vDJ8TJ
Nov 8, 2022
DIY Robocars via Twitter
RT @SmallpixelCar: Race @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/kK686Hb9Ej
Nov 8, 2022
DIY Robocars via Twitter
RT @PiWarsRobotics: Presenting: the Hacky Racers Robotic Racing Series in collaboration with #PiWars. Find out more and register your inter…
Oct 23, 2022
DIY Robocars via Twitter
RT @Hacky_Racers: There will be three classes at this event: A4, A2, and Hacky Racer! A4 and A2 are based around UK paper sizing and existi…
Oct 23, 2022
DIY Robocars via Twitter
Oct 23, 2022
DIY Robocars via Twitter
Oct 19, 2022
DIY Robocars via Twitter
Oct 18, 2022
DIY Robocars via Twitter
RT @NeaveEng: Calling all UK based folks interested in @diyrobocars, @f1tenth, @donkey_car, and similar robot racing competitions! @hacky_r…
Oct 13, 2022
More…