Path Planning · Potential Field Back
Robotics · Path Planning

Robot Path Planning · Potential Field Method Simulator

Real-time robot (point mass) path computation in a combined attractive/repulsive potential field. Includes potential color map, local minima detection, and simple RRT comparison.

Parameters
Potential Coefficients
Attractive coefficient k_att
Repulsive coefficient k_rep
Influence radius d₀
Start / Goal
Start X
Start Y
Goal X
Goal Y
Obstacles (3)
Results
Path Length
Iterations
Local Minima
Compute Time [ms]
Path Efficiency
Goal Reached
Pp
Theory & Key Formulas

Attractive potential:

$$U_{att}= \tfrac{1}{2}k_{att}\cdot d_{goal}^2$$

Repulsive potential (when $d_{obs}< d_0$):

$$U_{rep}= \tfrac{1}{2}k_{rep}\left(\frac{1}{d_{obs}}- \frac{1}{d_0}\right)^2$$

Resultant force: $\mathbf{F}= -\nabla(U_{att}+ \sum U_{rep})$

What is the Potential Field Method?

🙋
What exactly is the "potential field" in this robot simulator? Is it like a magnetic field?
🎓
Basically, yes! Think of the robot as a ball rolling on a landscape. The goal creates an "attractive" valley, pulling the robot down. Obstacles create "repulsive" hills, pushing it away. The simulator above calculates this landscape in real-time. Try moving the "Goal X" and "Goal Y" sliders—you'll see the attractive valley (blue area) shift instantly.
🙋
Wait, really? So the robot just follows the steepest downhill slope? What if it gets stuck in a flat spot?
🎓
Exactly right—it follows the negative gradient, which is the path of steepest descent. And you've hit on the classic problem: local minima. That's a flat spot where attractive and repulsive forces balance, like a ball in a shallow bowl. In the simulator, these are shown as red dots. Try setting a high `k_rep` and placing an obstacle between start and goal; you'll often see a red dot appear where the path stops.
🙋
So the `k_att` and `k_rep` sliders control the strength of the hills and valleys. What does the `d₀` parameter do?
🎓
Great question. `d₀` is the "influence radius" of an obstacle. An obstacle only pushes the robot if it's within this distance. It's like a personal space bubble. In practice, you don't want a tiny obstacle across the map affecting the path. Slide `d₀` up and down—you'll see the repulsive potential (red/yellow hills) grow and shrink around each obstacle.

Physical Model & Key Equations

The total potential at any point (X, Y) is the sum of attractive and repulsive potentials. The robot's planned path is the steepest descent down this combined field.

$$U_{total}(x, y) = U_{att}(x, y) + \sum U_{rep, i}(x, y)$$

Where $U_{total}$ is the total potential, $U_{att}$ is the attractive potential from the goal, and $U_{rep, i}$ is the repulsive potential from the i-th obstacle.

The attractive potential is proportional to the square of the distance to the goal, creating a smooth, parabolic valley.

$$U_{att}= \frac{1}{2}k_{att}\cdot d_{goal}^2$$

Here, $k_{att}$ is the attractive coefficient (set by the slider), and $d_{goal}$ is the Euclidean distance from the current point (x, y) to the goal. The force is the negative gradient: $\vec{F}_{att}= -k_{att}\cdot d_{goal}$, pointing directly toward the goal.

The repulsive potential is only active within a threshold distance $d_0$ from an obstacle, creating a steep, "divergent" hill.

$$U_{rep}= \begin{cases}\frac{1}{2}k_{rep}\left( \frac{1}{d_{obs}}- \frac{1}{d_0}\right)^2, & \text{if }d_{obs}\le d_0 \\ 0, & \text{if }d_{obs}> d_0 \end{cases}$$

$k_{rep}$ is the repulsive coefficient, $d_{obs}$ is the distance to the obstacle's edge, and $d_0$ is the influence radius. The force $\vec{F}_{rep}$ points directly away from the obstacle and becomes infinite as $d_{obs}$ approaches zero, ensuring collision avoidance.

Frequently Asked Questions

The repulsive potential gain (k_rep) may be too low, or the obstacle influence range (d0) may be too small. Try increasing these values in the simulator's parameter panel. Additionally, if the robot's movement speed is too high, collisions are more likely to occur.
This is a function that automatically detects a 'local minimum' state where attractive and repulsive forces balance, causing the robot to stop without reaching the goal. When detected, a warning is displayed on the screen, and the simulator uses a simple RRT comparison function to suggest an alternative path. As a workaround, try adding random fluctuations or changing the obstacle layout.
The colors represent the height of the potential energy at each position. They are displayed as a gradient from blue (low) → green → yellow → red (high). The robot avoids red areas (high potential) and moves toward blue areas (low potential). The area around the goal appears the bluest, while areas around obstacles appear red.
Not necessarily. RRT has the advantage of being less prone to local minima due to its random search, but the generated paths may not be smooth. On the other hand, the potential field method produces smooth paths but is susceptible to local minima. We recommend comparing the results of both methods and using them appropriately depending on the situation.

Real-World Applications

Autonomous Mobile Robots (AMRs) in Warehouses: This method is foundational for real-time navigation of transport robots. The robot constantly recalculates the potential field from its current sensors, allowing it to dynamically avoid moving obstacles like forklifts or other robots while heading to a loading dock. The simulator's parameters directly correlate to tuning a real robot's "aggressiveness" ($k_{att}$) and "caution" ($k_{rep}$, $d_0$).

Spacecraft Debris Avoidance Maneuvers: For initial trajectory design, a potential field can model Earth (attractive for orbit) and debris clouds (repulsive). The influence radius $d_0$ defines a safe exclusion zone. While final trajectories use precise orbital mechanics, this method provides fast, intuitive "first-guess" paths, much like the path you see computed instantly in the simulator.

Robotic Surgery & Needle Steering: In minimally invasive procedures, a surgical tool must navigate around critical organs (repulsive obstacles) to reach a tumor (the goal). The potential field framework allows for pre-operative path planning and intra-operative adjustments, where organ positions might shift slightly.

Structural Topology Optimization Analogy: In CAE, designers use sensitivity fields to iteratively remove material from low-stress areas (repulsive) and reinforce high-stress areas (attractive) to find an optimal shape. The mathematical concept of following a gradient to an optimum is directly analogous to the robot's path planning process visualized here.

Common Misconceptions and Points to Note

First, you might think that "increasing the coefficients will always improve performance," but this is a dangerous assumption. For example, setting the repulsive coefficient $k_{rep}$ extremely high makes the repulsive "hill" around obstacles too steep, which can cause robot vibration or prevent it from passing through narrow passages. Conversely, if the attractive coefficient $k_{att}$ is too strong, the robot may force its way right next to obstacles, increasing collision risk. Balance is key. You need situation-specific tuning, such as starting with values like $k_{att}=1.0, k_{rep}=0.5$ for wide warehouse aisles and reducing the repulsive influence radius $d_0$ for narrow passages.

Next, the misconception that "the calculations are light, so real-time updates are easy." While the computation per step is indeed light, if the robot gets trapped in a local minimum, it can fall into an "infinite loop" state, continuously calculating in the same spot. During implementation, safety measures like setting a maximum step count or adding small random perturbations when movement stops are essential.

Finally, this simulator's "point mass" model is a significant idealization. Real robots have size and shape. For instance, when planning for a 60cm-wide transport robot, you must consider obstacles as "inflated obstacles" by adding the robot's radius to the obstacle's radius. Trying this in the simulator by setting larger obstacles will help you intuitively grasp this concept.