Artificial potential field navigation
In your harnessGodot componentMIT
Navigate in 2D with an artificial potential field: goals attract with constant force, obstacles repel inside an influence radius, forces are analytic gradients, and a walker reports whether it reached the goal or stalled in a local minimum.
ATTRIBUTION.mdLICENSEREADME.mdbaltor_test.gdcomponent.jsoninspect_gdscript.pypotential_field.gdrun_tests.gdtest_package.pytests/test_potential_field.gdverification/native.json
Full files in your harness.
What it takes and gives
- Class
- BaltorPotentialField, extends RefCounted
- Methods
- add_attractor(point: Vector2, strength: float = 1.0) -> void; add_repulsor(point: Vector2, strength: float, influence_radius: float) -> void; clear() -> void; potential_at(point: Vector2) -> float; force_at(point: Vector2) -> Vector2; follow(start: Vector2, step_length: float, max_steps: int = 500, goal_radius: float = 1.0, min_force: float = 0.001) -> Dictionary
- Placement
- res://baltor/godot_components/potential_field/
Limits. Local method: it can stall in local minima, for example when an obstacle sits exactly between agent and goal; follow() reports that instead of hiding it. Point obstacles with a radius only. Verified with Godot 4.7.2 headless; written against the Godot 4.3 API.
Details
- Kind
- Godot component
- Engine
- Godot 4.3 or later
- Files
- 11 files, 74.8 KB
- Licence
- MIT
- Declared effects
- reads files, runs commands
- Checked with
- Godot 4.7.2, headless
- Checks
- godot parse check only, godot gdscript tests, godot tests reject gutted component, godot editor import, godot contract reflection, godot readme usage compiles
- Techniques
- artificial potential fields, conic attractive potential, inverse-distance repulsive potential within an influence radius, gradient descent
- Tags
- potential field, navigation, ai, robotics, steering, gradient descent
- Identity
library.supply.creative_originals.430ed14a51e8e83114b7d4ea.965569a65f347e84- Version
965569a65f347e843c304b0dd513edc38ef0191c3ce3020615bc3405235515f3
The version is the SHA-256 of the item your harness downloads; every file in it names its own checksum.
Something wrong with this item, its rights or its safety? Report it on the support page, or from your harness after a download.