How can i sort coordinate points based on their short-distance between them using one of the optimization techniques?
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
AMINU ZIMIT
am 27 Feb. 2022
Bearbeitet: Suresh Maddina
am 6 Feb. 2023
I'm working on path plan for mobile robot, with multiple goals. coordiantes of their goals are provided, how can i re-arrange these coordinates based on closeness on ground, by using optimization techniques like, GA, PSO and others.
Akzeptierte Antwort
Suresh Maddina
am 6 Feb. 2023
Bearbeitet: Suresh Maddina
am 6 Feb. 2023
Hi, It is my understanding that you are trying to sort the states based on the distance to goal. The Navigation Toolbox has a method stateSpaceSE2.distance which can be used to compute the distances which can then be sorted.
Example:
% Create a state space
ss = stateSpaceSE2([0,10; 0,10; -pi,pi]);
% Generate random states from state space
states = ss.sampleUniform(100);
% Define goal
goal = [3,4,0];
% Sort the distances from states to goal
dist = distance(ss, states, goal)
[~, ind] = sort(dist);
% Sorted states
states(ind,:)
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Robotics System Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!