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

simplify

parent 2334480c
Branches
Tags
No related merge requests found
......@@ -4,9 +4,7 @@ aspect SemanticActions {
RobotScene scene = world.asRobotScene();
System.out.println("performing semantic action for element Pick");
String objectName = object();
java.util.concurrent.Executors.newSingleThreadExecutor().submit(new Runnable() {
@Override
public void run() {
java.util.concurrent.Executors.newSingleThreadExecutor().submit(() -> {
scene.getRobot().setIsIdle(false);
try { Thread.sleep(1200); } catch (InterruptedException e) { /* ignore */ }
MovableObject object = scene.getTable().getMovableObjectByName(objectName);
......@@ -14,7 +12,6 @@ aspect SemanticActions {
object.setPose(Pose.of(-1,-1,-1));
try { Thread.sleep(1200); } catch (InterruptedException e) { /* ignore */ }
scene.getRobot().setIsIdle(true);
}
});
}
......@@ -23,9 +20,7 @@ aspect SemanticActions {
System.out.println("performing semantic action for element Pick");
String objectName = object();
String placeName = place();
java.util.concurrent.Executors.newSingleThreadExecutor().submit(new Runnable() {
@Override
public void run() {
java.util.concurrent.Executors.newSingleThreadExecutor().submit(() -> {
scene.getRobot().setIsIdle(false);
try { Thread.sleep(1200); } catch (InterruptedException e) { /* ignore */ }
MovableObject object = scene.getTable().getMovableObjectByName(objectName);
......@@ -34,7 +29,6 @@ aspect SemanticActions {
scene.getRobot().setAttachedItem(null);
try { Thread.sleep(1200); } catch (InterruptedException e) { /* ignore */ }
scene.getRobot().setIsIdle(true);
}
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment