Skip to content
Snippets Groups Projects
Commit d76dfd2d authored by René Schöne's avatar René Schöne
Browse files

update

- fix bug after remove CanReachObjectOfInterestWrapper
parent 3bd1297d
No related branches found
No related tags found
No related merge requests found
Pipeline #13909 failed
......@@ -156,26 +156,24 @@ public class MainScalingB {
Robot robot = new Robot().setName("ARM" + robotIndex);
// reachability
CanReachObjectOfInterestWrapper wrapper = new CanReachObjectOfInterestWrapper();
// each robot arm can reach the location of its region (and the start region, for the first robot)
if (robotIndex == 0) {
for (String location : world.findRegion("Start").locationNamesAsList()) {
wrapper.addCanReachObjectOfInterest(new CanReachObjectOfInterest(location));
robot.addCanReachObjectOfInterest(new CanReachObjectOfInterest(location));
}
}
for (String location : world.findRegion(regionOfRobot).locationNamesAsList()) {
wrapper.addCanReachObjectOfInterest(new CanReachObjectOfInterest(location));
robot.addCanReachObjectOfInterest(new CanReachObjectOfInterest(location));
}
// add reachability for collaboration zones
if (robotIndex != 0) {
// reachability to previous collaboration zone
wrapper.addCanReachObjectOfInterest(new CanReachObjectOfInterest("P-Collab" + (robotIndex - 1)));
robot.addCanReachObjectOfInterest(new CanReachObjectOfInterest("P-Collab" + (robotIndex - 1)));
}
if (robotIndex != config.robots - 1) {
// reachability to its collaboration zone
wrapper.addCanReachObjectOfInterest(new CanReachObjectOfInterest("P-Collab" + (robotIndex)));
robot.addCanReachObjectOfInterest(new CanReachObjectOfInterest("P-Collab" + (robotIndex)));
}
robot.setCanReachObjectOfInterestWrapper(wrapper);
world.addRobot(robot);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment