Skip to main content

Nexat Terrain Routing and Coverage Engine

Project description

Nexat Terrain Routing And Coverage Engine

A sophisticated complete coverage path planning library developed for controlled traffic farming applications. Specifically useful for vehicles with nonholonomic steering kinematics that have a similar turning radius to its track / working width.

Features

Complete coverage path planning

This library excels in robust & intelligent route optimization and curve planning for complex field geometries.

[video of TRACE example]

Flexible route / task specification

The route planner has a lot of options and parameters that change the way the route is planned and how the curves are calculated.

[image of route with working width]

Planner parameters include:

  • Start / finish location
  • Variable working width (multiple of tack width e.g. for spraying applications)
  • Block working configuration (group sets of neighboring ab lines together)
  • Reusing existing paths on a track system to minimize soil compaction
  • Working corridor error avoidance
  • Multiple turning maneuvers
  • Weighted prioritization of overall distance vs overall coverage

Installation

Releases of this library are hosted on pip

pip install nexat-trace

Usage

When using this library, you should start with generating a track system. The TrackSystem class provides basic track system generation from an outer field border:

[!CAUTION] All geometry should be in a metric coordinate system e.g. UTM projection.

from nexat_trace import TrackSystem

track_system = TrackSystem.from_border(
    field_border,  # your outer field border as a shapely Polygon with holes as obstacles
    14.0,  # desired track width in meters
    reference_ab_line,  # reference LineString within your field border
    [0.5, 1.0, 1.0, 0.5]  # headland widths configuration
)

To use this library most effectively, you should generate your own specific track systems with field border, headlands, obstacles, AB lines and obstacle avoidance segments.

Now it is time to configure the planner parameters to match the desired task definition. Here is a basic example:

from nexat_trace import RoutePlanner, CorridorStrategy

planner = RoutePlanner()

# should be whole multiple of track width
planner.route_params.working_width = 14.0

# ignore working corridor errors for now
planner.route_params.corridor_strategy = CorridorStrategy.DRIVE_NONE

# neutral distance optimizing weights
planner.route_params.weights.headland_distance_factor = 1.0
planner.route_params.weights.headland_cost_exponent = 1.0

Now a route can be planned using the prepared track system and configured planner:

route = planner.plan_route_from_track_system(
    track_system,  # prepared track system instance
    5,  # time in s spent doing guided local search optimization
)
path = route.get_linestring()

The route can be plotted using the utility functions:

[!NOTE] For this you need to have the dev requirements installed. See dev_requirements.txt or setup_venv.sh for info

from nexat_trace.util import plot_geometry as pg
pg.plot_linestring_rainbow(path)
pg.show_plot()

Developing

When developing on linux you can use

source setup_venv.sh

to setup & activate a python venv with all development dependencies. The script also builds and installs the pydubins extension.

Now files in the root of the repo like example_basic.py or example_complex.py can be ran and debugged running code in this repo.

Credits

This library depends on shapely, ortools and numpy as well as pydubins.

The pydubins module is redistributed in the nexat-trace package. See THIRD_PARTY file for license info of the pydubins software.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

nexat_trace-1.0.1-cp310-cp310-win_amd64.whl (118.7 kB view details)

Uploaded CPython 3.10Windows x86-64

nexat_trace-1.0.1-cp310-cp310-musllinux_1_2_x86_64.whl (319.7 kB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

nexat_trace-1.0.1-cp310-cp310-musllinux_1_2_i686.whl (309.6 kB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ i686

nexat_trace-1.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (316.3 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

nexat_trace-1.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (298.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

nexat_trace-1.0.1-cp310-cp310-macosx_11_0_arm64.whl (124.6 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file nexat_trace-1.0.1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for nexat_trace-1.0.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 72afa44c7bb7eace81ad63faf8252d2ba84384b480fa8434b068e445b4e34c7f
MD5 b6d319b616cb2799ea6ced2c369f848c
BLAKE2b-256 01809539c51ae00de8fef5394c90008bdf015ebcdbe6c64d6290a13a6c8ae8f7

See more details on using hashes here.

File details

Details for the file nexat_trace-1.0.1-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for nexat_trace-1.0.1-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f3e0c3fb286dbeea846a81ca95d453177682b6d3f48084ef9e4ae568070fa54b
MD5 510b2197177bf08f6d53221b55cdff5d
BLAKE2b-256 c96ef57b1c9dfb3025cae878e7cddbad3e1802fe5baac0878c68a33aa3846b24

See more details on using hashes here.

File details

Details for the file nexat_trace-1.0.1-cp310-cp310-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for nexat_trace-1.0.1-cp310-cp310-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 8a5c8520cf64754c13bcca9b9150192a878adbee2214425926dbaf3b896b2710
MD5 29177b51947243fa161290aac997eb19
BLAKE2b-256 c49ff9c11dbf7b350ed042ddfb91b89f23881e4708daf0ecd84b16a46672a067

See more details on using hashes here.

File details

Details for the file nexat_trace-1.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nexat_trace-1.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 182083fdf39cdd92f1ded52baaf839d5c2ebaa8e0611cfe7da920beb77a8e49f
MD5 3ee25e4b5221a7d9f2d437bd41cff032
BLAKE2b-256 c3438998dc83596740a139979e6c58e66a685e6a73bc83665d91cce0591a3d5d

See more details on using hashes here.

File details

Details for the file nexat_trace-1.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for nexat_trace-1.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 bdca74b89cdb0ab4a878d865f32d6c711318677d3c0838337948ecc923b6fd1e
MD5 3df3c17ccb6bd6b7ac1b9f684e48af6d
BLAKE2b-256 0345d7cb5abbdb4db74190d3348d6dcf635bcdea63af41d380d5bda8c8f6253b

See more details on using hashes here.

File details

Details for the file nexat_trace-1.0.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nexat_trace-1.0.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1efc8efd7347b860c0470ffa27491cdb1c85e5216d516cc155edd0005061a091
MD5 beb86f8f94170455be37557865f3fa39
BLAKE2b-256 94e6fd93532efab4b8ad6ef3b8d9d9e1eef7daf60ac8a787d8682e6a0060312a

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