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

DIY Robocars via Twitter
yesterday
DIY Robocars via Twitter
RT @SahikaGenc: AWS DeepRacer & Hot Wheels Track https://youtu.be/4H0Ei07RdR4 via @YouTube
Sep 14
DIY Robocars via Twitter
Sep 8
DIY Robocars via Twitter
RT @davsca1: We are releasing the code of our Fisher Information Field, the first dedicated map for perception-aware planning that is >10x…
Sep 8
DIY Robocars via Twitter
RT @SmallpixelCar: How this works: 1)object detection to find cones in single camera image, 30 frames/sec on @NVIDIAEmbedded Xavier. 2)comp…
Sep 8
DIY Robocars via Twitter
RT @SmallpixelCar: Use two color cones to guide the robocar. No map needed, on onsite training needed. Just place the cones and it will fol…
Sep 7
DIY Robocars via Twitter
Sep 7
DIY Robocars via Twitter
RT @roboton_io: Great to see http://roboton.io running at 60fps on the cheapest #chromebook we could find! #edtech #robotics #educat…
Sep 3
DIY Robocars via Twitter
RT @openmvcam: Crazy in-depth article about using the OpenMV Cam for Astrophotography: https://github.com/frank26080115/OpemMV-Astrophotography-Gear https://t.co/BPoK9QDEwS
Sep 3
DIY Robocars via Twitter
RT @openmvcam: Hi folks, it's finally here! Our first draft of our Arduino Interface Library is out! It works over SoftwareSerial, Hardware…
Sep 3
DIY Robocars via Twitter
RT @chr1sa: Please let them have an open API. This would be perfect for @DIYRobocars races https://twitter.com/NintendoAmerica/status/1301513099707658246
Sep 3
DIY Robocars via Twitter
RT @SmallpixelCar: Lanenet pretty much used all my GPU power on @NVIDIAEmbedded Xavier since I optimized with tensorRT. I need to run anoth…
Sep 3
DIY Robocars via Twitter
RT @LyftLevel5: Our @kaggle competition on Motion Prediction for Autonomous Vehicles is now live! Experiment with the largest-ever self-dri…
Aug 24
DIY Robocars via Twitter
RT @chr1sa: Our next @DIYRobocars virtual AI car race will be on Sept 26th. Sign up here https://www.meetup.com/DIYRobocars/events/272786977/ https://t.co/UENKGSOWO8
Aug 24
DIY Robocars via Twitter
New ready-to-run @NVIDIAEmbedded JetRacer car from Waveshare. Perfect for the next @diyrobocars race as soon as we… https://twitter.com/i/web/status/1297960223013867520
Aug 24
DIY Drones via Twitter
RT @chr1sa: The US government just approved 5 US-made drones for purchase, all based on the @Dronecode @PX4Autopilot standard. Great news f…
Aug 20
More…