Skip to main content

A package to generate a guidance trajectory for complete 2D coverage of a region of interest

Project description

Complete coverage Path Planning (CCPP)

PyPI PyPi license

Getting started

This repository contains a program which generates a guidance trajectory for complete 2D coverage. It can be used for operations where complete coverage of an Area of Interest (AoI) is required for various applications. The package can be installed from PyPi by running 'pip install covplan'

How to use the program

To use the program, run coverage_path_planner.covplan(input_file, params). It returns a list of coordinates that compose a path for complete coverage. In the input file, describe the boundaries of the AoI using its lat-lon coordinates in the following format:

  lat1  lon1
  lat2  lon2
  ...
  lat1  lon1
  NaN  NaN

Ensure that the AoI is a closed polygon, by keeping the first coordinate the same as the last coordinate. Separate different polygons by including a NaN NaN at the end. Also ensure that the coordinates of the polygon are described clockwise, and counter-clockwise for any obstacles and forbidden regions. coverage_path_planner.find_min(input_file, params) runs a single objective optimizer to find the driving angle that minimizes the trajectory length for a given AoI and the specified parameters.

Example usage

from covplan import coverage_path_planner

def main():
	n_clusters=4	#number of sections
	r=2	#radius for Dubins curves
	input_file='sample_area.txt' #location of the input file containing coordinates of the field
	width = 10	#distance between tracks
	driving_angle=90	#angle wrt X-axis in degrees
	no_hd=0	#number of margins around boundary (each with distance=0.5*width) if needed, otherwise 0
	
	op=coverage_path_planner.covplan(input_file,num_hd=no_hd,width=width,theta=driving_angle,num_clusters=n_clusters,radius=r,visualize=False) # returns list of waypoint coordinates composing full trajectory for coverage
	print('The trajectory for full coverage consists of the following waypoints:',op)
	
	min=coverage_path_planner.find_min(input_file,width=width,num_hd=no_hd,num_clusters=n_clusters,radius=r,verbose=True)  # runs optimizer and returns angle corresponding to minimum path length
	# print('Angle for trajectory with minimum length:', min)

if __name__ == '__main__':
	main()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

covplan-0.1.0.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

covplan-0.1.0-py3-none-any.whl (32.8 kB view details)

Uploaded Python 3

File details

Details for the file covplan-0.1.0.tar.gz.

File metadata

  • Download URL: covplan-0.1.0.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for covplan-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6c3b498059881ae286b544ec1c17353217424ac316a4a13ba6c2079dced91322
MD5 56012144a5161ca44437845e0834dabb
BLAKE2b-256 a5880f5698c299bc5c3e324cfe7aeea2616bce016e9101a000dcec07cb8bcb9d

See more details on using hashes here.

File details

Details for the file covplan-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: covplan-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 32.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for covplan-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5d9f3393dae7fc2d0eca073ac89460d5b4b8cc6b948d92d490ff2e71ae64a042
MD5 986443740cb4f6752328d14ace850917
BLAKE2b-256 34e57f884bcd2b7b203560ca9fa1f9c76242c7e0c5e7b47b684e2eb0e69ce777

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page