A RVIZ plugin to plan and visualize survey trajectories.
The mission planner can be used both in offline mode from the desk in the office, or in online mode, when the UAV is powered in the field. The only difference is that offline, the ENU origin, which selects the map segment to be loaded, is specified by the user, while in the field the DJI ENU origin of the UAV is used. The online mode is automatically opened, when the mission control center is launched.
- Edit the GNSS home point's latitude and longitude. Common home points are:
THU:
latitude: 48.418718
longitude: 9.945754
Soccer field Hoengg:
latitude: 47.409047
longitude: 8.496931
Test site Spiez:
latitude: 46.690852
longitude: 7.647493
Test site Gannertshofen:
latitude: 48.260556
longitude: 10.170054 - Start the mission planner
roslaunch fm_mission_planner mission_planner_offline.launch
RVIZ will pop up with a backdrop image of the loaded GNSS home point. By default the backdrop image will be sourced from google tiles server. Only if the local map tile server is loaded the map is sourced from personal records. - Select the trajectory type you want to add.
- Edit the trajectory according to the selection parameters. Press Confirm to save trajectory segment.
- Repeat step 3 and 4 until trajectory is complete.
- Export the trajectory to a
.yaml
file. This file needs to be uploaded to/home/$USER/trajectories
on the UAV.
The mission planner also has the trajectory type Coverage
which is an interface for polygon_coverage_planning.
This trajectory type can be used to plan camera survey missions.
The coverage planner allows the user to draw a polygon hull with multiple holes. The planner will combine all the polygons and subtract the holes from the combined polygons. When using the tool, the user must first select the polygon. The tool info in the bottom bar shows the controls to modify the polygon shape and (flight path) altitude. The polygon selection is confirmed with Enter. Finally press Generate trajectory to create the coverage path and Confirm. The first element in the list is always a polygon.
As described in fm_pix4d we can create up-to-date map tiles from Pix4D maps.
The mission planner searches for these tiles in the folder ~/map_tiles
in the home directory of the user.
The map tiles are organized in an online ressource, in our case we can download this ressource with
cd ~
git clone data_server_username@data.asl.ethz.ch:/shared/findmine/map_tiles
cd map_tiles
git pull origin
The mav_findmine package generates and stores missions based on the mav_trajectory_generation package. This is a flexible tool to calculate and store parametrised paths for aerial vehicles. The package readme provides a detailed explanation of the types of trajectories that can be calculated and stored using the package. For the purpose of mav_findmine, the trajectories are simple polynomials stored as .yaml
files. There are three high-level tags as explained below.
input_constraints
: stores platform dynamic constraints. In most cases, this consists of maximum rotation rates (omega_*
), forces (f_*
) and velocities (v_*
) in vehicle body axes.geodetic_reference
: stores the geodetic reference point, or 'home' position of the trajectory, relative to which the rest of the trajectory is stored. The location is stored in the ENU frame.trajectory
: stores the trajectory parametrised intosegments
, with each segment containing fields for:D
: dimensions of the trajectory, in mav_findmine D=4, corresponding to x, y, z position and headingN
: number of polynomial coefficients, in mav_findmine N=10, corresponding to a 10th order polynomial, allowing for snap-continuous trajectory optimisationtime
: length of the trajectory segment in secondscoefficients
: polynomial coefficients of the trajectory. Each dimension has an independent polynomial function in time, in our case one N-dimensional vector in order x, y, z, ψ. From mav_trajectory "Coefficients are stored in increasing order with the power of t, i.e. c1 + c2*t + c3*t2 ==> coeffs = [c1 c2 c3]"
Inspired by http://docs.ros.org/kinetic/api/rviz_plugin_tutorials/html/panel_plugin_tutorial.html