Skip to content
Snippets Groups Projects
Commit 184df02f authored by Johannes Mey's avatar Johannes Mey
Browse files

improve demo execution on real robot

parent cbe02b3b
No related branches found
No related tags found
No related merge requests found
Pipeline #14153 failed
Source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -15,6 +15,7 @@ aspect CleanupAttributes {
eq RobotIsNotReadyToPick.time() = 4;
eq RobotIsNotReadyToDrop.time() = 4;
eq WaitForEmptyTable.time() = 4;
eq WaitForFullTable.time() = 4;
eq ASTNode.time() {
throw new UnsupportedOperationException("Invalid use of attribute time():double");
}
......@@ -23,6 +24,7 @@ aspect CleanupAttributes {
eq RobotIsNotReadyToPick.getWait().time() = time();
eq RobotIsNotReadyToDrop.getWait().time() = time();
eq WaitForEmptyTable.getWait().time() = time();
eq WaitForFullTable.getWait().time() = time();
syn String ASTNode.place(); // TODO can this be avoided?
eq DropObjectAtRightPlace.place() = getRightPlace().getPlace();
......
aspect RobotWorld {
public boolean RobotScene.simulated = true;
public String RobotScene.commandTopic = "/ceti_cell_empty/command";
public org.fusesource.mqtt.client.BlockingConnection RobotScene.connection;
public static RobotScene RobotScene.initialWorld(java.util.Random random) {
......
......@@ -22,7 +22,7 @@ aspect SemanticActions {
} else {
de.tudresden.inf.st.ceti.Command c = de.tudresden.inf.st.ceti.Command.newBuilder().setPick(de.tudresden.inf.st.ceti.Pick.newBuilder().setIdRobot("arm").setIdPick(object()).build()).build();
try {
scene.connection.publish("/ceti_cell_placeworld/command", c.toByteArray(), org.fusesource.mqtt.client.QoS.AT_LEAST_ONCE, false);
scene.connection.publish(scene.commandTopic, c.toByteArray(), org.fusesource.mqtt.client.QoS.AT_LEAST_ONCE, false);
} catch (Exception e) {
e.printStackTrace();
}
......@@ -52,7 +52,7 @@ aspect SemanticActions {
} else {
de.tudresden.inf.st.ceti.Command c = de.tudresden.inf.st.ceti.Command.newBuilder().setDrop(de.tudresden.inf.st.ceti.Drop.newBuilder().setIdRobot("arm").setIdBin(place()).build()).build();
try {
scene.connection.publish("/ceti_cell_placeworld/command", c.toByteArray(), org.fusesource.mqtt.client.QoS.AT_LEAST_ONCE, false);
scene.connection.publish(scene.commandTopic, c.toByteArray(), org.fusesource.mqtt.client.QoS.AT_LEAST_ONCE, false);
} catch (Exception e) {
e.printStackTrace();
}
......
......@@ -64,7 +64,7 @@ public class ParserTest {
RobotParser parser = new RobotParser(world);
parser.setDebugDiagramDir(TIDY_AST_DIAGRAM_DIR);
// parse (synchonously, long-running)
// parse (synchronously, long-running)
var result = parser.parse();
assertThat(result).isNotNull().isInstanceOf(Tidy.class);
......@@ -115,7 +115,7 @@ public class ParserTest {
// create a parser using the world
RobotParser parser = new RobotParser(world);
// parse (synchonously, long-running)
// parse (synchronously, long-running)
var result = parser.parse();
assertThat(result).isNotNull().isInstanceOf(Tidy.class);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment