fields2cover

Robust and efficient coverage paths for autonomous agricultural vehicles. A modular and extensible Coverage Path Planning library

https://github.com/fields2cover/fields2cover

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README
  • Academic publication links
    Links to: ieee.org, zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.8%) to scientific vocabulary

Keywords

agriculture autonomous-vehicles coverage-path-planning cpp17 path-planning
Last synced: 6 months ago · JSON representation ·

Repository

Robust and efficient coverage paths for autonomous agricultural vehicles. A modular and extensible Coverage Path Planning library

Basic Info
Statistics
  • Stars: 587
  • Watchers: 16
  • Forks: 124
  • Open Issues: 22
  • Releases: 2
Topics
agriculture autonomous-vehicles coverage-path-planning cpp17 path-planning
Created over 3 years ago · Last pushed 10 months ago
Metadata Files
Readme Changelog License Code of conduct Citation Authors

README.rst

Fields2Cover
============

  **Robust and efficient coverage paths for autonomous agricultural vehicles**



|Open in GitHub Codespaces|

|DOI| |build| |CODECOV| |license| |Language-C++| |Language-Python| |stars| |forks|


.. image:: docs/figures/logo_fields2cover.jpeg
   :align: center


`The extended documentation is here `__.



The coverage path planning problem (CPP) aims to create a path to cover an area with one or several vehicles.
CPP has many application as cleaning robots, surveillance, de-mining or agriculture.
Each of the application has its own requirements.
For example, in cleaning robots environment is usually unknown and the objective is improve the probability of cover the area.
On the other hand, CPP in agriculture knows the area to cover, but the coverage has to be complete.




Fields2Cover library provides several algorithms to plan the coverage path on any kind of fields:

.. image:: docs/figures/diagram-F2C.jpg
   :align: center
   :width: 500px


Although the development of this project is focused on offline planning of agricultural vehicles, the library accepts pull requests from other types of coverage planners.


F2C version 2.0
---------------

The version 2.0 of Fields2Cover comes with support for non-convex fields and fields with obstacles!! This has been huge request from the community and finally it's here.

A quick list of new additions to the library:

#. Decomposition algorithms:

   * Trapezoidal and Boustrophedon decomposition. Those algorithms are useful to split any concave field into several convex sub-fields.

#. Route planner:

   * Route optimizer using `OR-tools `__ can be used to order the swaths, instead of just using a known pattern.

   * Support for a point used as the start and end points of the route.

#. Path planner:

   * Support for routes provided by the route optimizer.

#. Swath generator:

   * Speed improvement on swath generation.

   * New cost function: `NSwathModified`. It uses an approximation to compute the number of swaths, reducing computation costs.

#. Many bugs fixed.





Citing
------

