Pixhawk dronekit auto grid

Hello, is there any code for auto grid that performs like a polygon??