Commit ce6b2506 authored by Svetlana Pavlitskaya's avatar Svetlana Pavlitskaya

updated dependencies that have migrated to gitlab. EMADL for all components...

updated dependencies that have migrated to gitlab. EMADL for all components (Math or EMADL). One mastercomponent with connects instead of several components. 3D matrices
parent 3aeb19fd
......@@ -12,7 +12,9 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<useIncrementalCompilation>true</useIncrementalCompilation>
<source>1.8</source>
<target>1.8</target>
</configuration>
......@@ -23,14 +25,10 @@
<dependencies>
<dependency>
<groupId>de.monticore.lang.monticar</groupId>
<artifactId>embedded-montiarc</artifactId>
<version>0.0.11c-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>de.monticore.lang.monticar</groupId>
<artifactId>embedded-montiarc-deeplearning</artifactId>
<version>0.2.0-SNAPSHOT</version>
<artifactId>embedded-montiarc-emadl-generator</artifactId>
<version>0.2.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
configuration Dpnet{
num_epoch : 100
batch_size : 64
context:cpu
optimizer : sgd{
learning_rate : 0.01
}
}
......@@ -29,7 +29,7 @@
<dependency>
<groupId>de.monticore.lang.monticar</groupId>
<artifactId>embedded-montiarc-math-generator</artifactId>
<version>0.0.6-SNAPSHOT</version>
<version>0.0.9-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>de.monticore.lang.monticar</groupId>
......@@ -37,14 +37,14 @@
<version>0.0.1c-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>de.moticore.lang.monticar</groupId>
<groupId>de.monticore.lang.monticar</groupId>
<artifactId>embedded-montiarc-math-middleware-generator</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>de.monticore.lang.monticar</groupId>
<artifactId>embedded-montiarc-deeplearning</artifactId>
<version>0.2.0-SNAPSHOT</version>
<artifactId>embedded-montiarc-emadl-generator</artifactId>
<version>0.2.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>de.monticore.lang.monticar</groupId>
......
......@@ -34,11 +34,12 @@ public class Generator {
public static void main(String[] args) {
System.out.println("Starting code generation...");
generateForEmamComponent("Imagepreprocessing");
generateForEmamComponent("Safetycontroller");
generateForEmamComponent("Drivercontroller");
// generateForEmamComponent("Featureextraction");
generateForEmadlComponent("Featureextraction");
// generateForEmamComponent("Imagepreprocessing");
// generateForEmamComponent("Safetycontroller");
// generateForEmamComponent("Drivercontroller");
//// generateForEmamComponent("Featureextraction");
// generateForEmadlComponent("Featureextraction");
generateForEmadlComponent("Mastercomponent");
try {
Files.copy(Paths.get(RESOURCES_PATH+"scripts/build_all.sh"), Paths.get(TARGET_PATH_GENERATED+"build_all.sh"), StandardCopyOption.REPLACE_EXISTING);
......
package dp;
component Drivercontroller {
ports
in Q(0:1)^{13,1} affordanceIn,
out Q(0:1)^{3,1} commandsOut;
implementation Math {
commandsOut(1,1)=0.5; // steering
commandsOut(2,1)=0.8; // acceleration
commandsOut(3,1)=0.0; // brake
}
}
package dp;
conforms to de.monticore.lang.monticar.generator.roscpp.RosToEmamTagSchema;
tags Drivercontroller {
tag drivercontroller.affordanceIn with RosConnection = {topic=(/affordance,std_msgs/Float64MultiArray)};
tag drivercontroller.commandsOut with RosConnection = {topic=(/commands,std_msgs/Float32MultiArray)};
}
package dp;
conforms to de.monticore.lang.monticar.generator.roscpp.RosToEmamTagSchema;
tags Featureextraction {
tag featureextraction.imageIn with RosConnection = {topic=(/images,std_msgs/Int8MultiArray)};
tag featureextraction.affordanceOut with RosConnection = {topic=(/affordance,std_msgs/Float64MultiArray)};
}
package dp;
component Imagepreprocessing {
ports
in Z(0:255)^{640,480} imageIn,
out Z(0:255)^{640,480} imageOut;
implementation Math {
imageOut=imageIn;
}
}
package dp;
conforms to de.monticore.lang.monticar.generator.roscpp.RosToEmamTagSchema;
tags Imagepreprocessing {
tag imagepreprocessing.imageIn with RosConnection = {topic=(/camera,std_msgs/Int8MultiArray)};
tag imagepreprocessing.imageOut with RosConnection = {topic=(/images,std_msgs/Int8MultiArray)};
}
package dp;
import dp.subcomponents.*;
component Mastercomponent {
ports
in Z(0:255)^{3, 240, 320} imageIn,
out Q(0:1)^{3,1,1} commandsOut;
instance Imagepreprocessing ip;
instance Dpnet dn;
instance Drivercontroller dc;
connect imageIn -> ip.imageIn;
connect ip.imageOut -> dn.image;
connect dn.predictions -> dc.commandsOut;
connect dc.commandsOut -> commandsOut;
}
\ No newline at end of file
package dp;
conforms to de.monticore.lang.monticar.generator.roscpp.RosToEmamTagSchema;
tags Mastercomponent {
tag mastercomponent.imageIn with RosConnection = {topic=(/camera,std_msgs/Int8MultiArray)};
tag mastercomponent.commandsOut with RosConnection = {topic=(/commands,std_msgs/Float32MultiArray)};
}
package dp;
conforms to de.monticore.lang.monticar.generator.roscpp.RosToEmamTagSchema;
tags Safetycontroller {
tag safetycontroller.imageIn with RosConnection = {topic=(/images,std_msgs/Int8MultiArray)};
tag safetycontroller.affordanceIn with RosConnection = {topic=(/affordance,std_msgs/Float64MultiArray)};
tag safetycontroller.safetyLevelOut with RosConnection = {topic=(/safety,std_msgs/Float64MultiArray)};
}
configuration Featureextraction{
configuration Dpnet{
num_epoch : 100
batch_size : 64
context:cpu
optimizer : sgd{
learning_rate : 0.01
}
......
package dp;
package dp.subcomponents;
component Featureextraction {
ports
in Z(0:255)^{3, 640, 480} imageIn,
out Q(0:1)^{13,1,1} affordanceOut;
//implementation Math {
// affordanceOut=[0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0];
//}
component Dpnet{
ports in Z(0:255)^{3, 210, 280} image,
out Q(0:1)^{13,1,1} predictions;
implementation CNN {
......@@ -22,17 +17,17 @@ component Featureextraction {
Dropout()
}
imageIn ->
image ->
conv(kernel=(11,11), channels=96, convStride=(4,4)) ->
conv(kernel=(5,5), channels=256, convStride=(4,4)) ->
conv(kernel=(3,3), channels=384, hasPool=false) ->
conv(kernel=(3,3), channels=384, hasPool=false) ->
conv(kernel=(3,3), channels=256) ->
fc() ->
fc() ->
fc() ->
FullyConnected(units=13) ->
Sigmoid() ->
affordanceOut
predictions
}
}
package dp.subcomponents;
component Drivercontroller {
ports
in Q(0:1)^{13,1,1} affordanceIn,
out Q(0:1)^{3,1,1} commandsOut;
implementation Math {
commandsOut(1,1,1)=0.5; // steering
commandsOut(2,1,1)=0.8; // acceleration
commandsOut(3,1,1)=0.0; // brake
}
}
\ No newline at end of file
package dp.subcomponents;
component Imagepreprocessing {
ports
in Z(0:255)^{3, 240, 320} imageIn,
out Z(0:255)^{3, 210, 280} imageOut;
implementation Math {
imageOut=imageIn;
}
}
\ No newline at end of file
package dp;
package dp.subcomponents;
component Safetycontroller {
ports
in Z(0:255)^{640,480} imageIn,
in Q(0:1)^{13,1} affordanceIn,
out Q(0:1)^{1,1} safetyLevelOut;
in Z(0:255)^{3, 210, 280} imageIn,
in Q(0:1)^{13,1,1} affordanceIn,
out Q(0:1)^{1,1,1} safetyLevelOut;
implementation Math {
safetyLevelOut=affordanceIn;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment