Using the Potential Field algorithm in an occupancy map environment
Hello everyone,
So far I have dealt with the RRT* algorithm that received a map (a binary matrix that I turned into a map) and the initial and final position of the robot.
Now I want to use the Potential Field algorithm and put in it a start and end position and in addition the robot’s environment (the map)
How can i do it? does not succeed.
This is the code for the RRT*
clc; clear;close
% Load the original 25×25 matrix
original_matrix = dlmread("C:UsersuserDesktopmap.txt", ‘t’);
% Scale and increase dimensions to 50×50
scaled_matrix = imresize(original_matrix, [50, 50], ‘nearest’);
a=occupancyMap(scaled_matrix);
inflatedmap=copy(a);
inflate(inflatedmap,10^-1)
startPose = getRandomPose(inflatedmap);
goalPose = getRandomPose(inflatedmap);
[path,treeData] = codegenRRTStar1(inflatedmap,startPose,goalPose);
I want all the black positions the positions where there is a 1 in the matrix to be the obstacles
Attached is a link to the implementation of the desired algorithm in Matlab
https://www.mathworks.com/matlabcentral/fileexchange/126455-artificial-potential-field-path-planning-algorithm
Many thanks to all the helpers
*The positions are absolute in space and do not specify a row/column in the matrix.Hello everyone,
So far I have dealt with the RRT* algorithm that received a map (a binary matrix that I turned into a map) and the initial and final position of the robot.
Now I want to use the Potential Field algorithm and put in it a start and end position and in addition the robot’s environment (the map)
How can i do it? does not succeed.
This is the code for the RRT*
clc; clear;close
% Load the original 25×25 matrix
original_matrix = dlmread("C:UsersuserDesktopmap.txt", ‘t’);
% Scale and increase dimensions to 50×50
scaled_matrix = imresize(original_matrix, [50, 50], ‘nearest’);
a=occupancyMap(scaled_matrix);
inflatedmap=copy(a);
inflate(inflatedmap,10^-1)
startPose = getRandomPose(inflatedmap);
goalPose = getRandomPose(inflatedmap);
[path,treeData] = codegenRRTStar1(inflatedmap,startPose,goalPose);
I want all the black positions the positions where there is a 1 in the matrix to be the obstacles
Attached is a link to the implementation of the desired algorithm in Matlab
https://www.mathworks.com/matlabcentral/fileexchange/126455-artificial-potential-field-path-planning-algorithm
Many thanks to all the helpers
*The positions are absolute in space and do not specify a row/column in the matrix. Hello everyone,
So far I have dealt with the RRT* algorithm that received a map (a binary matrix that I turned into a map) and the initial and final position of the robot.
Now I want to use the Potential Field algorithm and put in it a start and end position and in addition the robot’s environment (the map)
How can i do it? does not succeed.
This is the code for the RRT*
clc; clear;close
% Load the original 25×25 matrix
original_matrix = dlmread("C:UsersuserDesktopmap.txt", ‘t’);
% Scale and increase dimensions to 50×50
scaled_matrix = imresize(original_matrix, [50, 50], ‘nearest’);
a=occupancyMap(scaled_matrix);
inflatedmap=copy(a);
inflate(inflatedmap,10^-1)
startPose = getRandomPose(inflatedmap);
goalPose = getRandomPose(inflatedmap);
[path,treeData] = codegenRRTStar1(inflatedmap,startPose,goalPose);
I want all the black positions the positions where there is a 1 in the matrix to be the obstacles
Attached is a link to the implementation of the desired algorithm in Matlab
https://www.mathworks.com/matlabcentral/fileexchange/126455-artificial-potential-field-path-planning-algorithm
Many thanks to all the helpers
*The positions are absolute in space and do not specify a row/column in the matrix. maze, map, occupancymap, potential field algorithm MATLAB Answers — New Questions