xtrack error in Arducopter

85 views
Skip to first unread message

Randy Mackay

unread,
Sep 30, 2015, 10:58:51 PM9/30/15
to Josh Glaab, drones-...@googlegroups.com

 

Josh,

 

     We internally calculate the cross tracker error at least for straight-line waypoint commands but we don’t publish it out on MAVLink.  The reason is probably that nobody’s really asked for it and although it’s quite straightforward for straight-line waypoints, to do it properly we should probably do it for spline waypoint commands and maybe circles too.

           https://github.com/diydrones/ardupilot/blob/master/libraries/AC_WPNav/AC_WPNav.cpp#L523

 

     I think the best way to evaluate the accuracy is to look at the dataflash logs.  There are NTUN messages which show the desired vs actual positions.  I think if you setup the vehicle to fly perfectly north-south segments and then east-west segments it would be pretty easy to calculate the cross track error from these messages.  By the way, the convention is “X” is for lat (i.e. north-south movement) and Y is for lon (east-west movement).

 

     One issue you may find with our navigation accuracy is that we use a “leash”.  This means the vehicle is chasing a target point that races along the waypoint segment.  This method has served us well because it’s computationally easy and leads to very smooth flight but the downside is that you’ll see the vehicle cuts the corners on curved paths or when the mission has sharp corners.  Now that all new versions of the firmware only run on relatively fast CPUs like the Pixhawk, we have plans to change this navigation (hopefully for AC3.4) but it’s a big change and I shouldn’t make promises.

 

-Randy

 

---------- Forwarded message ----------
From: Josh Glaab <louis....@gmail.com>
To: drones-discuss <drones-...@googlegroups.com>
Cc: 
Date: Tue, 29 Sep 2015 13:30:03 -0700 (PDT)
Subject: xtrack error in Arducopter

I am attempting to analyze the capability of a 3DR Y-6 with Pixhawk to fly various flight paths.  Thextrack error variable (xtrack_error_mavlink_nav_controller_output_t) in the tlog file is set to zero.  While the flight path error is low (like a meter or two) it is not zero.  Vertical flight path error seems to be working fine.  Looking at the rlog files provides raw position information, but not xtrack error.  Could you tell me how to get access to xtrack error for Ardu copter?  The xtrack error parameter seems to be working fine for ArduPlane.

 

Thanks, Lou.

NASA LaRC

 

--

Chris Anderson

CEO, 3D Robotics

 

--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

 

--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Josh Glaab

unread,
Oct 1, 2015, 9:40:51 AM10/1/15
to drones-discuss, louis....@gmail.com
Hi Randy,

Thanks for the excellent reply.  I have looked at the dataflash logs and they have the actual GPS locations, and the vehicles location in a North-East coordinate axis system as you have pointed out.  Since I need flight path error with respect to the desired flight plan I could run some flights with the flight plan running East or North but I would only be able to probably look at one leg at a time and might not get much about the turn dynamics.  Another idea is to post-process the dataflash data.  I have all the ingredients to do that (vehicle location/path definition) but don't have the code (preferably in Matlab) to do it.  I am wondering if someone has already done that, just have to find it.  I am also checking with others at NASA LaRC who have worked with flight path error to see if they have something I could pirate.

Josh
Reply all
Reply to author
Forward
0 new messages