Open cleberjamaral opened 3 years ago
I am confused with this issue. These agents were using .get_direction/7 from goto_iaA_star.asl. This plan does a .findall in the gps_map sending all of them to the path algorithm.
.findall(gps_map(XG,YG,OG,MyMAP),gps_map(XG,YG,OG,MyMAP),LG);
.findall(attached(I,J),attached(I,J),LA);
.get_direction(OX,OY,X,Y,LG,LA,DIRECTION);
The gps_map is formed by primitive beliefs and also by results from two rules, in which one of them is:
gps_map(XB,YB,block(B),MyMAP) :-
origin(MyMAP) &
thing(I,J,block,B) &
not attached(I,J) &
myposition(X,Y) &
XB = X+I & YB = Y+J
.
Finally, the GridState.java class instantiate the states of the search algorithm considers an obstacle "block(" as below:
public boolean isWalkable(Location newl) {
return (!map.contains(newl.x, newl.y)) || // Any not mapped position is walkable (unknown and free terrains)
( // Check if the new position is mapped as a "not free" or obstacle terrains
(!map.get(newl.x, newl.y).equals("obstacle")) && // obstacle are objects mapped by lps artifact
(!map.get(newl.x, newl.y).startsWith("block(")) && // block(B) comes from a rule in the iaA_star
(!map.get(newl.x, newl.y).startsWith("entity(")) // entity(E) comes from a rule in the iaA_star
);
}
So, in theory, the algorithm should consider blocks attached to other agents or dropped on the ground as obstacles. To understand this issue we probably need to improve our debugging tools.
Duplicated #47
There are situations in which the agents are getting stuck apparently because the path algorithms is ignoring attached blocks. For instance, in the image below A4 got stuck near A1. After that A13 got stuck near A4. The objective of A13 is to connect with A1 and A4 wants to connect with A5. In this situation all these agents will wait forever for a resolution that never comes.
This problem is different than the issue #43, because here the algorithm returns a route but the routes seems to be wrong and the agent get stuck.