Skip to content
Snippets Groups Projects
Commit 8d5ca2bd authored by Ernesto Corbellini's avatar Ernesto Corbellini
Browse files

Make client auto testing for rostest.

parent 18219028
Branches test_client
No related tags found
No related merge requests found
...@@ -46,10 +46,6 @@ public class ActionClient<T_ACTION_GOAL extends Message, ...@@ -46,10 +46,6 @@ public class ActionClient<T_ACTION_GOAL extends Message,
goalPublisher.publish(goal); goalPublisher.publish(goal);
} }
void ActionClient(string actionName) {
this.actionName = actionName;
}
private void publishClient(ConnectedNode node) { private void publishClient(ConnectedNode node) {
goalPublisher = node.newPublisher(actionName + "/goal", actionGoalType); goalPublisher = node.newPublisher(actionName + "/goal", actionGoalType);
//clientCancel = connectedNode.newPublisher("fibonacci/cancel", //clientCancel = connectedNode.newPublisher("fibonacci/cancel",
......
...@@ -37,25 +37,20 @@ public class TestClient extends AbstractNodeMain implements ActionClientListener ...@@ -37,25 +37,20 @@ public class TestClient extends AbstractNodeMain implements ActionClientListener
goalMessage.setGoal(fibonacciGoal); goalMessage.setGoal(fibonacciGoal);
while(repeat > 0) { while(repeat > 0) {
responded = false;
sleep(1000); sleep(1000);
System.out.println("Sending goal #" + repeat + "..."); System.out.println("Sending goal #" + repeat + "...");
ac.sendGoal(goalMessage); ac.sendGoal(goalMessage);
System.out.println("Goal sent."); System.out.println("Goal sent.");
repeat--; while (!responded);
}
while (repeat > 0) {
responded = false;
ac.sendGoal(goalMessage);
while (!responded) {
}
repeat--; repeat--;
} }
System.out.println("Finishing node!!"); System.out.println("Finishing node!!");
sleep(30000); //sleep(30000);
ac.finish(); //ac.finish();
node.shutdown(); //node.shutdown();
System.exit(0);
} }
@Override @Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment