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

Updated versions.

parent 3daebb2f
Branches
Tags
1 merge request!1Multiple scenes, multiple robots and more
Pipeline #13349 passed
Showing
with 48 additions and 42 deletions
...@@ -2,7 +2,3 @@ plugins { ...@@ -2,7 +2,3 @@ plugins {
id 'ros3rag.java-common-conventions' id 'ros3rag.java-common-conventions'
id 'application' id 'application'
} }
run {
standardInput = System.in
}
...@@ -3,17 +3,19 @@ plugins { ...@@ -3,17 +3,19 @@ plugins {
} }
configurations { configurations {
baseRuntimeClasspath ragconnect
ragconnectClasspath grammar2uml
grammar2umlClasspath relast
} }
dependencies { dependencies {
api group: 'net.sf.beaver', name: 'beaver-rt', version: '0.9.11' api group: 'net.sf.beaver', name: 'beaver-rt', version: '0.9.11'
grammar2umlClasspath group: 'de.tudresden.inf.st', name: 'grammar2uml', version: '0.1.1' grammar2uml group: 'de.tudresden.inf.st', name: 'grammar2uml', version: '0.2.3'
ragconnectClasspath group: 'de.tudresden.inf.st', name: 'ragconnect', version: '0.3.1' relast group: 'org.jastadd', name: 'relast', version: "0.4.0-143"
ragconnect group: 'de.tudresden.inf.st', name: 'ragconnect', version: '1.0.0-alpha-198'
// implementation group: 'de.tudresden.inf.st', name: 'dumpAstWithPlantuml', version: '0.3.5' // implementation group: 'de.tudresden.inf.st', name: 'dumpAstWithPlantuml', version: '0.3.5'
// implementation fileTree(include: ['dumpAstWithPlantuml-0.3.5.jar'], dir: '../libs') // implementation fileTree(include: ['dumpAstWithPlantuml-0.3.5.jar'], dir: '../libs')
} }
jackson_version = 2.12.3 jackson_version = 2.13.2.2
jupiter_version = 5.8.0-M1 jackson_yaml_version = 2.13.2
assertj_version = 3.19.0 jupiter_version = 5.8.2
log4j_version = 2.14.1 assertj_version = 3.22.0
log4j_version = 2.17.2
protobuf_version = 4.0.0-rc-2 protobuf_version = 4.0.0-rc-2
protobuf_plugin_version = 0.8.16 protobuf_plugin_version = 0.8.18
jastadd_gradle_version = 1.13.3 jastadd_gradle_version = 1.14.5
...@@ -12,7 +12,7 @@ plugins { ...@@ -12,7 +12,7 @@ plugins {
} }
dependencies { dependencies {
implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: "${jackson_version}" implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: "${jackson_yaml_version}"
api group: 'com.google.protobuf', name: 'protobuf-java', version: "${protobuf_version}" api group: 'com.google.protobuf', name: 'protobuf-java', version: "${protobuf_version}"
api group: 'com.google.protobuf', name: 'protobuf-java-util', version: "${protobuf_version}" api group: 'com.google.protobuf', name: 'protobuf-java-util', version: "${protobuf_version}"
api group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1' api group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1'
......
...@@ -68,7 +68,6 @@ public abstract class SharedMainParts<MqttHandler extends SharedMainParts.MqttHa ...@@ -68,7 +68,6 @@ public abstract class SharedMainParts<MqttHandler extends SharedMainParts.MqttHa
mainHandler.setHost(config.mqttHost); mainHandler.setHost(config.mqttHost);
mainHandler.waitUntilReady(2, TimeUnit.SECONDS); mainHandler.waitUntilReady(2, TimeUnit.SECONDS);
CountDownLatch exitCondition = new CountDownLatch(1); CountDownLatch exitCondition = new CountDownLatch(1);
startCondition = new CountDownLatch(1);
mainHandler.newConnection(TOPIC_EXIT, bytes -> exitCondition.countDown()); mainHandler.newConnection(TOPIC_EXIT, bytes -> exitCondition.countDown());
mainHandler.newConnection(TOPIC_MODEL, bytes -> logStatus(new String(bytes))); mainHandler.newConnection(TOPIC_MODEL, bytes -> logStatus(new String(bytes)));
mainHandler.newConnection(TOPIC_REWIND, bytes -> mainHandler.newConnection(TOPIC_REWIND, bytes ->
...@@ -128,7 +127,7 @@ public abstract class SharedMainParts<MqttHandler extends SharedMainParts.MqttHa ...@@ -128,7 +127,7 @@ public abstract class SharedMainParts<MqttHandler extends SharedMainParts.MqttHa
startCondition.countDown(); startCondition.countDown();
break; break;
default: default:
System.err.println("Unknown command: " + command); System.err.println("Unknown coordinator command: " + command);
} }
} }
...@@ -147,10 +146,11 @@ public abstract class SharedMainParts<MqttHandler extends SharedMainParts.MqttHa ...@@ -147,10 +146,11 @@ public abstract class SharedMainParts<MqttHandler extends SharedMainParts.MqttHa
model.ragconnectSetupMqttWaitUntilReady(2, TimeUnit.SECONDS); model.ragconnectSetupMqttWaitUntilReady(2, TimeUnit.SECONDS);
if (config.useCoordinator()) { if (config.useCoordinator()) {
startCondition = new CountDownLatch(1);
mainHandler.publish(joinTopics(config.coordinatorMqttTopicPrefix, TOPIC_SUFFIX_COORDINATOR_STATUS), mainHandler.publish(joinTopics(config.coordinatorMqttTopicPrefix, TOPIC_SUFFIX_COORDINATOR_STATUS),
"up".getBytes(StandardCharsets.UTF_8)); "up".getBytes(StandardCharsets.UTF_8));
startCondition.await();
} }
startCondition.await();
connectEndpoints(); connectEndpoints();
......
dependencies { dependencies {
// jastadd2 "org.jastadd:jastadd:2.3.5" jastadd2 "org.jastadd:jastadd2:2.3.5-dresden-5"
jastadd2 fileTree(include: ['jastadd2.jar'], dir: '../libs') // jastadd2 fileTree(include: ['jastadd2.jar'], dir: '../libs')
api group: 'org.fusesource.mqtt-client', name: 'mqtt-client', version: '1.15' api group: 'org.fusesource.mqtt-client', name: 'mqtt-client', version: '1.15'
} }
sourceCompatibility = 11 sourceCompatibility = 11
...@@ -14,7 +13,7 @@ targetCompatibility = 11 ...@@ -14,7 +13,7 @@ targetCompatibility = 11
task ragConnect(type: JavaExec) { task ragConnect(type: JavaExec) {
group = 'Build' group = 'Build'
main = 'org.jastadd.ragconnect.compiler.Compiler' main = 'org.jastadd.ragconnect.compiler.Compiler'
classpath = configurations.ragconnectClasspath classpath = configurations.ragconnect
args([ args([
'--o=src/gen/jastadd', '--o=src/gen/jastadd',
...@@ -26,6 +25,7 @@ task ragConnect(type: JavaExec) { ...@@ -26,6 +25,7 @@ task ragConnect(type: JavaExec) {
'--logWrites', '--logWrites',
// '--verbose', // '--verbose',
'--rootNode=' + project.ext.ragConnectRootNode, '--rootNode=' + project.ext.ragConnectRootNode,
'--List=JastAddList',
'--experimental-jastadd-329', '--experimental-jastadd-329',
'--incremental=param', '--incremental=param',
"--tracing=cache,flush" "--tracing=cache,flush"
...@@ -38,7 +38,7 @@ task ragConnect(type: JavaExec) { ...@@ -38,7 +38,7 @@ task ragConnect(type: JavaExec) {
task grammar2uml(type: JavaExec) { task grammar2uml(type: JavaExec) {
main = 'de.tudresden.inf.st.jastadd.grammar2uml.compiler.Compiler' main = 'de.tudresden.inf.st.jastadd.grammar2uml.compiler.Compiler'
classpath = configurations.grammar2umlClasspath classpath = configurations.grammar2uml
args([ args([
'--verbose', '--verbose',
...@@ -49,10 +49,16 @@ task grammar2uml(type: JavaExec) { ...@@ -49,10 +49,16 @@ task grammar2uml(type: JavaExec) {
// phase: RelAst // phase: RelAst
task relastToJastAdd(type: JavaExec) { task relastToJastAdd(type: JavaExec) {
group = 'Build' group = 'Build'
main = "-jar" classpath = configurations.relast
//noinspection GroovyAssignabilityCheck, GroovyAccessibility
mainClass = 'org.jastadd.relast.compiler.Compiler'
args(["../libs/relast.jar", doFirst {
"--grammarName=./src/gen/jastadd/model", mkdir "src/gen/jastadd/"
}
args = [
"--grammarName=./src/gen/jastadd/model",
"--useJastAddNames", "--useJastAddNames",
"--listClass=java.util.ArrayList", "--listClass=java.util.ArrayList",
"--jastAddList=JastAddList", "--jastAddList=JastAddList",
...@@ -60,7 +66,7 @@ task relastToJastAdd(type: JavaExec) { ...@@ -60,7 +66,7 @@ task relastToJastAdd(type: JavaExec) {
"--resolverHelper", "--resolverHelper",
"--file", "--file",
"src/gen/jastadd/types.relast" "src/gen/jastadd/types.relast"
] + project.ext.relastFiles) ] + project.ext.relastFiles
inputs.files project.ext.relastFiles + ['src/gen/jastadd/types.relast'] inputs.files project.ext.relastFiles + ['src/gen/jastadd/types.relast']
outputs.files file("./src/gen/jastadd/model.ast"), file("./src/gen/jastadd/model.jadd") outputs.files file("./src/gen/jastadd/model.ast"), file("./src/gen/jastadd/model.jadd")
......
// --- receiving --- // --- receiving ---
receive tree WorldModelA.Scene using ParseScene, ConvertScene ; receive WorldModelA.Scene using ParseScene, ConvertScene ;
// rs: not sure whether we want to receive a complete scene. could be hard to update/merge // rs: not sure whether we want to receive a complete scene. could be hard to update/merge
// if necessary, need a mapping. the multi-point-connection is an alternative. // if necessary, need a mapping. the multi-point-connection is an alternative.
// we need to decide for one way // we need to decide for one way
// rs: let's try to use a "multi-point-connection" (same input meesage, multiple recipients) // rs: let's try to use a "multi-point-connection" (same input meesage, multiple recipients)
receive tree ObjectOfInterest.Position using DeserializeObject, ExtractPositionFromObject ; receive ObjectOfInterest.Position using DeserializeObject, ExtractPositionFromObject ;
receive tree ObjectOfInterest.Size using DeserializeObject, ExtractSizeFromObject ; receive ObjectOfInterest.Size using DeserializeObject, ExtractSizeFromObject ;
receive tree ObjectOfInterest.Orientation using DeserializeObject,ExtractOrientationFromObject ; receive ObjectOfInterest.Orientation using DeserializeObject,ExtractOrientationFromObject ;
DeserializeObject maps byte[] bytes to de.tudresden.inf.st.ceti.Object {: DeserializeObject maps byte[] bytes to de.tudresden.inf.st.ceti.Object {:
return de.tudresden.inf.st.ceti.Object.parseFrom(bytes); return de.tudresden.inf.st.ceti.Object.parseFrom(bytes);
...@@ -38,4 +38,4 @@ ExtractOrientationFromObject maps de.tudresden.inf.st.ceti.Object o to Orientati ...@@ -38,4 +38,4 @@ ExtractOrientationFromObject maps de.tudresden.inf.st.ceti.Object o to Orientati
:} :}
// --- sending --- // --- sending ---
send tree WorldModelA.LogicalScene ; send WorldModelA.LogicalScene ;
...@@ -68,7 +68,7 @@ public class UtilA { ...@@ -68,7 +68,7 @@ public class UtilA {
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
static class ExposingASTNode extends ASTNode { static class ExposingASTNode extends ASTNode {
public Scene exposed_apply_ConvertScene(de.tudresden.inf.st.ceti.Scene pbScene) throws Exception { public Scene exposed_apply_ConvertScene(de.tudresden.inf.st.ceti.Scene pbScene) throws Exception {
return ASTNode._apply_ConvertScene(pbScene); return ASTNode._ragconnect__apply_ConvertScene(pbScene);
} }
} }
} }
// --- receiving --- // --- receiving ---
receive tree WorldModelB.MyScene using ParseScene, ConvertScene ; receive WorldModelB.MyScene using ParseScene, ConvertScene ;
receive tree WorldModelB.OtherScene1 ; receive WorldModelB.OtherScene1 ;
receive tree WorldModelB.OtherScene2 ; receive WorldModelB.OtherScene2 ;
receive tree Robot.CanReachObjectOfInterestWrapper using ParseReachability, ConvertReachability ; receive WorldModelB.TestingOtherScene ;
receive Robot.CanReachObjectOfInterestWrapper using ParseReachability, ConvertReachability ;
// --- sending --- // --- sending ---
send tree WorldModelB.NextOperation using PrintOperation ; send WorldModelB.NextOperation using PrintOperation ;
PrintOperation maps Operation op to byte[] {: PrintOperation maps Operation op to byte[] {:
var result = op.toMergedSelection(); var result = op.toMergedSelection();
......
WorldModelB ::= Robot* [MyScene:Scene] [OtherScene1:LogicalScene] [OtherScene2:LogicalScene] /OtherScene:LogicalScene*/ /NextOperation:Operation/ ; WorldModelB ::= Robot* [MyScene:Scene] [OtherScene1:LogicalScene] [OtherScene2:LogicalScene] /OtherScene:LogicalScene*/ /NextOperation:Operation/ TestingOtherScene:LogicalScene* ;
// workaround with NTA OtherSceneList as receiving lists is not possible yet // workaround with NTA OtherSceneList as receiving lists is not possible yet
Robot ::= <Name:String> CanReachObjectOfInterestWrapper ; Robot ::= <Name:String> CanReachObjectOfInterestWrapper ;
......
...@@ -138,10 +138,10 @@ public class UtilB { ...@@ -138,10 +138,10 @@ public class UtilB {
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
static class ExposingASTNode extends ASTNode { static class ExposingASTNode extends ASTNode {
public Scene exposed_apply_ConvertScene(de.tudresden.inf.st.ceti.Scene pbScene) throws Exception { public Scene exposed_apply_ConvertScene(de.tudresden.inf.st.ceti.Scene pbScene) throws Exception {
return ASTNode._apply_ConvertScene(pbScene); return ASTNode._ragconnect__apply_ConvertScene(pbScene);
} }
public CanReachObjectOfInterestWrapper exposed_apply_ConvertReachability(de.tudresden.inf.st.ceti.Reachability r) throws Exception { public CanReachObjectOfInterestWrapper exposed_apply_ConvertReachability(de.tudresden.inf.st.ceti.Reachability r) throws Exception {
return ASTNode._apply_ConvertReachability(r); return ASTNode._ragconnect__apply_ConvertReachability(r);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment