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

festival updatesfestival updatesfestival updatesfestival updatesfestival

updatesfestival updatesfestival updatesfestival updates
parent 9e38c09c
Branches
No related tags found
1 merge request!1festival updatesfestival updatesfestival updatesfestival updatesfestival
Pipeline #14647 failed
...@@ -2,26 +2,20 @@ aspect Tracing { ...@@ -2,26 +2,20 @@ aspect Tracing {
refine refine
public void Pose.setX(double x) { public void Pose.setX(double x) {
World.printContextOf("Pose.setX()-BEFORE", this, de.tudresden.inf.st.mg.common.MotionGrammarConfig.REMOVE_COLOR);
refined(x); refined(x);
World.printContextOf("Pose.setX()-AFTER", this, de.tudresden.inf.st.mg.common.MotionGrammarConfig.ADD_COLOR); World.printContextOf("Pose.setX()-AFTER", this, de.tudresden.inf.st.mg.common.MotionGrammarConfig.ADD_COLOR);
World.printContextOf("Pose.setX()-DONE", this, de.tudresden.inf.st.mg.common.MotionGrammarConfig.DEFAULT_COLOR);
} }
refine refine
public void Pose.setY(double y) { public void Pose.setY(double y) {
World.printContextOf("Pose.setY()-BEFORE", this, de.tudresden.inf.st.mg.common.MotionGrammarConfig.REMOVE_COLOR);
refined(y); refined(y);
World.printContextOf("Pose.setY()-AFTER", this, de.tudresden.inf.st.mg.common.MotionGrammarConfig.ADD_COLOR); World.printContextOf("Pose.setY()-AFTER", this, de.tudresden.inf.st.mg.common.MotionGrammarConfig.ADD_COLOR);
World.printContextOf("Pose.setY()-DONE", this, de.tudresden.inf.st.mg.common.MotionGrammarConfig.DEFAULT_COLOR);
} }
refine refine
public void Pose.setZ(double z) { public void Pose.setZ(double z) {
World.printContextOf("Pose.setZ()-BEFORE", this, de.tudresden.inf.st.mg.common.MotionGrammarConfig.REMOVE_COLOR);
refined(z); refined(z);
World.printContextOf("Pose.setZ()-AFTER", this, de.tudresden.inf.st.mg.common.MotionGrammarConfig.ADD_COLOR); World.printContextOf("Pose.setZ()-AFTER", this, de.tudresden.inf.st.mg.common.MotionGrammarConfig.ADD_COLOR);
World.printContextOf("Pose.setZ()-DONE", this, de.tudresden.inf.st.mg.common.MotionGrammarConfig.DEFAULT_COLOR);
} }
refine refine
...@@ -34,45 +28,52 @@ aspect Tracing { ...@@ -34,45 +28,52 @@ aspect Tracing {
// this is probably never called because each child overrides the setter method // this is probably never called because each child overrides the setter method
refine refine
public PhysicalObject PhysicalObject.setPose(Pose p) { public PhysicalObject PhysicalObject.setPose(Pose p) {
World.printContextOf("PhysicalObject.setPose()-BEFORE", getPose(), de.tudresden.inf.st.mg.common.MotionGrammarConfig.REMOVE_COLOR);
refined(p); refined(p);
World.printContextOf("PhysicalObject.setPose()-AFTER", getPose(), de.tudresden.inf.st.mg.common.MotionGrammarConfig.ADD_COLOR); World.printContextOf("PhysicalObject.setPose()-AFTER", getPose(), de.tudresden.inf.st.mg.common.MotionGrammarConfig.ADD_COLOR);
World.printContextOf("PhysicalObject.setPose()-DONE", getPose(), de.tudresden.inf.st.mg.common.MotionGrammarConfig.DEFAULT_COLOR);
return this; return this;
} }
refine refine
public MovableObject MovableObject.setPose(Pose p) { public MovableObject MovableObject.setPose(Pose p) {
World.printContextOf("MovableObject.setPose()-BEFORE", getPose(), de.tudresden.inf.st.mg.common.MotionGrammarConfig.REMOVE_COLOR);
refined(p); refined(p);
World.printContextOf("MovableObject.setPose()-AFTER", getPose(), de.tudresden.inf.st.mg.common.MotionGrammarConfig.ADD_COLOR); World.printContextOf("MovableObject.setPose()-AFTER", getPose(), de.tudresden.inf.st.mg.common.MotionGrammarConfig.ADD_COLOR);
World.printContextOf("MovableObject.setPose()-DONE", getPose(), de.tudresden.inf.st.mg.common.MotionGrammarConfig.DEFAULT_COLOR);
return this; return this;
} }
refine refine
public void Robot.setIsIdle(boolean b) { public void Robot.setIsIdle(boolean b) {
World.printContextOf("Robot.setIsIdle()-BEFORE", this, de.tudresden.inf.st.mg.common.MotionGrammarConfig.REMOVE_COLOR);
refined(b); refined(b);
World.printContextOf("Robot.setIsIdle()-AFTER", this, de.tudresden.inf.st.mg.common.MotionGrammarConfig.ADD_COLOR); World.printContextOf("Robot.setIsIdle()-AFTER", this, de.tudresden.inf.st.mg.common.MotionGrammarConfig.ADD_COLOR);
World.printContextOf("Robot.setIsIdle()-DONE", this, de.tudresden.inf.st.mg.common.MotionGrammarConfig.DEFAULT_COLOR);
} }
refine RelAstAPI refine RelAstAPI
public Robot Robot.setAttachedItem(MovableObject o) { public Robot Robot.setAttachedItem(MovableObject o) {
World.printContextOf("Robot.setAttachedItem()-BEFORE", this, de.tudresden.inf.st.mg.common.MotionGrammarConfig.REMOVE_COLOR);
var result = refined(o); var result = refined(o);
World.printContextOf("Robot.setAttachedItem()-AFTER", this, de.tudresden.inf.st.mg.common.MotionGrammarConfig.ADD_COLOR); World.printContextOf("Robot.setAttachedItem()-AFTER", this, de.tudresden.inf.st.mg.common.MotionGrammarConfig.ADD_COLOR);
World.printContextOf("Robot.setAttachedItem()-DONE", this, de.tudresden.inf.st.mg.common.MotionGrammarConfig.DEFAULT_COLOR);
return result; return result;
} }
refine RelAstAPI refine RelAstAPI
public MovableObject MovableObject.setAttachedRobot(Robot r) { public MovableObject MovableObject.setAttachedRobot(Robot r) {
World.printContextOf("MovableObject.setAttachedRobot()-BEFORE", this, de.tudresden.inf.st.mg.common.MotionGrammarConfig.REMOVE_COLOR);
var result = refined(r); var result = refined(r);
World.printContextOf("MovableObject.setAttachedRobot()-AFTER", this, de.tudresden.inf.st.mg.common.MotionGrammarConfig.ADD_COLOR); World.printContextOf("MovableObject.setAttachedRobot()-AFTER", this, de.tudresden.inf.st.mg.common.MotionGrammarConfig.ADD_COLOR);
World.printContextOf("MovableObject.setAttachedRobot()-DONE", this, de.tudresden.inf.st.mg.common.MotionGrammarConfig.DEFAULT_COLOR); return result;
}
// refine
// public RobotWorld RobotWorld.addSelection(Selection s) {
// RobotWorld w = refined(s);
// World.printContextOf("Robot.addSelection()-AFTER", s, de.tudresden.inf.st.mg.common.MotionGrammarConfig.ADD_COLOR);
// World.printContextOf("Robot.addSelection()-DONE", s, de.tudresden.inf.st.mg.common.MotionGrammarConfig.DEFAULT_COLOR);
// return w;
// }
refine
public JastAddList<T> JastAddList.addChild(T node) {
JastAddList<T> result = refined(node);
if (node != null && node instanceof Selection && getParent() != null) {
World.printContextOf("Robot.addSelection()-AFTER", node, de.tudresden.inf.st.mg.common.MotionGrammarConfig.ADD_COLOR);
}
return result; return result;
} }
......
...@@ -30,6 +30,8 @@ aspect Tracing { ...@@ -30,6 +30,8 @@ aspect Tracing {
} }
} }
String worldName = world.getClass().getSimpleName(); String worldName = world.getClass().getSimpleName();
java.util.Date now = new java.util.Date();
java.nio.file.Path svgPath = de.tudresden.inf.st.mg.common.MotionGrammarConfig.astDiagramDir.resolve("Context-" + worldName + "-" + new java.text.SimpleDateFormat("yyyy.MM.dd.HH.mm.ss.SSS").format(now) + "-" + step + ".svg");
try { try {
de.tudresden.inf.st.jastadd.dumpAst.ast.Dumper.read(world) de.tudresden.inf.st.jastadd.dumpAst.ast.Dumper.read(world)
...@@ -39,10 +41,11 @@ aspect Tracing { ...@@ -39,10 +41,11 @@ aspect Tracing {
.includeAttributeWhen((node, attributeName, isNTA, value) -> isNTA) .includeAttributeWhen((node, attributeName, isNTA, value) -> isNTA)
.<ASTNode>includeChildWhen((parentNode, childNode, contextName) -> !((contextName.equals("Pose") || contextName.equals("Robot")) && childNode.inDemonstrationTable())) .<ASTNode>includeChildWhen((parentNode, childNode, contextName) -> !((contextName.equals("Pose") || contextName.equals("Robot")) && childNode.inDemonstrationTable()))
.<ASTNode>includeRelationsWhen((sourceNode, targetNode, roleName) -> !roleName.equals("AttachedRobot") && !(sourceNode != null && sourceNode.inDemonstrationTable()) && !(targetNode != null && targetNode.inDemonstrationTable())) // !sourceNode.inDemonstrationTable() .<ASTNode>includeRelationsWhen((sourceNode, targetNode, roleName) -> !roleName.equals("AttachedRobot") && !(sourceNode != null && sourceNode.inDemonstrationTable()) && !(targetNode != null && targetNode.inDemonstrationTable())) // !sourceNode.inDemonstrationTable()
.dumpAsSVG(de.tudresden.inf.st.mg.common.MotionGrammarConfig.astDiagramDir.resolve("Context-" + worldName + "-" + new java.text.SimpleDateFormat("yyyy.MM.dd.HH.mm.ss.SSS").format(new java.util.Date()) + "-" + step + ".svg")); .dumpAsSVG(svgPath);
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
de.tudresden.inf.st.mg.common.DiagramProvider.getInstance().publish(now, 0, step, svgPath, "context");
} }
} }
...@@ -5,9 +5,11 @@ import com.fasterxml.jackson.databind.module.SimpleModule; ...@@ -5,9 +5,11 @@ import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
import com.google.protobuf.util.JsonFormat; import com.google.protobuf.util.JsonFormat;
import de.tudresden.inf.st.ceti.Scene; import de.tudresden.inf.st.ceti.Scene;
import de.tudresden.inf.st.mg.common.DiagramProvider;
import de.tudresden.inf.st.mg.common.MotionGrammarConfig; import de.tudresden.inf.st.mg.common.MotionGrammarConfig;
import de.tudresden.inf.st.mg.common.MotionGrammarParser; import de.tudresden.inf.st.mg.common.MotionGrammarParser;
import de.tudresden.inf.st.mg.common.TableDeserializer; import de.tudresden.inf.st.mg.common.TableDeserializer;
import de.tudresden.inf.st.mg.jastadd.model.JastAddList;
import de.tudresden.inf.st.mg.jastadd.model.RobotWorld; import de.tudresden.inf.st.mg.jastadd.model.RobotWorld;
import de.tudresden.inf.st.mg.jastadd.model.Table; import de.tudresden.inf.st.mg.jastadd.model.Table;
import de.tudresden.inf.st.mg.jastadd.model.World; import de.tudresden.inf.st.mg.jastadd.model.World;
...@@ -18,61 +20,83 @@ import java.net.URISyntaxException; ...@@ -18,61 +20,83 @@ import java.net.URISyntaxException;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.util.Comparator; import java.util.Comparator;
import java.util.Random;
public class Main { public class Main {
public static final Path TIDY_AST_DIAGRAM_DIR = Path.of("src", "gen", "resources", "diagrams", "parsing", "tidy"); public static final Path TIDY_AST_DIAGRAM_DIR = Path.of("src", "gen", "resources", "diagrams", "parsing", "tidy");
/** private final RobotWorld world;
* Runs the parser on the actual robot. For this to work, a robot controller must be connected to an MQTT server running
* on localhost:1883
*/
public static void main(String[] args) {
public Main(boolean simulate) {
MotionGrammarConfig.astDiagramDir = TIDY_AST_DIAGRAM_DIR; MotionGrammarConfig.astDiagramDir = TIDY_AST_DIAGRAM_DIR;
try { try {
Files.walk(TIDY_AST_DIAGRAM_DIR).sorted(Comparator.reverseOrder()).map(Path::toFile).forEach(File::delete); Files.walk(TIDY_AST_DIAGRAM_DIR).sorted(Comparator.reverseOrder()).map(Path::toFile).forEach(File::delete);
Files.createDirectories(TIDY_AST_DIAGRAM_DIR); Files.createDirectories(TIDY_AST_DIAGRAM_DIR);
} catch (IOException e) { } catch (IOException ignored) {
// do nothing
} }
RobotWorld world = RobotWorld.initialWorld(); if (simulate) {
world = RobotWorld.initialWorld(new Random(1));
} else {
world = RobotWorld.initialWorld();
}
try { try {
SimpleModule module = new SimpleModule(); SimpleModule module = new SimpleModule();
module.addDeserializer(Table.class, new TableDeserializer()); module.addDeserializer(Table.class, new TableDeserializer());
ObjectMapper mapper = new ObjectMapper(new YAMLFactory()); ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
mapper.registerModule(module); mapper.registerModule(module);
world.setDemonstrationTable(mapper.readValue(Main.class.getResourceAsStream("config_scene_virtual-table.yaml"), Table.class)); world.setDemonstrationTable(mapper.readValue(Main.class.getResourceAsStream("config_scene_virtual-table.yaml"), Table.class));
} catch (IOException ignored) { } catch (IOException e) {
ignored.printStackTrace(); e.printStackTrace();
} }
World.enableContextPrinting(true); World.enableContextPrinting(true);
world.printContext("initial"); world.printContext("initial");
org.fusesource.mqtt.client.MQTT handler = new org.fusesource.mqtt.client.MQTT(); if (!simulate) {
try { org.fusesource.mqtt.client.MQTT handler = new org.fusesource.mqtt.client.MQTT();
handler.setHost("tcp://localhost:1883"); try {
} catch (URISyntaxException e) { handler.setHost("tcp://localhost:1883");
e.printStackTrace(); } catch (URISyntaxException e) {
} e.printStackTrace();
world.connection = handler.blockingConnection(); }
try { world.connection = handler.blockingConnection();
world.connection.connect(); try {
} catch (Exception e) { world.connection.connect();
e.printStackTrace(); } catch (Exception e) {
e.printStackTrace();
}
System.err.println(world.connection.isConnected());
try {
world.connectTable("mqtt://localhost//ceti_cell_empty/scene/update");
} catch (IOException e) {
e.printStackTrace();
}
try {
world.connectSelection("mqtt://localhost/vr_selection");
} catch (IOException e) {
e.printStackTrace();
}
} }
System.err.println(world.connection.isConnected()); }
try { private Thread parse;
world.connectTable("mqtt://localhost//ceti_cell_empty/scene/update");
} catch (IOException e) { public void startParse() {
e.printStackTrace(); if (parse != null && parse.isAlive()) {
parse.interrupt(); // if not working replace by stop()
} }
parse = new Thread(this::parse);
parse.start();
}
public void parse() {
System.out.println("starting to parse");
// create a parser using the world // create a parser using the world
RobotParser parser = new RobotParser(world); RobotParser parser = new RobotParser(world);
...@@ -82,12 +106,27 @@ public class Main { ...@@ -82,12 +106,27 @@ public class Main {
} catch (MotionGrammarParser.ParseException e) { } catch (MotionGrammarParser.ParseException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
System.out.println("parsing completed!");
}
public void resetSelections() {
world.setSelectionList(new JastAddList<>());
}
/**
* Runs the parser on the actual robot. For this to work, a robot controller must be connected to an MQTT server running
* on localhost:1883
*/
public static void main(String[] args) {
DiagramProvider webController = DiagramProvider.getInstance();
webController.setController(new Main(false));
try { try {
Thread.sleep(100000 * 1000); Thread.sleep(Long.MAX_VALUE);
} catch (InterruptedException e) { } catch (InterruptedException ignored) {
e.printStackTrace();
} }
} }
public void printContext(String message) {
world.printContext(message);
}
} }
...@@ -26,7 +26,6 @@ public class ColorDeserializer extends JsonDeserializer<String> { ...@@ -26,7 +26,6 @@ public class ColorDeserializer extends JsonDeserializer<String> {
Long g = nodeG == null ? 0 : Math.round(nodeG.asDouble() * 255); Long g = nodeG == null ? 0 : Math.round(nodeG.asDouble() * 255);
JsonNode nodeB = node.get("b"); JsonNode nodeB = node.get("b");
Long b = nodeB == null ? 0 : Math.round(nodeB.asDouble() * 255); Long b = nodeB == null ? 0 : Math.round(nodeB.asDouble() * 255);
System.out.println("#" + String.format("%02X%02X%02X", r, g, b)); return "#" + String.format("%02x%02x%02x", r, g, b);
return "\"#" + String.format("%02X%02X%02X", r, g, b) + "\""; // FIXME remove quotes
} }
} }
package de.tudresden.inf.st.mg.common; package de.tudresden.inf.st.mg.common;
import de.tudresden.inf.st.mg.Main;
import io.javalin.Javalin; import io.javalin.Javalin;
import io.javalin.core.JavalinConfig;
import io.javalin.websocket.WsContext; import io.javalin.websocket.WsContext;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.time.Instant;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -16,6 +19,8 @@ public class DiagramProvider { ...@@ -16,6 +19,8 @@ public class DiagramProvider {
private static DiagramProvider INSTANCE; private static DiagramProvider INSTANCE;
private Main controller;
private static final Map<WsContext, String> clients = new ConcurrentHashMap<>(); private static final Map<WsContext, String> clients = new ConcurrentHashMap<>();
public static DiagramProvider getInstance() { public static DiagramProvider getInstance() {
...@@ -25,16 +30,22 @@ public class DiagramProvider { ...@@ -25,16 +30,22 @@ public class DiagramProvider {
return INSTANCE; return INSTANCE;
} }
private final List<AST> asts; private AST ast;
private AST context;
private DiagramProvider() { private DiagramProvider() {
asts = new ArrayList<>(); ast = new AST(new Date(), 0, "<no rule>", "", "ast");
context = new AST(Date.from(Instant.now()), 0, "<no rule>", "", "context");
Javalin app = Javalin.create(JavalinConfig::enableCorsForAllOrigins).start(7070);
app.get("/", ctx -> ctx.result("the context is delivered at /context and the ast is delivered at /ast"));
Javalin app = Javalin.create(config -> config.enableCorsForOrigin("http://localhost:3000")).start(7070); app.get("/ast/", ctx -> {
app.get("/", ctx -> ctx.result("Hello World")); ctx.json(ast);
});
app.get("/asts/", ctx -> { app.get("/context/", ctx -> {
ctx.json(asts); ctx.json(context);
}); });
app.ws("ast-events", ws -> { app.ws("ast-events", ws -> {
...@@ -47,27 +58,34 @@ public class DiagramProvider { ...@@ -47,27 +58,34 @@ public class DiagramProvider {
clients.remove(ctx); clients.remove(ctx);
}); });
ws.onMessage(ctx -> { ws.onMessage(ctx -> {
System.err.println("somebody sent us a message: " + ctx.message()); System.out.println("got message " + ctx.message());
if ("parse".equals(ctx.message()) && controller != null) {
controller.startParse();
} else if ("reset".equals(ctx.message()) && controller != null) {
controller.resetSelections();
controller.printContext("reset selection");
}
}); });
}); });
} }
public void publishAst(Date timestamp, int step, String parseRule, Path diagramPath) { public void publish(Date timestamp, int step, String parseRule, Path diagramPath, String type) {
System.err.println("publishing AST");
try { try {
asts.add(new AST(timestamp, step, parseRule, Files.readString(diagramPath))); if ("ast".equals(type)) {
clients.keySet().forEach(session -> { ast = new AST(timestamp, step, parseRule, Files.readString(diagramPath), type);
System.err.println("sending"); clients.keySet().forEach(session -> session.send(ast));
session.send(asts.get(asts.size() - 1)); } else if ("context".equals(type)) {
}); context = new AST(timestamp, step, parseRule, Files.readString(diagramPath), type);
clients.keySet().forEach(session -> session.send(context));
}
} catch (IOException e) { } catch (IOException e) {
System.err.println("Unable to read AST diagram file " + diagramPath); System.err.println("Unable to read " + type + " diagram file " + diagramPath);
e.printStackTrace(); e.printStackTrace();
} }
} }
public void publishContext() { public void setController(Main controller) {
this.controller = controller;
} }
public static class AST { public static class AST {
...@@ -76,11 +94,14 @@ public class DiagramProvider { ...@@ -76,11 +94,14 @@ public class DiagramProvider {
public String parseRule; public String parseRule;
public String diagram; public String diagram;
public AST(Date timestamp, int step, String parseRule, String diagram) { public String type;
public AST(Date timestamp, int step, String parseRule, String diagram, String type) {
this.timestamp = timestamp; this.timestamp = timestamp;
this.step = step; this.step = step;
this.parseRule = parseRule; this.parseRule = parseRule;
this.diagram = diagram; this.diagram = diagram;
this.type = type;
} }
} }
......
...@@ -22,8 +22,10 @@ public abstract class MotionGrammarParser<T extends MotionGrammarElement> { ...@@ -22,8 +22,10 @@ public abstract class MotionGrammarParser<T extends MotionGrammarElement> {
protected static void waitSomeTime() { protected static void waitSomeTime() {
try { try {
Thread.sleep(1000/*ms*/); Thread.sleep(100/*ms*/);
} catch(InterruptedException ignored) { } catch(InterruptedException e) {
System.err.println("received interruption while parsing");
Thread.currentThread().stop();
} }
} }
...@@ -73,7 +75,7 @@ public abstract class MotionGrammarParser<T extends MotionGrammarElement> { ...@@ -73,7 +75,7 @@ public abstract class MotionGrammarParser<T extends MotionGrammarElement> {
.skinParam(SkinParamBooleanSetting.Shadowing, false) .skinParam(SkinParamBooleanSetting.Shadowing, false)
.skinParam(SkinParamStringSetting.backgroundColor, "white") .skinParam(SkinParamStringSetting.backgroundColor, "white")
.dumpAsSVG(svgPath); .dumpAsSVG(svgPath);
DiagramProvider.getInstance().publishAst(new Date(), timeStep_, step, svgPath); DiagramProvider.getInstance().publish(new Date(), timeStep_, step, svgPath, "ast");
timeStep_++; timeStep_++;
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
......
...@@ -56,7 +56,11 @@ public class ParserTest { ...@@ -56,7 +56,11 @@ public class ParserTest {
// for some reason, the best random seed value here is 1 and not 0??? // for some reason, the best random seed value here is 1 and not 0???
RobotWorld world = RobotWorld.initialWorld(new Random(1)); RobotWorld world = RobotWorld.initialWorld(new Random(1));
World.printContextOf("initial", null, ""); world.printContext("initial");
// create a parser using the world
RobotParser parser = new RobotParser(world);
parser.setDebugDiagramDir(TIDY_AST_DIAGRAM_DIR);
world.addSelection(new Selection().setObject("boxRed").setTimeStamp(java.time.Instant.now())) world.addSelection(new Selection().setObject("boxRed").setTimeStamp(java.time.Instant.now()))
.addSelection(new Selection().setObject("boxGreen").setTimeStamp(java.time.Instant.now())) .addSelection(new Selection().setObject("boxGreen").setTimeStamp(java.time.Instant.now()))
...@@ -65,12 +69,6 @@ public class ParserTest { ...@@ -65,12 +69,6 @@ public class ParserTest {
.addSelection(new Selection().setObject("boxRed").setTimeStamp(java.time.Instant.now())) .addSelection(new Selection().setObject("boxRed").setTimeStamp(java.time.Instant.now()))
.addSelection(new Selection().setObject("boxRed").setTimeStamp(java.time.Instant.now())); .addSelection(new Selection().setObject("boxRed").setTimeStamp(java.time.Instant.now()));
World.printContextOf("initial-with-selection", null, "");
// create a parser using the world
RobotParser parser = new RobotParser(world);
parser.setDebugDiagramDir(TIDY_AST_DIAGRAM_DIR);
// parse (synchronously, long-running) // parse (synchronously, long-running)
var result = parser.parse(); var result = parser.parse();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment