1616
1717public class Test_Goals {
1818
19- public Pair <TestAgent , UUSeAgentState > deployAgent () throws InterruptedException {
20- var agentAndState = loadSE ("myworld-3 with open door" ) ; // loadSE("myworld-3") ;
19+ public Pair <TestAgent , UUSeAgentState > deployAgent (String worldname ) throws InterruptedException {
20+ var agentAndState = loadSE (worldname ) ;
2121 TestAgent agent = agentAndState .fst ;
2222 UUSeAgentState state = agentAndState .snd ;
2323 Thread .sleep (1000 );
@@ -48,32 +48,31 @@ public void test_close2Dto_GS1() throws InterruptedException {
4848 // agent's start position.
4949 console ("*** start test..." ) ;
5050 Vec3 dest = new Vec3 (19 ,-5 ,65 ) ;
51- var agentAndState = deployAgent ();
51+ var agentAndState = deployAgent ("myworld-3" );
5252 var agent = agentAndState .fst ;
5353 GoalStructure G = DEPLOYonce (agent , UUGoalLib .closeTo (dest )) ;
5454 test_Goal (agentAndState .fst , agentAndState .snd , G ) ;
5555 G .printGoalStructureStatus ();
5656 assertTrue (G .getStatus ().success ());
5757 }
5858
59- @ Test
59+ // @Test
6060 public void test_close2Dto_GS2 () throws InterruptedException {
61- // This is a position that is unreachable, so this goal should abort
61+ // This is a position that is unreachable with 2D-nav , so this goal should abort
6262 console ("*** start test..." ) ;
6363 Vec3 dest = new Vec3 (10 ,-5 ,40 ) ;
64- var agentAndState = deployAgent ();
64+ var agentAndState = deployAgent ("myworld-3" );
6565 var agent = agentAndState .fst ;
6666 GoalStructure G = DEPLOYonce (agent , UUGoalLib .closeTo (dest )) ;
6767 test_Goal (agentAndState .fst , agentAndState .snd , G ) ;
6868 G .printGoalStructureStatus ();
6969 assertTrue (G .getStatus ().failed ());
7070 }
7171
72- @ Test
72+ // @Test
7373 public void test_closeTo_Block_1 () throws InterruptedException {
74- // This is a position that is unreachable, so this goal should abort
7574 console ("*** start test..." ) ;
76- var agentAndState = deployAgent ();
75+ var agentAndState = deployAgent ("myworld-3 with open door X" );
7776 var agent = agentAndState .fst ;
7877 GoalStructure G = DEPLOYonce (agent , UUGoalLib .closeTo (agentAndState .fst ,
7978 "LargeBlockSlideDoor" ,
@@ -85,34 +84,32 @@ public void test_closeTo_Block_1() throws InterruptedException {
8584 assertTrue (G .getStatus ().success ());
8685 }
8786
88- @ Test
87+ // @Test
8988 public void test_closeTo_Block_2 () throws InterruptedException {
90- // This is a position that is unreachable, so this goal should abort
9189 console ("*** start test..." ) ;
92- var agentAndState = deployAgent ();
90+ var agentAndState = deployAgent ("myworld-3 with open door X" );
9391 var agent = agentAndState .fst ;
9492 GoalStructure G = DEPLOYonce (agent , UUGoalLib .closeTo (agentAndState .fst ,
9593 "LargeBlockBatteryBlock" ,
9694 SEBlockFunctions .BlockSides .FRONT ,
97- 20f ,
95+ 30f ,
9896 0.5f ));
9997 test_Goal (agentAndState .fst , agentAndState .snd , G ) ;
10098 G .printGoalStructureStatus ();
101- assertTrue (G .getStatus ().failed ());
99+ assertTrue (G .getStatus ().success ());
102100 }
103101
104- @ Test
102+ // @Test
105103 public void test_navigate_and_grind () throws InterruptedException {
106- // This is a position that is unreachable, so this goal should abort
107104 console ("*** start test..." ) ;
108- var agentAndState = deployAgent ();
105+ var agentAndState = deployAgent ("myworld-3 with open door X" );
109106 TestAgent agent = agentAndState .fst ;
110107 agent .setTestDataCollector (new TestDataCollector ()) ;
111108
112109 GoalStructure G = SEQ (DEPLOYonce (agent , UUGoalLib .closeTo (agent ,
113110 "LargeBlockBatteryBlock" ,
114111 SEBlockFunctions .BlockSides .FRONT ,
115- 20f ,
112+ 30f ,
116113 0.5f )),
117114 UUGoalLib .targetBlockOK (agent , e ->
118115 "LargeBlockBatteryBlock" .equals (e .getStringProperty ("blockType" ))
0 commit comments