A list,

Artificial potential field method is a common method for local path planning. This method assumes that the robot moves under a kind of virtual force field.





As shown in the figure, the robot is moving in a two-dimensional environment. The figure indicates the relative positions of the robot, the obstacle and the target.

This figure clearly illustrates the function of artificial potential field method. The initial point of the object is on a high “mountain”, and the target point to be reached is under the “mountain foot”, which forms a potential field. Under the guidance of this potential, the object avoids obstacles and reaches the target point.

The artificial potential field includes the repulsive field in the gravitational field, in which the target point exerts gravity on the object and guides the object towards it (this point is somewhat similar to the heuristic function H in the A* algorithm). Obstacles act as repulsive forces to prevent objects from colliding with them. The net force on the body at each point along its path is equal to the sum of all the repulsive and gravitational forces at that point. The key here is how to construct gravitational and repulsive fields. Let’s discuss it separately:

The gravitational field:









Second, existing problems

(a) When the object is further from the target point, the attraction will become extremely strong, and the relatively small repulsion force may even be negligible, so that the object may encounter obstacles in its path

(b) When there is an obstacle near the target point, the repulsive force will be very large and the attraction will be relatively small, making it difficult for the object to reach the target point

(c) At a certain point, the gravitational and repulsive forces are just equal in magnitude and the direction is opposite, then the object is easy to fall into the local optimal solution or oscillation

Various improved versions of the artificial potential field method

(a) The problem that obstacles may be encountered can be solved by modifying the gravity function to avoid excessive gravity due to the distance from the target point



Ii. Source code

Close all the clear all tic % % % = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = % initialization %========================================================================== P0 = [0;0;0]; % Starting position n =7; % Number of obstacles Tar = [10;10;10]; %% target point coordinates Obs = [10 10 10;1 1.2 1;3 2.5 3;4 4.5 4;3 6 3;6 2 6;6 6 6;8 8.5 8]'; % target point and obstacle position The first column is target point %% figure(1); Plot3 (Obs (1, 2:8), Obs (2, 2:8), Obs (3, 2:8), 'o'); hold on; plot3(Obs(1.1),Obs(2.1),Obs(3.1),'O');
for i=1:5po = i; % obstacle influence distance [P,K]=shi(Po,Tar, N,P0,Obs); % = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = % drawing % = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =switch i
    case 1
plot3(P(1.1:K),P(2.1:K),P(3.1:K),'.b');
    case 2
       plot3(P(1.1:K),P(2.1:K),P(3.1:K),'.r'); 
    case 3
        plot3(P(1.1:K),P(2.1:K),P(3.1:K),'.g');
    case 4
        plot3(P(1.1:K),P(2.1:K),P(3.1:K),'.m');
        
    otherwise
        plot3(P(1.1:K),P(2.1:K),P(3.1:K),'.k');
end
end
toc
Copy the code

3. Operation results

Fourth, note

Version: 2014 a