ESRI Shapefiles in MP

I use ArcGIS quite a lot when planning out flights and I can see the utility in being able to import an ESRI shapefile into Mission Planner. It would allow some users to use a GPS such as a Trimble to shoot GCPs then use them as waypoints and camera trigger points in imagery missions. Is this something that is already incorporated into the MP code and I am just missing it? I guess that the SHP could be exported to a KML/KMZ overlay. With the SHP (from the GPS shots) the exact lat/long of a known ground landmark could be utilized as a GCP which could further enhance the accuracy of the resultant imagery.

Anyone else doing this?

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

Join diydrones

Email me when people reply –

Replies

  • This describes a temporary solution for the challenge:

    http://diydrones.com/profiles/blogs/converting-shapefiles-to-poly-f...

    • Gents: This is precisely why I finally created an acct. with DIYD! I'm a GISer that realizes the HUGE potential of this blog and work done in DIYD. I've been following the blog for about 10 months but scaled back for the last few and really missed this discussion until today! I'm so glad to see this support and topic. 

      RL's post with the py script is a great start--thanks.

       I was very happy to read the discussion go into OGR/GDAL, but I'm sad to see it went back to .shp as the preference since there are limits inherent in that format. I work with ESRI software daily but I've been easing into QGIS as my hobbyist GIS. The latter plays with python and works well with FGDBs too. Anyhow, I think python might be a great answer here because it could probably accommodate  whatever desktop GIS flavor you like.

      I can't claim to be a programmer--more of a cobbler...but I'm not bad with GIS (+12 yrs exp.). I would be very glad to work with a group to move this along if we can. Since I'm new to this community I'm not sure how this works. PM me if interested?

  • Developer

    latest beta MP supports reprojection on the fly. so you should be able to load almost any coord system.

    • It'll definitely reproject on the fly. It just did something kind of unexpected and REALLY cool. I gave it a polygon SHP instead of a point SHP and it interpreted the polygon centroids as WPTs. That was pretty cool. Maybe not what you wanted to hear, but cool nonetheless!

      This means that in order for us to get WPTs done in ArcGIS (or anything else using SHPs for that matter) we will likely have to set them up first in ArcGIS and then import the point SHP only into MP. The point SHP DBF schema should have at the minimum a field named WP for WPT number and ELEVATION for altitude in meters.

      Side note...

      Would it be possible to get a listing of all of the WPT type codes that MP uses? By that, I mean TAKEOFF, LAND, WAYPOINT, DO_SET_<command>, etc? I noticed that there is definitely a pattern to them, but I haven't figured it out yet. Those of us in ArcGIS could use these as subtypes in a geodatabase where we build our WPT features and set types with a dropdown menu, then export them directly to a SHP for MP.

      ...now if I could just get that pesky KML export from ArcGIS to work right, I could use my tract polygons in MP. This isn't on MP...it is definitely an ArcGIS/ESRI issue. It has been ever since they attempted to implement "Export LYR to KMZ" support in ArcGIS.

    • Michael you rock! I'll give it a good workout tomorrow at the office!

  • Developer

    ok the plan is

    points should have lat/long coords

    "ELEVATION" from the dbf will be read in as the wp altitude.

    "wp" from the dbf file will be sorted an imported from 0 to 99.. etc

     

    all that make sence?

    • Yes, that would be great. I just have 2 questions:

      1) Would there be a limit for the number of WPs?

      2) If the DBF contains other fields that aren't named WP, lat, long or elevation, will MP ignore them? 

      • Developer

        1. only limited by the autopilot itself, currently apm 2 has about 160 wp. and I know that the next pixhawlk release should be around 900 wp's

         

        2. mp will ignore all other values, other than ELEVATION and wp.

         

        ive uploaded the beta of this already.

        • Thanks, I updated the beta. However, when I import the shapefile now, there are 2 problems.

          1) The alt field is populated by the default altitude, which is similar problem to the previous beta. I even tried to edit the DBF by deleting all fields except for WP and elevation. Is there a way to override the default altitude? 

          2) The WPs are not numbered properly anymore. This did not occur in the previous beta.

          In my original flight plan, all flight lines were parallel (except for the take-off/landing), but when I import the SHP, I get crossed lines. See attached screenshots. 

          MP_flightplan_original.JPG

          MP_flightplan_shp_import.JPG

          • Developer

            ok new beta uploading.

            this one has a combination of things

            For Altitude it uses in this order

            1. ELEVATION in dbf

            2. alt in dbf

            3. the Z component of the point.

            for wp number

            1. wp in dbf

            2. order they appear in the file.

            if the wp is in the dbf the points are sorted lowest to highest.

             

This reply was deleted.

Activity

DIY Robocars via Twitter
May 15
DIY Robocars via Twitter
May 14
DIY Robocars via Twitter
May 13
DIY Robocars via Twitter
RT @f1tenth: Say hi to our newest #F1TENTH creation for @ieee_ras_icra next week in Philly. It’s going to be huge! 😎 🔥 @AutowareFdn @PennEn…
May 13
DIY Robocars via Twitter
May 11
DIY Robocars via Twitter
May 8
DIY Robocars via Twitter
RT @SmallpixelCar: Noticed my car zigzagged in last run. It turned out to be the grass stuck in the wheel and made the odometry less accura…
May 8
DIY Robocars via Twitter
RT @SmallpixelCar: Test my car. RTK GPS worked great. Thanks @emlid for their support. https://t.co/EkQ6qmjmWR
May 8
DIY Drones via Twitter
RT @chr1sa: @kane That's @diydrones circa 2009. Still have a box of those Canon cameras that we used to strap into planes, just like this.…
May 3
DIY Robocars via Twitter
RT @chr1sa: Our next @diyrobocars race is going to be outside at a real RC racetrack in Fremont on May 28. Fully autonomous racing, head-to…
Apr 30
DIY Robocars via Twitter
RT @f1tenth: Our Spring 2022 F1TENTH course @PennEngineers is coming to an end with a head-to-head race as a big finale. So proud of our st…
Apr 26
DIY Robocars via Twitter
RT @DanielChiaJH: I wrote a thing! Throughout the development of my @diyrobocars car I've been using @foxglovedev Studio to visualize and d…
Apr 23
DIY Robocars via Twitter
RT @SmallpixelCar: My new car for high speed. Low body, everything ( @NVIDIAEmbedded Jetson Xavier NX, @emlid RTK GPS, IMC) under the deck…
Apr 23
DIY Robocars via Twitter
Apr 21
DIY Robocars via Twitter
RT @f1tenth: F1TENTH Race training setup @PennEngineers for our upcoming ICRA2022 @ieee_ras_icra competition. @OpenRoboticsOrg @IndyAChalle…
Apr 21
DIY Robocars via Twitter
RT @fatcatFABLAB: Proud to be hosting a restarted DIY Robocars NYC Meetup April 26. Come by if you want to talk about and race self-driving…
Apr 17
More…