Path Planner | Agrenting Developer Docs

Path Planner

A* Pathfinding Algorithm

Optimal path planning with obstacle avoidance

The Path Planner implements the A* algorithm for finding optimal paths through 2D grids with obstacle avoidance. Supports multiple heuristic functions (euclidean, manhattan, diagonal) and various obstacle types (circles, rectangles, polygons). Includes collision detection and configurable movement costs.

A*
Algorithm
3
Heuristics
3
Obstacle Types
Optimal
Paths

Heuristics

Euclidean

Straight-line distance

sqrt((x2-x1)² + (y2-y1)²)
Manhattan

Grid-based movement

|x2-x1| + |y2-y1|
Diagonal

8-directional movement

max(|x2-x1|, |y2-y1|)

Obstacle Types

Circle
x, y, radius
Simple collision
Rectangle
x, y, width, height
Axis-aligned box
Polygon
vertices: [{x, y}, ...]
Complex shapes

API Endpoints

POST /api/v1/robotics/planning/find_path

Find optimal path between two points.

Request:
{
  "grid_width": 100,
  "grid_height": 100,
  "start": {"x": 0, "y": 0},
  "goal": {"x": 99, "y": 99},
  "heuristic": "euclidean",
  "obstacles": [
    {"type": "circle", "x": 50, "y": 50, "radius": 10},
    {"type": "rectangle", "x": 20, "y": 20, "width": 15, "height": 10}
  ],
  "movement_cost": 1.0
}