Skip to main content

CovPlan

A Python package for coverage path planning

PyPI PyPi license

This repository can be used for generating guidance trajectories for complete field coverage. It can be used for operations where complete coverage of an Area of Interest (AoI) is required for various applications. It is an updated Python implementation of the method that was presented in this paper.

Hameed IA, Bochtis D, Sørensen CA. An Optimized Field Coverage Planning Approach for Navigation of Agricultural Robots in Fields Involving Obstacle Areas. International Journal of Advanced Robotic Systems. 2013;10(5). doi:10.5772/56248

Installation

The package can be installed using pip

pip install covplan

Getting started

To generate a guidance trajectory for full coverage, use the API covplan.pathplan(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. covplan.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 pathplan

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=pathplan(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)
	

if __name__ == '__main__':
	main()

Documentation

The full documentation can be found here.

Contributing

Contributions are always welcome!

See contributing.md for ways to get started.

Please adhere to this project's code of conduct

Metadata

Release files for covplan 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for covplan 0.2.0
File Size Uploaded
covplan-0.2.0.tar.gz 19.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for covplan 0.2.0
File Interpreter ABI Platform
covplan-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 38.1 kB

Release files / covplan-0.2.0.tar.gz

Download URL covplan-0.2.0.tar.gz
Size 19.5 kB
Tags Source
SHA-256 checksum
How to use checksums
954233cb560f32836103ef07143b6d0fb24c92ca277d14931c2ccbd3f222bd18
BLAKE2b-256 checksum
How to use checksums
a808febac5e95ae86dd5bcb8e3818335b1027106c8188c8f8fd01e86dcc11526
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Release files / covplan-0.2.0-py3-none-any.whl

Download URL covplan-0.2.0-py3-none-any.whl
Size 18.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b95f793e6bd50f5b55fba7d277db919621f6e35e2fbd103a531f8d4186fcbddb
BLAKE2b-256 checksum
How to use checksums
c1cd59a92a737e7d617e5b7c4f64b272ffa7f55d425336c1c62b53e38427503e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page