Skip to content
Snippets Groups Projects
Commit ecfa262b authored by FrankR's avatar FrankR
Browse files

Zwischenstand 24.11.2021 9:48

parent 7aa03f40
Branches
No related tags found
No related merge requests found
Showing
with 107 additions and 51 deletions
{"frames": [{"id": "cobot1_door_zone", "space": [{"position": {"refSystemId": "ROOT", "point": {"x": 2.0,"y": 0.0,"z": 0.0}, "accuracy": 0.0}, "orientation": {"x": 1.0,"y": 0.5,"z": 1.0, "w": 1.5}, "x": 6.0, "y": 4.0, "z":6.0}]}, {"id": "cobot1_window_zone", "space": [{"position": {"refSystemId": "ROOT", "point": {"x": 2.0,"y": 4.0,"z": 0.0}, "accuracy": 0.0}, "orientation": {"x": 1.0,"y": 0.5,"z": 1.0, "w": 1.5}, "x": 6.0, "y": 4.0, "z":6.0}]}, {"id": "robolab_east", "space": [{"position": {"refSystemId": "ROOT", "point": {"x": 4.0,"y": 2.0,"z": 0.0}, "accuracy": 0.0}, "orientation": {"x": 1.0,"y": 0.5,"z": 1.0, "w": 1.5}, "x": 4.0, "y": 4.0, "z":4.0}]}, {"id": "robolab_west", "space": [{"position": {"refSystemId": "ROOT", "point": {"x": -4.0,"y": 2.0,"z": 0.0}, "accuracy": 0.0}, "orientation": {"x": 1.0,"y": 0.5,"z": 1.0, "w": 1.5}, "x": 8.0, "y": 10.0, "z":6.0}]} ]}
{"refSystems": [{"id": "ROOT"}, {"id": "CETI_ROOT", "position": {"refSystemId": "ROOT", "point": {"x": 3.05,"y": 2.08,"z": 0.0}, "accuracy": 1.0}, "orientation": {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0}}]}
{"objectConfigs": [{"agentId": "turtlebot", "sensorId": "UWB_2", "agentType": "ROBOT", "sensorType": "UWB"}, {"agentId": "turtlebot", "sensorId": "UWB_1", "agentType": "ROBOT", "sensorType": "UWB"}, {"agentId": "turtlebot", "sensorId": "98:CD:AC:26:2D:18", "agentType": "ROBOT", "sensorType": "RFID_SCANNER"}, {"agentId": "turtlebot", "sensorId": "handy1", "agentType": "ROBOT", "sensorType": "IMU"}]}
{"objectConfigs": [{"agentId": "Employee_1", "sensorId": "UWB_2", "agentType": "HUMAN", "sensorType": "UWB"}, {"agentId": "turtlebot", "sensorId": "UWB_1", "agentType": "ROBOT", "sensorType": "UWB"}, {"agentId": "turtlebot", "sensorId": "98:CD:AC:26:2D:18", "agentType": "ROBOT", "sensorType": "RFID_SCANNER"}, {"agentId": "turtlebot", "sensorId": "handy1", "agentType": "ROBOT", "sensorType": "IMU"}]}
{"pois": [{"id": "UWB_BEACON_1", "description": "Beacon_Position", "data": {"type" : "UWB"}, "position": {"refSystemId": "ROOT", "point": {"x": 3.1,"y": 0.5,"z": 0.0}, "accuracy": 1.0}, "orientation": {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0} }, {"id": "UWB_BEACON_2", "description": "Beacon_Position", "data": {"type" : "UWB"}, "position": {"refSystemId": "ROOT", "point": {"x": -0.3,"y": 4.5,"z": 0.0}, "accuracy": 1.0}, "orientation": {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0}}, {"id": "83221710", "description": "RFID_TAG", "data": {"type" : "NFC"}, "position": {"refSystemId": "ROOT", "point": {"x": 2.1,"y": 0.4,"z": 0.5}, "accuracy": 0.1}, "orientation": {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0} }, {"id": "31762128", "description": "RFID_TAG", "data": {"type" : "NFC"}, "position": {"refSystemId": "ROOT", "point": {"x": 2.2,"y": 3.4,"z": 0.5}, "accuracy": 0.1}, "orientation": {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0} }, {"id": "885", "description": "Beacon_Position", "data": {"type" : "UWB"}, "position": {"refSystemId": "ROOT", "point": {"x": 0,"y": 0,"z": 0.97}, "accuracy": 0.01}, "orientation": {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0} }, {"id": "2934", "description": "Beacon_Position", "data": {"type" : "UWB"}, "position": {"refSystemId": "ROOT", "point": {"x": 4.24,"y": 1.33,"z": 1.0}, "accuracy": 0.01}, "orientation": {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0} }, {"id": "3383", "description": "Beacon_Position", "data": {"type" : "UWB"}, "position": {"refSystemId": "ROOT", "point": {"x": 1.25,"y": 5.89,"z": 1.06}, "accuracy": 0.01}, "orientation": {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0} }, {"id": "1107", "description": "Beacon_Position", "data": {"type" : "UWB"}, "position": {"refSystemId": "ROOT", "point": {"x": 4.24,"y": 5.83,"z": 1.05}, "accuracy": 0.01}, "orientation": {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0} }]}
{"monitoringRequests": [{"frameIds": ["cobot1_door_zone", "cobot1_window_zone"], "monitoringTaskId": "RobolabMonitoringCeti", "serializationType": "protobuf"}, {"frameIds": ["cobot1_door_zone", "cobot1_window_zone"], "monitoringTaskId": "RobolabMonitoringFrontend", "serializationType": "json"}]}
\ No newline at end of file
{"frames": [{"id": "box_1", "space": [{"position": {"refSystemId": "ROOT", "point": {"x": 0.0,"y": 4.0,"z": 0.0}, "accuracy": 0.0}, "orientation": {"x": 1.0,"y": 0.5,"z": 1.0, "w": 1.5}, "x": 0.6, "y": 1.0, "z":15.0}]}, {"id": "box_2", "space": [{"position": {"refSystemId": "ROOT", "point": {"x": 0.8,"y": 4.0,"z": 0.0}, "accuracy": 0.0}, "orientation": {"x": 1.0,"y": 0.5,"z": 1.0, "w": 1.5}, "x": 0.6, "y": 1.0, "z":15.0}]}, {"id": "box_3", "space": [{"position": {"refSystemId": "ROOT", "point": {"x": 1.6,"y": 4.0,"z": 0.0}, "accuracy": 0.0}, "orientation": {"x": 1.0,"y": 0.5,"z": 1.0, "w": 1.5}, "x": 0.6, "y": 1.0, "z":15.0}]}, {"id": "box_4", "space": [{"position": {"refSystemId": "ROOT", "point": {"x": 2.4,"y": 4.0,"z": 0.0}, "accuracy": 0.0}, "orientation": {"x": 1.0,"y": 0.5,"z": 1.0, "w": 1.5}, "x": 0.6, "y": 1.0, "z":15.0}]}, {"id": "box_5", "space": [{"position": {"refSystemId": "ROOT", "point": {"x": 3.2,"y": 4.0,"z": 0.0}, "accuracy": 0.0}, "orientation": {"x": 1.0,"y": 0.5,"z": 1.0, "w": 1.5}, "x": 0.6, "y": 1.0, "z":15.0}]}, {"id": "box_6", "space": [{"position": {"refSystemId": "ROOT", "point": {"x": 4.0,"y": 4.0,"z": 0.0}, "accuracy": 0.0}, "orientation": {"x": 1.0,"y": 0.5,"z": 1.0, "w": 1.5}, "x": 0.6, "y": 1.0, "z":15.0}]}, {"id": "shipmentBin_1", "space": [{"position": {"refSystemId": "ROOT", "point": {"x": 0.8,"y": 3.0,"z": 0.0}, "accuracy": 0.0}, "orientation": {"x": 1.0,"y": 0.5,"z": 1.0, "w": 1.5}, "x": 0.6, "y": 1.0, "z":15.0}]}, {"id": "shipmentBin_2", "space": [{"position": {"refSystemId": "ROOT", "point": {"x": 1.6,"y": 3.0,"z": 0.0}, "accuracy": 0.0}, "orientation": {"x": 1.0,"y": 0.5,"z": 1.0, "w": 1.5}, "x": 0.6, "y": 1.0, "z":15.0}]}, {"id": "shipmentBin_3", "space": [{"position": {"refSystemId": "ROOT", "point": {"x": 2.4,"y": 3.0,"z": 0.0}, "accuracy": 0.0}, "orientation": {"x": 1.0,"y": 0.5,"z": 1.0, "w": 1.5}, "x": 0.6, "y": 1.0, "z":15.0}]} ]}
{"frames": [{"id": "box_1", "space": [{"position": {"refSystemId": "ROOT", "point": {"x": 0.8,"y": 5.0,"z": 0.0}, "accuracy": 0.0}, "orientation": {"x": 1.0,"y": 0.5,"z": 1.0, "w": 1.5}, "x": 0.3, "y": 0.3, "z":15.0}]}, {"id": "box_2", "space": [{"position": {"refSystemId": "ROOT", "point": {"x": 1.6,"y": 5.0,"z": 0.0}, "accuracy": 0.0}, "orientation": {"x": 1.0,"y": 0.5,"z": 1.0, "w": 1.5}, "x": 0.3, "y": 0.3, "z":15.0}]}, {"id": "box_3", "space": [{"position": {"refSystemId": "ROOT", "point": {"x": 2.4,"y": 5.0,"z": 0.0}, "accuracy": 0.0}, "orientation": {"x": 1.0,"y": 0.5,"z": 1.0, "w": 1.5}, "x": 0.3, "y": 0.3, "z":15.0}]}, {"id": "box_4", "space": [{"position": {"refSystemId": "ROOT", "point": {"x": 3.2,"y": 5.0,"z": 0.0}, "accuracy": 0.0}, "orientation": {"x": 1.0,"y": 0.5,"z": 1.0, "w": 1.5}, "x": 0.3, "y": 0.3, "z":15.0}]}, {"id": "box_5", "space": [{"position": {"refSystemId": "ROOT", "point": {"x": 4.0,"y": 5.0,"z": 0.0}, "accuracy": 0.0}, "orientation": {"x": 1.0,"y": 0.5,"z": 1.0, "w": 1.5}, "x": 0.3, "y": 0.3, "z":15.0}]}, {"id": "box_6", "space": [{"position": {"refSystemId": "ROOT", "point": {"x": 4.8,"y": 5.0,"z": 0.0}, "accuracy": 0.0}, "orientation": {"x": 1.0,"y": 0.5,"z": 1.0, "w": 1.5}, "x": 0.3, "y": 0.3, "z":15.0}]}, {"id": "shipmentBin_1", "space": [{"position": {"refSystemId": "ROOT", "point": {"x": 0.8,"y": 4.0,"z": 0.0}, "accuracy": 0.0}, "orientation": {"x": 1.0,"y": 0.5,"z": 1.0, "w": 1.5}, "x": 0.3, "y": 0.3, "z":15.0}]}, {"id": "shipmentBin_2", "space": [{"position": {"refSystemId": "ROOT", "point": {"x": 1.6,"y": 4.0,"z": 0.0}, "accuracy": 0.0}, "orientation": {"x": 1.0,"y": 0.5,"z": 1.0, "w": 1.5}, "x": 0.3, "y": 0.3, "z":15.0}]}, {"id": "shipmentBin_3", "space": [{"position": {"refSystemId": "ROOT", "point": {"x": 2.4,"y": 4.0,"z": 0.0}, "accuracy": 0.0}, "orientation": {"x": 1.0,"y": 0.5,"z": 1.0, "w": 1.5}, "x": 0.3, "y": 0.3, "z":15.0}]} ]}
{"refSystems": [{"id": "ROOT"}, {"id": "CETI_ROOT", "position": {"refSystemId": "ROOT", "point": {"x": 3.05,"y": 2.08,"z": 0.0}, "accuracy": 1.0}, "orientation": {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0}}]}
{"objectConfigs": [{"agentId": "Employee_1", "sensorId": "UWB_2", "agentType": "HUMAN", "sensorType": "UWB"}]}
{"pois": [{"id": "885", "description": "Beacon_Position", "data": {"type" : "UWB"}, "position": {"refSystemId": "ROOT", "point": {"x": 0,"y": 0,"z": 0.97}, "accuracy": 0.01}, "orientation": {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0} }, {"id": "2934", "description": "Beacon_Position", "data": {"type" : "UWB"}, "position": {"refSystemId": "ROOT", "point": {"x": 4.24,"y": 1.33,"z": 1.0}, "accuracy": 0.01}, "orientation": {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0} }, {"id": "3383", "description": "Beacon_Position", "data": {"type" : "UWB"}, "position": {"refSystemId": "ROOT", "point": {"x": 1.25,"y": 5.89,"z": 1.06}, "accuracy": 0.01}, "orientation": {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0} }, {"id": "1107", "description": "Beacon_Position", "data": {"type" : "UWB"}, "position": {"refSystemId": "ROOT", "point": {"x": 4.24,"y": 5.83,"z": 1.05}, "accuracy": 0.01}, "orientation": {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0} }]}
\ No newline at end of file
......@@ -17,13 +17,19 @@ public class CustomLoggingFilter extends Filter<ILoggingEvent> {
} else if (event.getMessage().contains("SDF-PUB:")) {
return FilterReply.DENY;
} else if (event.getMessage().contains("INDFRO:")){
return FilterReply.ACCEPT;
return FilterReply.DENY;
} else if (event.getMessage().contains("INDFRO-DEBUG:")){
return FilterReply.ACCEPT;
return FilterReply.DENY;
} else if (event.getMessage().contains("ODO:")){
return FilterReply.DENY;
} else {
} else if (event.getMessage().contains("Received a Message:")){ // MQTT-library meldet sich
return FilterReply.DENY;
} else if (event.getMessage().contains("OP:")){
return FilterReply.ACCEPT;
}else if (event.getMessage().contains("SHELL:")){
return FilterReply.ACCEPT;
} else {
return FilterReply.DENY;
}
}
......
......@@ -151,7 +151,7 @@ public class SimpleSceneIntegration {
// publishes JSON over MQTT
if (PositionMonitoring.JSON_SERIALIZATION_TYPE.equals(serializationType)){
String fakeTopic = "ipos/client/position";
mqttService.publish(fakeTopic, jsonString, 0, false);
mqttService.publish(topic, jsonString, 0, false);
LOG.info("publishing JSON mqttMessage:" + jsonString + " on topic: " + fakeTopic);
}
}
......
......@@ -59,7 +59,7 @@ public class Triangulation {
tagPoint3D.setX((float) centroid[0]);
tagPoint3D.setY((float) centroid[1]);
tagPoint3D.setZ((float) PositionMonitoring.TRIANGULATION_HEIGHT);
// tagPoint3D.setZ((float) PositionMonitoring.TRIANGULATION_HEIGHT);
tagGaussian.setConfidenceInterval((float) standardDeviation.getLInfNorm());
tagPosition.setPoint(tagPoint3D);
tagPosition.setAccuracy(tagGaussian);
......
......@@ -34,6 +34,7 @@ public class MainApp {
public static final String COMMAND_INIT_INDFRO = "init indfro";
public static final String COMMAND_INIT_SDF = "init sdf";
public static final String COMMAND_INIT_OP = "init op";
public static final String UNKNOWN_COMMAND = "SHELL: Unknown command";
private static boolean proceed = true;
......@@ -58,7 +59,7 @@ public class MainApp {
case COMMAND_OP : OFBizOrderPicker.processPicklistTestData(TESTDATA_OP); break;
case COMMAND_OP_EVTS: OFBizOrderPicker.processPosEvtTestData(TESTDATA_OP_EVTS); break;
case COMMAND_QUERY : SimpleSceneIntegration.handleMessageFile(TESTDATA_QUERY); break;
default: LOG.info("Unknown command");
default: LOG.info(UNKNOWN_COMMAND);
}
}
}
......@@ -84,27 +85,27 @@ public class MainApp {
}
private static void printCommands() {
LOG.info("-------------------------------------");
LOG.info("Available commands: ");
LOG.info("---------");
LOG.info("Initialization: ");
LOG.info("---------");
LOG.info(COMMAND_INIT_INDFRO);
LOG.info(COMMAND_INIT_SDF);
LOG.info(COMMAND_INIT_OP);
LOG.info("---------");
LOG.info("Testdata:");
LOG.info("---------");
LOG.info(COMMAND_INDFRO);
LOG.info(COMMAND_OP);
LOG.info(COMMAND_OP_EVTS);
LOG.info(COMMAND_QUERY);
LOG.info("---------");
LOG.info("Other:");
LOG.info("---------");
LOG.info(COMMAND_EXIT);
LOG.info(COMMAND_HELP);
LOG.info("-------------------------------------");
LOG.info("SHELL:-------------------------------------");
LOG.info("SHELL:Available commands: ");
LOG.info("SHELL:---------");
LOG.info("SHELL:Initialization: ");
LOG.info("SHELL:---------");
LOG.info("SHELL:" + COMMAND_INIT_INDFRO);
LOG.info("SHELL:" + COMMAND_INIT_SDF);
LOG.info("SHELL:" + COMMAND_INIT_OP);
LOG.info("SHELL:---------");
LOG.info("SHELL:Testdata:");
LOG.info("SHELL:---------");
LOG.info("SHELL:" + COMMAND_INDFRO);
LOG.info("SHELL:" + COMMAND_OP);
LOG.info("SHELL:" + COMMAND_OP_EVTS);
LOG.info("SHELL:" + COMMAND_QUERY);
LOG.info("SHELL:---------");
LOG.info("SHELL:Other:");
LOG.info("SHELL:---------");
LOG.info("SHELL:" + COMMAND_EXIT);
LOG.info("SHELL:" + COMMAND_HELP);
LOG.info("SHELL:-------------------------------------");
}
}
......@@ -4,6 +4,7 @@ import com.google.protobuf.ProtocolStringList;
import ipos.models.GenericSensor;
import ipos.models.SimpleScene;
import ipos.project.DataModellntegration.iPos_Datamodel.*;
import ipos.project.devkit.trans.IPos2protoTransformer;
import org.apache.logging.log4j.LogManager;
import org.eclipse.emf.ecore.EObject;
......
......@@ -5,10 +5,7 @@ import ipos.project.DataModellntegration.iPos_Datamodel.*;
import ipos.project.DataModellntegration.iPos_Datamodel.IPosDevKit.DataStorageQueryRequest;
import ipos.project.DataModellntegration.iPos_Datamodel.IPosDevKit.IPosDevKitFactory;
import ipos.project.DataModellntegration.iPos_Datamodel.IPosDevKit.MonitoringRequest;
import ipos.project.Functionality.DataServices;
import ipos.project.Functionality.Odometry;
import ipos.project.Functionality.PositionCalculation;
import ipos.project.Functionality.SensorDataFusion;
import ipos.project.Functionality.*;
import ipos.project.Functionality.eventfilter.FilteringResult;
import ipos.project.Functionality.eventfilter.eventFilter;
import ipos.project.Functionality.eventfilter.readConfig;
......@@ -67,6 +64,8 @@ public class PositionMonitoring {
PositionEvent positionEvent = null;
try {
positionEvent = Triangulation.update(uwbRawDataEvent);
LOG.info("OP: position: " + logPosition(positionEvent));
} catch (ParseException e) {
e.printStackTrace();
}
......@@ -389,6 +388,7 @@ public class PositionMonitoring {
List<ZoneDescriptor> zoneDescriptors = new LinkedList<>();
for (String zoneId : filteringResult.getMatchingPositionConditionCellIds()){
ZoneDescriptor zoneDescriptor = modelFactory.createZoneDescriptor();
LOG.info("OP: zoneId: " + zoneId);
zoneDescriptor.setZoneId(zoneId);
if(isEntryNotification(filteringResult, zoneId)) {
zoneDescriptor.setNotificationType(PositionMonitoring.ENTRY_NOTIFICATION_TYPE);
......
......@@ -4,14 +4,16 @@ import org.apache.logging.log4j.LogManager;
public class NoOpAction implements Action{
private static org.apache.logging.log4j.Logger LOG = LogManager.getLogger();
String message = "";
public NoOpAction() {
}
public NoOpAction(String message){
LOG.info(message);
this.message = message;
}
@Override
public void execute() {}
public void execute() {
LOG.info(this.message);
}
}
......@@ -15,7 +15,7 @@ public abstract class AbstractZoneSequenceCondition implements Condition {
@Override
public Action evaluate(IposPositionEvent positionEvent) {
if (positionEvent.getZoneDescriptors().size() != 1){
return new NoOpAction("Error: Positionevent does not contain a single zone descriptor.");
return new NoOpAction("OP: Error: Positionevent does not contain a single zone descriptor.");
}
// assumption: positionEvent is located in exactly one zone (checked in ZoneSequenceRule.isApplicable())
ZoneDescriptor zoneDescriptor = positionEvent.getZoneDescriptors().get(0);
......@@ -33,14 +33,14 @@ public abstract class AbstractZoneSequenceCondition implements Condition {
private String createNoStageChangeLogMsg() {
String currentZoneId = currentStage.getEventDescriptors().get(0).getZoneId();
int currentQuantity = currentStage.getEventDescriptors().get(0).getQuantity();
String logMsg = "Event did not cause a state change. Current stage expects zone " + currentZoneId + ". This was the " + currentQuantity + "s event that did not cause a stage change.";
String logMsg = "OP: Event did not cause a stage change. Current stage expects zone " + currentZoneId + ". This was the " + currentQuantity + " event that did not cause a stage change.";
return logMsg;
}
private void logStageChange() {
String currentZone = currentStage.getEventDescriptors().get(0).getZoneId();
String nextZone = currentStage.getNextStage().getEventDescriptors().get(0).getZoneId();
LOG.info("Event causes a stage change. Zone of current stage: " + currentZone + ". Zone of next stage: " + nextZone);
LOG.info("OP: Event causes a stage change. Zone of current stage: " + currentZone + ". Zone of next stage: " + nextZone);
}
private void updateCurrentQuantity() {
......@@ -52,7 +52,6 @@ public abstract class AbstractZoneSequenceCondition implements Condition {
public abstract boolean causesStageChange(ZoneDescriptor zoneDescriptor);
public ZoneSequenceStage getCurrentStage() {
return currentStage;
}
......
......@@ -5,6 +5,8 @@ import ipos.project.devkit.eca.NoOpAction;
import org.apache.logging.log4j.LogManager;
public class ZoneSequenceCondition extends AbstractZoneSequenceCondition{
String recentZoneId = "";
@Override
public String toString() {
String strRepresentation = "";
......@@ -27,8 +29,21 @@ public class ZoneSequenceCondition extends AbstractZoneSequenceCondition{
@Override
public boolean causesStageChange(ZoneDescriptor zoneDescriptor) {
boolean zoneChange = eventsZoneHasChanged(zoneDescriptor); // there is no stage-change if an out-of-order event is repeated
if (zoneChange){
this.recentZoneId = zoneDescriptor.getZoneId();
}
return zoneChange;
/*
String eventZoneId = zoneDescriptor.getZoneId();
String currentStageZoneId = currentStage.getEventDescriptors().get(0).getZoneId(); // Function ZoneSequenceRule::transformIntoStage ensures that there is at most one EventDescriptor contained in a stage
return !eventZoneId.equals(currentStageZoneId);
*/
}
private boolean eventsZoneHasChanged(ZoneDescriptor zoneDescriptor) {
String eventZoneId = zoneDescriptor.getZoneId();
return !eventZoneId.equals(this.recentZoneId);
}
}
......@@ -48,7 +48,7 @@ public class OFBizOrderPicker {
ofbizOpIposExt.configureIpos(new IPosArguments.IPosConfigData() {
}); // orderpicker-extension has a prepareConfigWrapper-function that does not need any arguments. We are interested in PositionEvents for all available vessels
}catch(RuntimeException e){
LOG.info("OFBizOrderPicker-Extension of the IPos-FW could not be initialized. Exception-msg: " + e.getMessage());
LOG.info("OP: OFBizOrderPicker-Extension of the IPos-FW could not be initialized. Exception-msg: " + e.getMessage());
e.printStackTrace();
}
}
......@@ -59,7 +59,7 @@ public class OFBizOrderPicker {
publishFeTableToFeApp(feTable);
((OFBizOrderPickerExt) ofbizOpIposExt).setupECARule(picklist);
}catch (RuntimeException e){
LOG.info("Picklist could not be handled: " + e.getMessage());
LOG.info("OP: Picklist could not be handled: " + e.getMessage());
e.printStackTrace();
}
}
......@@ -68,7 +68,7 @@ public class OFBizOrderPicker {
OFBizOrderpicker.FEndWrapper proto_fendWrapper = OFBizOrderPickerTrans.transform2proto(feTable);
String jsonString = ProtoJsonMap.toJson(proto_fendWrapper);
mqttService.publish(OFBizOrderPicker.TOPIC_FRONTEND, jsonString, 0, false);
LOG.info("publishing JSON mqttMessage:" + jsonString + " on topic: " + OFBizOrderPicker.TOPIC_FRONTEND);
LOG.info("OP: publishing JSON mqttMessage:" + jsonString + " on topic: " + OFBizOrderPicker.TOPIC_FRONTEND);
}
public static void processPicklistTestData(String path_to_test_data_file){
......
......@@ -40,7 +40,7 @@ public class OFBizOrderPickerExt extends IPosExtension {
@Override
public void handlePositionEvent(IposPositionEvent posEvent, IPosArguments.HandlePosEventConf _posEvtConf) {
LOG.info("Received IposPositionEvent for agent " + posEvent.getAgentId() + ". Zones: " + extractZoneIdsAsString(posEvent.getZoneDescriptors()));
LOG.info("OP: Received IposPositionEvent for agent " + posEvent.getAgentId() + ". Zones: " + extractZoneIdsAsString(posEvent.getZoneDescriptors()));
try {
// String picklistId = readPicklistId(_posEvtConf);
// SeqPicklistRule spRule = getEcaRule(picklistId);
......@@ -58,7 +58,7 @@ public class OFBizOrderPickerExt extends IPosExtension {
// CEFResult cefResult = cef_seq.acceptPositionEvent(posEvent);
// handleCefResult(picklistId, cefResult);
}catch (RuntimeException e){
LOG.info("Exception: " + e.getMessage());
LOG.info("OP: PositionEvent could not be handled: " + e.getMessage());
return;
}
}
......@@ -105,7 +105,7 @@ public class OFBizOrderPickerExt extends IPosExtension {
List<ZoneDescriptor> zoneDescriptors = OFBizOrderPickerTrans.picklistToZoneDescriptors(picklist);
ZoneSequenceArgs.ZoneSequenceConfigure zsConfigure = new ZoneSequenceArgs.ZoneSequenceConfigure(zoneDescriptors, new SeqPicklistCondition());
spRule.configure(zsConfigure);
LOG.info("SeqPicklistRule has been created: \n" + spRule.toString());
LOG.info("OP: SeqPicklistRule has been created: \n" + spRule.toString());
spRules.add(spRule);
}
......
......@@ -32,18 +32,20 @@ public class UpdateFrontendAction extends StageChangeAction {
if (isInventoryItem(this.itemId)){
FEUpdateInventoryItem feUpdInvItem = new FEUpdateInventoryItem(index, isCorrect, itemId);
OFBizOrderpicker.FEndUpdateInventoryItem proto_invItem = FETransformer.transformIntoProto(feUpdInvItem);
String jsonString = ProtoJsonMap.toJson(proto_invItem);
OFBizOrderpicker.FEndWrapper proto_invItemWrapper = FETransformer.putIntoWrapper(proto_invItem);
String jsonString = ProtoJsonMap.toJson(proto_invItemWrapper);
OFBizOrderPicker.mqttService.publish(OFBizOrderPicker.TOPIC_FRONTEND, jsonString, 0, false);
LOG.info("publishing JSON-InventoryItem mqtt update-message to OP-Frontend-app:" + jsonString + " on topic: " + OFBizOrderPicker.TOPIC_FRONTEND);
LOG.info("OP: publishing JSON-InventoryItem mqtt update-message to OP-Frontend-app:" + jsonString + " on topic: " + OFBizOrderPicker.TOPIC_FRONTEND + ". isCorrect (proto): " + proto_invItem.getIsCorrect());
}else if(isShipmentBin(this.itemId)) {
int shipmentBinNr = extractShipmentBinNr(this.itemId);
FEUpdateShipmentBin feUpdShipBinNr = new FEUpdateShipmentBin(index, isCorrect, shipmentBinNr);
OFBizOrderpicker.FEndUpdateShipmentBin proto_shipBin = FETransformer.transformIntoProto(feUpdShipBinNr);
String jsonString = ProtoJsonMap.toJson(proto_shipBin);
OFBizOrderpicker.FEndWrapper proto_shipBinWrapper = FETransformer.putIntoWrapper(proto_shipBin);
String jsonString = ProtoJsonMap.toJson(proto_shipBinWrapper);
OFBizOrderPicker.mqttService.publish(OFBizOrderPicker.TOPIC_FRONTEND, jsonString, 0, false);
LOG.info("publishing JSON-ShipmentBin mqtt update-message to OP-Frontend-app:" + jsonString + " on topic: " + OFBizOrderPicker.TOPIC_FRONTEND);
LOG.info("OP: publishing JSON-ShipmentBin mqtt update-message to OP-Frontend-app:" + jsonString + " on topic: " + OFBizOrderPicker.TOPIC_FRONTEND+ ". isCorrect (proto): " + proto_shipBin.getIsCorrect());
} else {
LOG.info("Warning: Could not react to StageChange, as vessel-type could not be determined");
LOG.info("OP: Warning: Could not react to StageChange, as vessel-type could not be determined");
return;
}
}
......
......@@ -18,4 +18,17 @@ public class FETransformer {
proto_shipBin.setShipmentBinNrIst(feUpdShipBinNr.getShipmentBinNr_Ist());
return proto_shipBin.build();
}
public static OFBizOrderpicker.FEndWrapper putIntoWrapper(OFBizOrderpicker.FEndUpdateInventoryItem proto_invItem) {
OFBizOrderpicker.FEndWrapper.Builder proto_fendWrapper = OFBizOrderpicker.FEndWrapper.newBuilder();
proto_fendWrapper.addFEndUpdateInventoryItems(proto_invItem);
return proto_fendWrapper.build();
}
public static OFBizOrderpicker.FEndWrapper putIntoWrapper(OFBizOrderpicker.FEndUpdateShipmentBin proto_shipBin) {
OFBizOrderpicker.FEndWrapper.Builder proto_fendWrapper = OFBizOrderpicker.FEndWrapper.newBuilder();
proto_fendWrapper.addFEndUpdateShipmentBins(proto_shipBin);
return proto_fendWrapper.build();
}
}
{"objects" : [ { "id" : "Employee_1", "sensorId" : "UWB_1", "type" : "HUMAN", "sensorType" : "UWB", "position" : {"refSystemId": "ROOT", "point": {"x": 0,"y": 0,"z": 0.97}, "accuracy": 0.01}, "orientation" : {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0}, "lastPosUpdate" : "2021-10-14T19:32:20+00:00", "zoneDescriptors" : [{"zoneId" : "box_1", "notificationType" : "undefined"}] } ]}
{"objects" : [ { "id" : "Employee_1", "sensorId" : "UWB_1", "type" : "HUMAN", "sensorType" : "UWB", "position" : {"refSystemId": "ROOT", "point": {"x": 0,"y": 0,"z": 0.97}, "accuracy": 0.01}, "orientation" : {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0}, "lastPosUpdate" : "2021-10-14T19:32:20+00:00", "zoneDescriptors" : [{"zoneId" : "box_1", "notificationType" : "undefined"}] } ]}
{"objects" : [ { "id" : "Employee_1", "sensorId" : "UWB_1", "type" : "HUMAN", "sensorType" : "UWB", "position" : {"refSystemId": "ROOT", "point": {"x": 0,"y": 0,"z": 0.97}, "accuracy": 0.01}, "orientation" : {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0}, "lastPosUpdate" : "2021-10-14T19:32:20+00:00", "zoneDescriptors" : [{"zoneId" : "box_1", "notificationType" : "undefined"}] } ]}
{"objects" : [ { "id" : "Employee_1", "sensorId" : "UWB_1", "type" : "HUMAN", "sensorType" : "UWB", "position" : {"refSystemId": "ROOT", "point": {"x": 0,"y": 0,"z": 0.97}, "accuracy": 0.01}, "orientation" : {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0}, "lastPosUpdate" : "2021-10-14T19:32:20+00:00", "zoneDescriptors" : [{"zoneId" : "shipmentBin_5", "notificationType" : "undefined"}] } ]}
{"objects" : [ { "id" : "Employee_1", "sensorId" : "UWB_1", "type" : "HUMAN", "sensorType" : "UWB", "position" : {"refSystemId": "ROOT", "point": {"x": 0,"y": 0,"z": 0.97}, "accuracy": 0.01}, "orientation" : {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0}, "lastPosUpdate" : "2021-10-14T19:32:20+00:00", "zoneDescriptors" : [{"zoneId" : "shipmentBin_5", "notificationType" : "undefined"}] } ]}
{"objects" : [ { "id" : "Employee_1", "sensorId" : "UWB_1", "type" : "HUMAN", "sensorType" : "UWB", "position" : {"refSystemId": "ROOT", "point": {"x": 0,"y": 0,"z": 0.97}, "accuracy": 0.01}, "orientation" : {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0}, "lastPosUpdate" : "2021-10-14T19:32:20+00:00", "zoneDescriptors" : [{"zoneId" : "shipmentBin_5", "notificationType" : "undefined"}] } ]}
{"objects" : [ { "id" : "Employee_1", "sensorId" : "UWB_1", "type" : "HUMAN", "sensorType" : "UWB", "position" : {"refSystemId": "ROOT", "point": {"x": 0,"y": 0,"z": 0.97}, "accuracy": 0.01}, "orientation" : {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0}, "lastPosUpdate" : "2021-10-14T19:32:20+00:00", "zoneDescriptors" : [{"zoneId" : "box_4", "notificationType" : "undefined"}] } ]}
{"objects" : [ { "id" : "Employee_1", "sensorId" : "UWB_1", "type" : "HUMAN", "sensorType" : "UWB", "position" : {"refSystemId": "ROOT", "point": {"x": 0,"y": 0,"z": 0.97}, "accuracy": 0.01}, "orientation" : {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0}, "lastPosUpdate" : "2021-10-14T19:32:20+00:00", "zoneDescriptors" : [{"zoneId" : "box_4", "notificationType" : "undefined"}] } ]}
{"objects" : [ { "id" : "Employee_1", "sensorId" : "UWB_1", "type" : "HUMAN", "sensorType" : "UWB", "position" : {"refSystemId": "ROOT", "point": {"x": 0,"y": 0,"z": 0.97}, "accuracy": 0.01}, "orientation" : {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0}, "lastPosUpdate" : "2021-10-14T19:32:20+00:00", "zoneDescriptors" : [{"zoneId" : "box_4", "notificationType" : "undefined"}] } ]}
{"objects" : [ { "id" : "Employee_1", "sensorId" : "UWB_1", "type" : "HUMAN", "sensorType" : "UWB", "position" : {"refSystemId": "ROOT", "point": {"x": 0,"y": 0,"z": 0.97}, "accuracy": 0.01}, "orientation" : {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0}, "lastPosUpdate" : "2021-10-14T19:32:20+00:00", "zoneDescriptors" : [{"zoneId" : "shipmentBin_3", "notificationType" : "undefined"}] } ]}
{"objects" : [ { "id" : "Employee_1", "sensorId" : "UWB_1", "type" : "HUMAN", "sensorType" : "UWB", "position" : {"refSystemId": "ROOT", "point": {"x": 0,"y": 0,"z": 0.97}, "accuracy": 0.01}, "orientation" : {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0}, "lastPosUpdate" : "2021-10-14T19:32:20+00:00", "zoneDescriptors" : [{"zoneId" : "shipmentBin_3", "notificationType" : "undefined"}] } ]}
{"objects" : [ { "id" : "Employee_1", "sensorId" : "UWB_1", "type" : "HUMAN", "sensorType" : "UWB", "position" : {"refSystemId": "ROOT", "point": {"x": 0,"y": 0,"z": 0.97}, "accuracy": 0.01}, "orientation" : {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0}, "lastPosUpdate" : "2021-10-14T19:32:20+00:00", "zoneDescriptors" : [{"zoneId" : "shipmentBin_3", "notificationType" : "undefined"}] } ]}
{"objects" : [ { "id" : "Employee_1", "sensorId" : "UWB_1", "type" : "HUMAN", "sensorType" : "UWB", "position" : {"refSystemId": "ROOT", "point": {"x": 0,"y": 0,"z": 0.97}, "accuracy": 0.01}, "orientation" : {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0}, "lastPosUpdate" : "2021-10-14T19:32:20+00:00", "zoneDescriptors" : [{"zoneId" : "shipmentBin_3", "notificationType" : "undefined"}] } ]}
{"objects" : [ { "id" : "Employee_1", "sensorId" : "UWB_1", "type" : "HUMAN", "sensorType" : "UWB", "position" : {"refSystemId": "ROOT", "point": {"x": 0,"y": 0,"z": 0.97}, "accuracy": 0.01}, "orientation" : {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0}, "lastPosUpdate" : "2021-10-14T19:32:20+00:00", "zoneDescriptors" : [{"zoneId" : "box_5", "notificationType" : "undefined"}] } ]}
{"objects" : [ { "id" : "Employee_1", "sensorId" : "UWB_1", "type" : "HUMAN", "sensorType" : "UWB", "position" : {"refSystemId": "ROOT", "point": {"x": 0,"y": 0,"z": 0.97}, "accuracy": 0.01}, "orientation" : {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0}, "lastPosUpdate" : "2021-10-14T19:32:20+00:00", "zoneDescriptors" : [{"zoneId" : "box_5", "notificationType" : "undefined"}] } ]}
{"objects" : [ { "id" : "Employee_1", "sensorId" : "UWB_1", "type" : "HUMAN", "sensorType" : "UWB", "position" : {"refSystemId": "ROOT", "point": {"x": 0,"y": 0,"z": 0.97}, "accuracy": 0.01}, "orientation" : {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0}, "lastPosUpdate" : "2021-10-14T19:32:20+00:00", "zoneDescriptors" : [{"zoneId" : "box_5", "notificationType" : "undefined"}] } ]}
{"objects" : [ { "id" : "Employee_1", "sensorId" : "UWB_1", "type" : "HUMAN", "sensorType" : "UWB", "position" : {"refSystemId": "ROOT", "point": {"x": 0,"y": 0,"z": 0.97}, "accuracy": 0.01}, "orientation" : {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0}, "lastPosUpdate" : "2021-10-14T19:32:20+00:00", "zoneDescriptors" : [{"zoneId" : "shipmentBin_3", "notificationType" : "undefined"}] } ]}
{"objects" : [ { "id" : "Employee_1", "sensorId" : "UWB_1", "type" : "HUMAN", "sensorType" : "UWB", "position" : {"refSystemId": "ROOT", "point": {"x": 0,"y": 0,"z": 0.97}, "accuracy": 0.01}, "orientation" : {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0}, "lastPosUpdate" : "2021-10-14T19:32:20+00:00", "zoneDescriptors" : [{"zoneId" : "shipmentBin_3", "notificationType" : "undefined"}] } ]}
{"objects" : [ { "id" : "Employee_1", "sensorId" : "UWB_1", "type" : "HUMAN", "sensorType" : "UWB", "position" : {"refSystemId": "ROOT", "point": {"x": 0,"y": 0,"z": 0.97}, "accuracy": 0.01}, "orientation" : {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0}, "lastPosUpdate" : "2021-10-14T19:32:20+00:00", "zoneDescriptors" : [{"zoneId" : "shipmentBin_3", "notificationType" : "undefined"}] } ]}
{"objects" : [ { "id" : "Employee_1", "sensorId" : "UWB_1", "type" : "HUMAN", "sensorType" : "UWB", "position" : {"refSystemId": "ROOT", "point": {"x": 0,"y": 0,"z": 0.97}, "accuracy": 0.01}, "orientation" : {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0}, "lastPosUpdate" : "2021-10-14T19:32:20+00:00", "zoneDescriptors" : [{"zoneId" : "box_2", "notificationType" : "undefined"}] } ]}
{"objects" : [ { "id" : "Employee_1", "sensorId" : "UWB_1", "type" : "HUMAN", "sensorType" : "UWB", "position" : {"refSystemId": "ROOT", "point": {"x": 0,"y": 0,"z": 0.97}, "accuracy": 0.01}, "orientation" : {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0}, "lastPosUpdate" : "2021-10-14T19:32:20+00:00", "zoneDescriptors" : [{"zoneId" : "box_2", "notificationType" : "undefined"}] } ]}
{"objects" : [ { "id" : "Employee_1", "sensorId" : "UWB_1", "type" : "HUMAN", "sensorType" : "UWB", "position" : {"refSystemId": "ROOT", "point": {"x": 0,"y": 0,"z": 0.97}, "accuracy": 0.01}, "orientation" : {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0}, "lastPosUpdate" : "2021-10-14T19:32:20+00:00", "zoneDescriptors" : [{"zoneId" : "box_2", "notificationType" : "undefined"}] } ]}
{"objects" : [ { "id" : "Employee_1", "sensorId" : "UWB_1", "type" : "HUMAN", "sensorType" : "UWB", "position" : {"refSystemId": "ROOT", "point": {"x": 0,"y": 0,"z": 0.97}, "accuracy": 0.01}, "orientation" : {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0}, "lastPosUpdate" : "2021-10-14T19:32:20+00:00", "zoneDescriptors" : [{"zoneId" : "shipmentBin_2", "notificationType" : "undefined"}] } ]}
{"objects" : [ { "id" : "Employee_1", "sensorId" : "UWB_1", "type" : "HUMAN", "sensorType" : "UWB", "position" : {"refSystemId": "ROOT", "point": {"x": 0,"y": 0,"z": 0.97}, "accuracy": 0.01}, "orientation" : {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0}, "lastPosUpdate" : "2021-10-14T19:32:20+00:00", "zoneDescriptors" : [{"zoneId" : "shipmentBin_2", "notificationType" : "undefined"}] } ]}
{"objects" : [ { "id" : "Employee_1", "sensorId" : "UWB_1", "type" : "HUMAN", "sensorType" : "UWB", "position" : {"refSystemId": "ROOT", "point": {"x": 0,"y": 0,"z": 0.97}, "accuracy": 0.01}, "orientation" : {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0}, "lastPosUpdate" : "2021-10-14T19:32:20+00:00", "zoneDescriptors" : [{"zoneId" : "shipmentBin_2", "notificationType" : "undefined"}] } ]}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment