🎓 Lesson 10
D5
A* vs. RRT* vs. DWA: Algorithm Tradeoffs for Field Robotics
A* finds the shortest path by intelligently guessing distance to the goal, RRT* grows a random tree to explore tricky spaces and improves it over time, and DWA picks safe, smooth robot motions in real time when obstacles move or sensors are noisy.
🎯 Learning Objectives
- ✓ Explain the completeness and optimality guarantees of A*, RRT*, and DWA in agricultural robotics contexts
- ✓ Analyze tradeoffs among computation time, path quality, and real-time responsiveness for each algorithm using field-relevant metrics (e.g., 100 ms latency budget, 5 cm obstacle clearance)
- ✓ Apply A* on a 2D grid map, implement RRT* node expansion logic, and configure DWA parameters (max_vel_x, sim_time, occ_resolution) for a 300 kg autonomous sprayer platform
- ✓ Design a hybrid navigation strategy—e.g., A* for global path planning + DWA for local obstacle avoidance—and justify component selection based on terrain variability and GNSS/RTK uncertainty
📖 Why This Matters
In autonomous farming—like navigating uneven orchards, avoiding irrigation lines, or repositioning near livestock—robots must plan paths that are safe, efficient, and *reliable under uncertainty*. Choosing the wrong planner can mean crop damage, missed coverage, or unsafe stops mid-field. A*, RRT*, and DWA solve distinct parts of this challenge: A* gives predictable, optimal routes on known maps; RRT* handles unknown or deformable terrain (e.g., freshly plowed soil); DWA keeps the robot alive when a deer darts across its path—or when GPS drifts ±30 cm. Understanding their strengths and limits isn’t academic—it’s how you prevent $250k machinery from becoming a $50k paperweight.
📘 Core Principles
A* operates on a discretized grid or graph: it expands nodes with lowest f(n) = g(n) + h(n), where g is actual cost from start and h is an admissible heuristic (e.g., Euclidean distance). Its optimality depends on h never overestimating true cost—and fails if the map is incomplete or changes faster than replanning rate. RRT* extends Rapidly-exploring Random Tree (RRT) with asymptotic optimality: after connecting a new sample, it searches for nearby vertices to rewire the tree, reducing path cost over iterations. Unlike A*, it requires no global map—only collision queries—but converges slowly in narrow passages common in vineyard rows. DWA works in continuous velocity space: it samples linear/angular velocities within dynamic constraints (e.g., max acceleration = 0.8 m/s², sim_time = 2.0 s), simulates trajectories over that window, scores them on goal progress, obstacle clearance, and kinematic feasibility, then executes the top-scoring command. It assumes local sensor data (e.g., 270° LiDAR) is trustworthy *now*—but offers zero long-term guarantees.
📐 DWA Scoring Function
DWA selects the best velocity pair (v, ω) by maximizing a weighted sum of three criteria: goal alignment, obstacle clearance, and heading consistency. The score balances competing objectives under real-time constraints.
💡 Worked Example
Problem: A 300 kg electric sprayer (max_vel_x = 1.2 m/s, max_rot_vel = 1.0 rad/s, acc_lim_x = 0.6 m/s², acc_lim_theta = 1.2 rad/s²) scans a 2.5 m wide orchard row. At t=0, its current pose is (x=0, y=0, θ=0), goal is at (5.0, 0.0). LiDAR detects a 0.4 m diameter trunk at (3.2, 0.65) — 0.65 m off-center. Calculate DWA score for candidate velocity (v=0.9 m/s, ω=0.15 rad/s) using weights: goal_dist=0.4, occ_dist=0.5, heading=0.1.
1.
Step 1: Compute simulated trajectory over sim_time=1.8 s (default for slow-ag platforms) → yields 18 poses using constant-acceleration integration.
2.
Step 2: Goal distance term: min Euclidean distance from any pose to goal = 1.12 m → normalized score = 1 − (1.12 / 5.0) = 0.776.
3.
Step 3: Obstacle distance term: min distance from trajectory to trunk = 0.38 m → clipped to [0.1, 1.0] → score = min(1.0, 0.38 × 2.0) = 0.76.
4.
Step 4: Heading term: |θ_final − θ_goal| = |0.27 − 0| = 0.27 rad → score = 1 − min(1.0, 0.27) = 0.73.
5.
Step 5: Weighted score = (0.776 × 0.4) + (0.76 × 0.5) + (0.73 × 0.1) = 0.310 + 0.380 + 0.073 = 0.763.
Answer:
The candidate velocity scores 0.763 — acceptable (≥0.7 threshold), but lower than alternatives like (v=1.0, ω=0.0), which scores 0.812. Thus, DWA would reject the turning motion despite its heading benefit due to reduced obstacle margin.
🏗️ Real-World Application
John Deere’s See & Spray™ Select system (2023) uses hierarchical navigation: A* precomputes row-parallel global paths on RTK-mapped fields (10 cm resolution), RRT* replans globally when encountering unplanned terrain deformations (e.g., washouts from heavy rain), and DWA runs at 20 Hz on NVIDIA Jetson AGX Orin to avoid moving animals, workers, or fallen branches detected by 4× 120° LiDARs. Field trials in Central Valley almond orchards showed A*+DWA alone failed 14% of encounters with fast-moving wildlife, while adding RRT*-triggered global recovery cut failures to <2% — at the cost of 120–180 ms average replan latency, well within the 250 ms safety envelope defined by ISO 18857-2:2022 for agricultural mobile robots.
🔧 Interactive Calculator
🔧 Open Field Network Capacity📋 Case Connection
📋 EcoRobotics Swarm-Tillage Deployment in Central Valley Almond Orchards
Achieving sub-5 cm lateral positioning accuracy for tillage tools under GPS-denied canopy conditions while maintaining >...
📋 AGCO Fendt Xaver Autonomous Grain Cart System in Saskatchewan Wheat Fields
Achieving real-time, centimeter-accurate path following and dynamic grain transfer coordination between autonomous grain...
📋 Bayer Climate FieldView + Iron Ox Hydroponic Greenhouse Autonomy Pilot
Enabling real-time, bi-directional interoperability between Climate FieldView’s legacy field-crop data models (designed...