AIToday
RoboticsQiita 機械学習Published: Oct 20, 2026, 10:00 JST

Potential field method: 20 lines of code, but stuck in a U-shaped local minimum

Potential field method: 20 lines of code, but stuck in a U-shaped local minimum

3 Key Points

  1. What happened

    The author builds a browser-based potential field method simulator, showing the method's two forces — attraction to the goal and repulsion from obstacles — make a robot slide down a potential "slope" in about 20 lines of gradient code. But when obstacles are arranged in a U shape with the goal in the middle, the robot stops at the entrance, unable to escape.

  2. Why it matters

    The local minimum means the simple "always go downhill" strategy — cheap enough to run on a few-thousand-yen microcontroller without a GPU — needs a fallback like RRT, which can reach the goal by randomly growing a search tree but produces jagged paths.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, in your inbox every morning.

Context & Analysis

The potential field method dates back to the 1980s and is still in active use for factory transport robots and drone autopilot. The reason is not sophistication but extreme lightness: unlike deep learning, it needs no GPU, and a microcontroller costing a few thousand yen can recompute a path in real time.

The body walks through a numeric example to show why the method works and where it breaks. At the start, the obstacle at (5, 0) is outside the repulsion radius d_0=3.0, so the robot moves straight right. As it approaches within 0.1 of the obstacle, the repulsive gradient spikes to about 483.35, overpowering the attractive gradient of 5.1 and pushing the robot back — collision avoided. The trouble comes when the obstacle geometry creates a pocket: the forces cancel, and the robot stops at the U's entrance.

In practice, cap the maximum number of steps (for example, 1000), add random disturbance when movement becomes tiny, and treat obstacles as inflated by the robot's radius plus a safety margin — a 60cm-wide transport robot would enlarge obstacle radii by 30cm. The realistic answer, it concludes, is to combine the potential field method with something like RRT: smoothness from one, reachability from the other.

FAQ
Why does the robot get stuck near a U-shaped obstacle?
The attractive and repulsive forces balance out completely at the entrance of the U, so the robot can no longer move downhill. This is the local minimum, the method's biggest weakness.
How does RRT compare to the potential field method?
RRT randomly grows a search tree and can get over the U-shaped wall to reach the goal, but its path is jagged. The potential field method produces smooth paths but has poor reachability.
What are the recommended parameter values?
The author suggests starting from k_att=1.0 and k_rep=0.5, then tuning d_0 (the repulsion radius). Making k_rep extremely large causes vibration and can block narrow passages.
Qiita 機械学習Read Original Article

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleMitate halts prompt injection by blocking changes, not detecting attacks