Please cite the  following paper (https://ieeexplore.ieee.org/document/10050562) when using Fields2Cover for your research:

.. code-block:: bibtex

  @article{Mier_Fields2Cover_An_open-source_2023,
    author={Mier, Gonzalo and Valente, Joo and de Bruin, Sytze},
    journal={IEEE Robotics and Automation Letters},
    title={Fields2Cover: An Open-Source Coverage Path Planning Library for Unmanned Agricultural Vehicles},
    year={2023},
    volume={8},
    number={4},
    pages={2166-2172},
    doi={10.1109/LRA.2023.3248439}
  }



Why?
----

There are many CPP papers out there, but almost no code about their implementation.
Due to this, research about this topic is slow as you need to implement every algorithm you want to compare with.

Fields2Cover provides a flexible structure and several algorithms to compare with, so any developer can research about this topic easily.


Installation
------------

The Fields2Cover package has only been tested on Ubuntu 18.04, 20.04 and 22.04.
If you are able to run it in other operative systems, open an issue/PR and it will be added to this guide


Requirements on Linux
^^^^^^^^^^^^^^^^^^^^^

Some packages are needed before compiling the package:

  ```` If your OS is Ubuntu 18.04 or 20.04, you would need to do ``sudo add-apt-repository ppa:ubuntugis/ppa``


.. code-block:: console

   sudo apt-get update
   sudo apt-get install --no-install-recommends software-properties-common
   sudo add-apt-repository ppa:ubuntugis/ppa
   sudo apt-get update
   sudo apt-get install --no-install-recommends build-essential ca-certificates cmake \
        doxygen g++ git libeigen3-dev libgdal-dev libpython3-dev python3 python3-pip \
        python3-matplotlib python3-tk lcov libgtest-dev libtbb-dev swig libgeos-dev \
        gnuplot libtinyxml2-dev nlohmann-json3-dev
   python3 -m pip install gcovr

Also, `OR-tools `__ for C++ is needed. Follow its installation process.


Compilation
^^^^^^^^^^^

First, clone this repository.
Then, from the source code folder of the project:

.. code-block:: console

   mkdir -p build;
   cd build;
   cmake ..;
   make -j$(nproc);

Finally, you can install it as:

.. code-block:: console

   sudo make install;


Add it to your projects
^^^^^^^^^^^^^^^^^^^^^^^

To add Fields2Cover into your CMakeLists.txt, it is as easy as:

.. code-block:: console

   find_package(Fields2Cover REQUIRED)
   target_link_libraries(<<>> Fields2Cover)


Compilation with python interface
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Assuming you have satisfied the "Requirements on Linux" and completed the initial "Compilation" step.

Install the packages required as:

.. code-block:: console

   sudo apt install swig python3-pytest


Then, from the source code folder of the project, adjust the BUILD_PYTHON option of the existing build:

.. code-block:: console

   cd build;
   cmake -DBUILD_PYTHON=ON ..;
   make -j$(nproc);
   sudo make install;

To test if the compilation and installation of the python interface is correct, run on python:

.. code-block:: python

  import fields2cover

Or run on the main folder:

.. code-block:: console

  pytest-3 tests/python/


Stability
---------

Fields2Cover is still in early development, so feedback and bug reports are appreciated.  At the moment, it should expected that breaking changes may be introduced as new functionality is added, bugs are fixed, and APIs are streamlined.


Contribute
-----------

If you find any issue/bug/proposal, open an issue and we will try to solve/discuss it.

Pull requests are more than welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.

Contributions can be easily made using |Open in GitHub Codespaces|


License
-------

Fields2Cover project is under `BSD-3 license `__.


TODO
----

- Support small obstacles
- Headland coverage
- Create SWIG interface with Lua/R
- ...



Credits and more info
---------------------

This library is only possible thanks to `GDAL `_ who provides the basic types of this library.
Other great libraries that made Fields2Cover possible are `OR-tools `__, `hbanzhaf/steering_functions `_, `nlohmann/json `_, `leethomason/tinyxml2 `_, `joshhooker/CubicSplineClass `_ and `alandefreitas/matplotplusplus `_


This code repository is part of the project Fields2Cover which is (partly) financed by the Dutch Research Council (NWO).


.. |build| image:: https://github.com/Fields2Cover/Fields2Cover/actions/workflows/build.yml/badge.svg?branch=main
.. |stars| image:: https://img.shields.io/github/stars/fields2cover/fields2cover?style=social
.. |forks| image:: https://img.shields.io/github/forks/fields2cover/fields2cover?style=social
.. |license| image:: https://img.shields.io/badge/license-BDS3-orange.svg
   :target: https://github.com/Fields2Cover/Fields2Cover/blob/main/LICENSE
.. |Language-C++| image:: https://img.shields.io/badge/language-C++-blue.svg
   :target: https://isocpp.org/
.. |Language-Python| image:: https://img.shields.io/badge/language-Python-blue.svg
   :target: https://www.python.org/
.. |Open in GitHub Codespaces| image:: https://github.com/codespaces/badge.svg
   :target: https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=501080115
.. |DOI| image:: https://zenodo.org/badge/DOI/10.1109/LRA.2023.3248439.svg
   :target: https://doi.org/10.1109/LRA.2023.3248439

.. |CODECOV| image:: https://coveralls.io/repos/github/Fields2Cover/Fields2Cover/badge.svg?branch=main
   :target: https://coveralls.io/github/Fields2Cover/Fields2Cover?branch=main


Owner

  • Name: Fields2Cover
  • Login: Fields2Cover
  • Kind: organization
  • Email: gonzalo.miermunoz@wur.nl
  • Location: Netherlands

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Mier"
  given-names: "Gonzalo"
  orcid: "https://orcid.org/0000-0002-7588-9911"
- family-names: "Valente"
  given-names: "João"
  orcid: "https://orcid.org/0000-0002-6241-4124"
- family-names: "de Bruin"
  given-names: "Sytze"
  orcid: "https://orcid.org/0000-0002-6884-2832"
title: "Fields2Cover library"
version: 1.2.0
date-released: 2022-10-17
url: "https://github.com/Fields2Cover/Fields2Cover"
preferred-citation:
  type: article
  authors:
  - family-names: "Mier"
    given-names: "Gonzalo"
    orcid: "https://orcid.org/0000-0002-7588-9911"
  - family-names: "Valente"
    given-names: "João"
    orcid: "https://orcid.org/0000-0002-6241-4124"
  - family-names: "de Bruin"
    given-names: "Sytze"
    orcid: "https://orcid.org/0000-0002-6884-2832"
  doi: "https://doi.org/10.1109/LRA.2023.3248439"
  journal: "IEEE Robotics and Automation Letters"
  title: "Fields2Cover: An open-source coverage path planning library for unmanned agricultural vehicles"
  year: 2023

GitHub Events

Total
  • Issues event: 29
  • Watch event: 136
  • Delete event: 5
  • Issue comment event: 86
  • Push event: 38
  • Pull request review event: 7
  • Pull request review comment event: 10
  • Pull request event: 17
  • Fork event: 30
  • Create event: 8
Last Year
  • Issues event: 29
  • Watch event: 136
  • Delete event: 5
  • Issue comment event: 86
  • Push event: 38
  • Pull request review event: 7
  • Pull request review comment event: 10
  • Pull request event: 17
  • Fork event: 30
  • Create event: 8

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 13
  • Total pull requests: 5
  • Average time to close issues: 2 months
  • Average time to close pull requests: about 7 hours
  • Total issue authors: 13
  • Total pull request authors: 4
  • Average comments per issue: 1.92
  • Average comments per pull request: 1.0
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 11
  • Pull requests: 5
  • Average time to close issues: 23 days
  • Average time to close pull requests: about 7 hours
  • Issue authors: 11
  • Pull request authors: 4
  • Average comments per issue: 1.0
  • Average comments per pull request: 1.0
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • vinnnyr (3)
  • cuilongfei1231 (3)
  • ar0ser0 (3)
  • ucmmesa (3)
  • Gonzalo-Mier (3)
  • aosmw (3)
  • wimos-ai (2)
  • luojinzhang (2)
  • Rick-v-E (2)
  • sloretz (2)
  • lyfkyle (1)
  • keirymb (1)
  • dmjtian (1)
  • bccw2021 (1)
  • gribes02 (1)
Pull Request Authors
  • aosmw (11)
  • Gonzalo-Mier (6)
  • TobyTowler (3)
  • adivardi (2)
  • tomschut (2)
  • vinnnyr (2)
  • impala454 (1)
  • pwkamp (1)
  • lyfkyle (1)
  • Taka-Kazu (1)
  • tonynajjar (1)
  • ar0ser0 (1)
  • ChenHeMetalform (1)
  • wimos-ai (1)
  • clalancette (1)
Top Labels
Issue Labels
enhancement (3) future-release (3) in-progress (2) good first issue (2) bug (1) documentation (1) hacktoberfest (1)
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads: unknown
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 8
proxy.golang.org: github.com/fields2cover/fields2cover
  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 9.0%
Average: 9.6%
Dependent repos count: 10.2%
Last synced: 7 months ago
proxy.golang.org: github.com/Fields2Cover/Fields2Cover
  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 9.0%
Average: 9.6%
Dependent repos count: 10.2%
Last synced: 6 months ago

Dependencies

.github/workflows/build.yml actions
  • actions/checkout v3 composite
  • lukka/get-cmake latest composite
.github/workflows/docs.yml actions
  • actions/checkout v3 composite
  • actions/upload-artifact v3 composite
  • cpina/github-action-push-to-another-repository main composite
  • lukka/get-cmake latest composite
.devcontainer/Dockerfile docker
  • ubuntu 20.04 build
Dockerfile docker
  • osgeo/gdal ubuntu-full-3.6.2 build
docs/requirements.txt pypi
  • exhale >=0.3.0
  • m2r2 *
  • sphinx-sitemap *
swig/python/pyproject.toml pypi