Agisoft Metashape Professional provides functionality for generating drone flight plans for objects with complex geometry. The tutorial below describes basic workflow steps, under which you will be able to use the Plan Mission tool and create the optimal route for your drone to get a good quality model of your object.  


Also, you can check our video about Mission Planner. This video describes basic workflow steps to create the optimal route for your drone with the help of Plan Mission tool and, eventually, to generate a good quality model of the target object.



To generate a detailed mission plan, you need to perform a simple overhead flight and create a rough polygonal model. Flight safety can be assured by user-specified no-fly zones and automatic powerlines avoidance, supported starting from Metashape Professional 1.7.0 version. Rough polygonal models and user-defined shape layers are used to generate an optimal sequence of viewpoints, to be exported in KML or CSV formats for various drone controlling apps.

Capture a basic imagery set


Make an overhead flight over the region of interest to capture a basic imagery set. To capture vertical and concave surfaces better you may use an oblique (photogrammetry) survey preset in your drone app instead of taking only nadir photos. 


Building a rough polygonal model in the Metashape


1.  Import photos to Metashape, select the Add Photos command from the Workflow menu.


2. Select Align Photos... command from the Workflow menu sets the parameters for aligning photos. The alignment result will be displayed on the Model view. At this stage, Metashape estimates the camera position and orientation for each photo and generates a tie point cloud consisting of the tie points.




3. Select the Resize Region tool on the toolbar and adjust the region of reconstruction to contain all important details.



4. Select the Build Mesh command from the Workflow menu to build a rough model of the region of interest and corresponding obstacles. We recommend using Depth Maps as Source data. Usually, Medium or even Low quality is sufficient for decent reconstruction in a short time even on a laptop.


Specify the take-off point


Specify a point close to the expected drone take-off position. This can be done by placing a point shape on the rough model. Use Draw point instrument on the toolbar to draw shape in the Model View. For convenience, you can set a custom point label via the Shape Properties dialog window.



Specify no-fly zones


No-fly zones can be adjusted by using Restricted areas and Allowed areas. To specify Restricted or Allowed areas, create a polygon using Draw polygon instrument on the toolbar.



Assign it to the corresponding shape layer in the Shape Properties dialog window.


To create a new layer, use the Add layer button and set the Label and Color on the New Shape Layer dialog window. 


The following rules apply to combinations of allowed and restricted polygons: 
- when one or several allowed polygons are added, the drone is only permitted to fly inside a union of these polygons;
- when one or several restricted polygons are added, the drone is restricted to fly inside any of these polygons;
- when allowed and restricted polygons overlap, their intersection is considered as a restricted area;
- if specified restricted and allowed area, please note that the home point must place on the safety zone. 


It is convenient to draw flight zones in orthographic projection mode. Select Model Menu > View Mode > Perspective/Orthographic.


Don't forget to put shapes to the different layers for proper utilization in Plan Mission procedure.

(green polygon represent Allowed area, red polygon - Restricted area)


Detect Powerlines 


If powerlines are present in the scene, select the Detect Powerlines command from the Tools menu and run it with default parameters. 




To exclude road marking on roads or, for example, fences, we recommend using - Min altitude from DEM (m), which requires generating DEM as an additional preliminary step. But if you don't have such objects in the scene, you don't need to set this parameter.


Detected powerlines will be saved as 3D polylines in one or more shape layers. Move all relevant wires to a single shape layer using the Shape Properties > Layer.




Plan Mission


Select the region of interest for the plan mission process on the model using selection tools available on the toolbar in the Model View mode. 



Select the Plan Mission command from the Tools menu. Specify parameters according to the description given below and run the procedure. 



General: 

  • Focus on model selection - to consider only selected triangles of the model as a target for reconstruction. In any case, all reconstructed triangles will be used for obstacle avoidance. 
  • Focus on interesting zone - a layer with a polygon is used as a selection area. All triangles are selected that fall into the selected area when viewed from above. If some areas are selected along with the zone, then the algorithm will look at them and the interesting zone.

Survey parameters:

  • Camera model - choose a camera from the list with a certain focal length in mm. 
  • Resolution - target image resolution. It can either be specified as GSD or as a capture distance in meters from the surface of the rough model.
  • Image overlap (%) - desired image overlap percentage.
  • Improve hard-to-reach regions coverage - optimize coverage of hard-to-reach regions of interest by generating additional viewpoints from allowed space. 
  • Enable multi-photo waypoints (DJI Pilot and Litchi CSV) - convert close waypoints to rotate-and-shoot actions without changing drone position.

Obstacle avoidance:

  • Safety distance (m) - minimal distance for the drone to any obstacle in the scene. This includes all geometry presented in the rough model (including reconstructed trees, ground, and the object of interest), no-fly zones, and powerlines (if the corresponding layers are specified).
  • Min altitude (m) - relative altitude to home point (in meters), which is restricted for putting waypoints within or planning a path through.
  • Safety zone - shape layer with the allowed regions.
  • Restricted zone - shape layer with the restricted regions.
  • Powerlines layer - shape layer with the detected powerlines.


For drones, without RTK we strongly recommend using a safety distance of a least 10 meters, while for RTK drones smaller safety and capture distances are avaiable, which unlocks a significantly higher level of detail. 



Flight plan properties: 

  • Home point - specified take-off point shape.
  • Min waypoint spacing (m) - the minimal distance between consecutive waypoints. The default value is set to 0.5 meters according to DJI drone firmware.
  • Min pitch - minimal pitch angle allowed by the drone gimbal.
  • Max pitch - maximal pitch angle allowed by the drone gimbal.
  • Prefer horizontal movement - traverse flat surfaces in horizontal zig-zag fashion instead of vertical one. Vertical movement is simpler to keep direct eye contact with the drone, while horizontal movement may be more battery efficient.


Click the OK button. The Mission Plan will be available as one or more camera tracks in the Workspace pane. 



Observe and export generated mission plan 


Enable Model Menu > Show/Hide items > Show Animation option in order to enable the display of the created camera track. 



To export the created mission right click on the Mission Plan instances in the chunk's contents of the Workspace pane and select the Export Camera Track option from the context menu, then specify the path to the exported file (on the screen below you see the example for export camera track in the KML format). 



Import files to drone app


Import files to drone app that supports KML flight plans with gimbal orientation e.g. Litchi or DJI Pilot for enterprise DJI drones such as Phantom 4 RTK. Also, CSV format is supported for Intel Falcon drones. 


Run the imported waypoint mission. If the drone battery gets low during the flight, replace it and restart the drone at the same altitude as that of the specified home point. You will need to manually navigate the drone to the position from which the last visited waypoint is in line of sight to resume automatic flight safely. 


Build a detailed model


Load the complete detailed image set to the new Metashape project and process following the regular processing steps (Align photos, Build Mesh and Build Texture).