bu-air-lab/asp_navigation

Wrong Action Sequence Generated at step 7

Closed this issue · 2 comments

There is a generation of Wrong Action Sequence at step 7, It should be unload at 7 and then approach action

approach(d1_corr_m_corr_watson,0) gothrough(d1_corr_m_corr_watson,2) approach(d1_corr_m_corr_watson,4) gothrough(d1_corr_m_corr_watson,6) approach(d1_corr_m_corr_watson,7) gothrough(d1_corr_m_corr_watson,10) approach(d1_corr_m_corr_watson,12) gothrough(d1_corr_m_corr_watson,14) unload(b0,8) unload(s0,15) load(b0,3) load(s0,11) opendoor(d1_corr_m_corr_watson,1) opendoor(d1_corr_m_corr_watson,5) opendoor(d1_corr_m_corr_watson,9) opendoor(d1_corr_m_corr_watson,13)

The query was this :-
at(r1_corr_watson, 0).
located(O, r1_corr_m, 0) :- object(O).
-loaded(O, 0) :- object(O).

:- not located(b0, r1_corr_watson, n-1).
:- not located(s0, r1_corr_watson, n-1).

#show approach/2.
#show gothrough/2.
#show opendoor/2.
#show load/2.
#show unload/2.

I added the following line to state that an "unload" action causes the robot not facing any door, forcing the robot to "unload" before "approach".
-facing(D,I+1) :- unload(O,I), object(O), door(D), I=0..n-2.

If the issue is resolved, please close the issue.

That fixed the issue!