From d6b17bd2416bebe2a10429a60ac6a1b36ea7295a Mon Sep 17 00:00:00 2001 From: Langevin Gael Date: Thu, 12 Oct 2023 02:27:22 +0200 Subject: [PATCH 1/2] mouth listen servoMixer.java (#1345) * mouth listen servoMixer.java * Update InMoov2Config.java * Update InMoov2Config.java * add chatBot listener to servoMixer * Update InMoov2Config.java * Update InMoov2Config.java * Update InMoov2Config.java * Update InMoov2Config.java * Update InMoov2.java * Update InMoov2.java * Update InMoov2.java * Update InMoov2.java * Update InMoov2.java --- .../java/org/myrobotlab/service/InMoov2.java | 12 +++++++++++ .../service/config/InMoov2Config.java | 21 +++++++++++++------ 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/myrobotlab/service/InMoov2.java b/src/main/java/org/myrobotlab/service/InMoov2.java index 83af38c94d..03035b6d2f 100644 --- a/src/main/java/org/myrobotlab/service/InMoov2.java +++ b/src/main/java/org/myrobotlab/service/InMoov2.java @@ -163,6 +163,8 @@ public InMoov2Config apply(InMoov2Config c) { setLocale(getSupportedLocale(Runtime.getInstance().getLocale().toString())); } + loadAppsScripts(); + loadInitScripts(); if (c.loadGestures) { @@ -637,6 +639,16 @@ public boolean isMute() { return mute; } + /** + * execute python scripts in the app directory on startup of the service + * + * @throws IOException + */ + public void loadAppsScripts() throws IOException { + loadScripts(getResourceDir() + fs + "gestures/InMoovApps/Rock_Paper_Scissors"); + loadScripts(getResourceDir() + fs + "gestures/InMoovApps/Kids_WordsGame"); + } + public void loadGestures() { loadGestures(getResourceDir() + fs + "gestures"); } diff --git a/src/main/java/org/myrobotlab/service/config/InMoov2Config.java b/src/main/java/org/myrobotlab/service/config/InMoov2Config.java index ecb2d59c4e..af16e23a04 100644 --- a/src/main/java/org/myrobotlab/service/config/InMoov2Config.java +++ b/src/main/java/org/myrobotlab/service/config/InMoov2Config.java @@ -178,6 +178,13 @@ public Plan getDefault(Plan plan, String name) { mouth.voice = "Mark"; mouth.speechRecognizers = new String[] { name + ".ear" }; + // == Peer - servoMixer ============================= + // setup name references to different services + ServoMixerConfig servoMixer = (ServoMixerConfig) plan.get(getPeerName("servoMixer")); + servoMixer.listeners = new ArrayList<>(); + servoMixer.listeners.add(new Listener("publishText", name + ".mouth", "onText")); + //servoMixer.listeners.add(new Listener("publishText", name + ".chatBot", "onText")); + // == Peer - ear ============================= // setup name references to different services WebkitSpeechRecognitionConfig ear = (WebkitSpeechRecognitionConfig) plan.get(getPeerName("ear")); @@ -337,23 +344,25 @@ public Plan getDefault(Plan plan, String name) { PidConfig pid = (PidConfig) plan.get(getPeerName("pid")); PidData tiltPid = new PidData(); - tiltPid.ki = 0.001; - tiltPid.kp = 30.0; + tiltPid.ki = -0.001; + tiltPid.kp = -40.0; + tiltPid.inverted = true; pid.data.put(headTracking.getPeer("tilt").name, tiltPid); PidData panPid = new PidData(); panPid.ki = 0.001; - panPid.kp = 15.0; + panPid.kp = 40.0; pid.data.put(headTracking.getPeer("pan").name, panPid); PidData eyeTiltPid = new PidData(); - eyeTiltPid.ki = 0.001; - eyeTiltPid.kp = 10.0; + eyeTiltPid.ki = -0.001; + eyeTiltPid.kp = -30.0; + eyeTiltPid.inverted = true; pid.data.put(eyeTracking.getPeer("tilt").name, eyeTiltPid); PidData eyePanPid = new PidData(); eyePanPid.ki = 0.001; - eyePanPid.kp = 10.0; + eyePanPid.kp = 30.0; pid.data.put(eyeTracking.getPeer("pan").name, eyePanPid); NeoPixelConfig neoPixel = (NeoPixelConfig) plan.get(getPeerName("neoPixel")); From 11f47e3f3870a5688f9a83d182d3c9ee2d78e2fd Mon Sep 17 00:00:00 2001 From: GroG Date: Thu, 12 Oct 2023 07:20:47 -0700 Subject: [PATCH 2/2] secure bot updates (#1346) * secure bot updates * fixed pom template with lf endings --- pom.xml | 958 +++++++++--------- .../myrobotlab/framework/repo/IvyWrapper.java | 2 +- .../java/org/myrobotlab/service/Python.java | 1 - .../org/myrobotlab/service/meta/GitMeta.java | 2 +- .../service/meta/OpenWeatherMapMeta.java | 2 +- .../service/meta/ProgramABMeta.java | 2 +- .../myrobotlab/service/meta/PythonMeta.java | 2 +- .../resource/framework/pom.xml.template | 948 ++++++++--------- 8 files changed, 958 insertions(+), 959 deletions(-) diff --git a/pom.xml b/pom.xml index a1507381a2..41e93b8aab 100644 --- a/pom.xml +++ b/pom.xml @@ -1,102 +1,102 @@ - - - 4.0.0 - org.myrobotlab - mrl - 0.0.1-SNAPSHOT - MyRobotLab - Open Source Creative Machine Control - - - false - - - - 1.1. - - ${maven.build.timestamp} - yyyyMMddHHmm - ${timestamp} - ${version.prefix}${build.number} - ${git.branch} - ${NODE_NAME} - ${NODE_LABELS} - - - - 11 - 11 - UTF-8 - - - + + + 4.0.0 + org.myrobotlab + mrl + 0.0.1-SNAPSHOT + MyRobotLab + Open Source Creative Machine Control + + + false + + + + 1.1. + + ${maven.build.timestamp} + yyyyMMddHHmm + ${timestamp} + ${version.prefix}${build.number} + ${git.branch} + ${NODE_NAME} + ${NODE_LABELS} + + + + 11 + 11 + UTF-8 + + + @@ -135,9 +135,9 @@ https://m2.dv8tion.net/releases - - - + + + javazoom @@ -408,7 +408,7 @@ org.eclipse.jgit org.eclipse.jgit - 5.4.0.201906121030-r + 6.6.1.202309021850-r provided @@ -1171,7 +1171,7 @@ org.json json - 20090211 + 20230227 provided @@ -1245,7 +1245,7 @@ 2.14.0 provided - + org.apache.lucene @@ -1286,7 +1286,7 @@ org.python jython-standalone - 2.7.1 + 2.7.2 @@ -1358,7 +1358,7 @@ org.apache.ivy ivy - 2.5.1 + 2.5.2 org.apache.httpcomponents @@ -1734,375 +1734,375 @@ - - - org.mockito - mockito-core - 3.12.4 - test - - - - - - - false - src/main/resources - - - false - src/main/java - - ** - - - **/*.java - - - - - - false - src/test/resources - - - false - src/test/java - - ** - - - **/*.java - - - - src/main/resources - ${project.basedir} - - - - - - - - org.codehaus.mojo - properties-maven-plugin - 1.0.0 - - - org.apache.maven.plugins - maven-enforcer-plugin - 3.1.0 - - - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - no-duplicate-declared-dependencies - - enforce - - - - - - - - - - - - org.codehaus.mojo - properties-maven-plugin - - - initialize - - read-project-properties - - - - build.properties - - - - - - - - - - org.apache.maven.plugins - maven-shade-plugin - 3.1.0 - - - package - - shade - - - myrobotlab - - true - myrobotlab-full - false - - - - - org.myrobotlab.service.Runtime - ${version} - ${version} - - ${build.number} - ${maven.build.timestamp} - ${agent.name} - ${user.name} - - - ${git.tags} - ${git.branch} - ${git.dirty} - ${git.remote.origin.url} - ${git.commit.id} - ${git.commit.id.abbrev} - ${git.commit.id.full} - ${git.commit.id.describe} - ${git.commit.id.describe-short} - ${git.commit.user.name} - ${git.commit.user.email} - - ${git.commit.time} - ${git.closest.tag.name} - ${git.closest.tag.commit.count} - ${git.build.user.name} - ${git.build.user.email} - ${git.build.time} - ${git.build.version} - - - - - - - *:* - - module-info.class - META-INF/*.SF - META-INF/*.DSA - META-INF/*.RSA - - - - - - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - assembly.xml - - myrobotlab - false - - - - trigger-assembly - package - - single - - - - - - - true - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 11 - 11 - true - true - -parameters - - - - - org.apache.maven.plugins - maven-resources-plugin - 2.4.3 - - - - pl.project13.maven - git-commit-id-plugin - 4.9.10 - - - initialize - get-the-git-infos - - revision - - - - - ${project.basedir}/.git - git - false - true - ${project.build.outputDirectory}/git.properties - - - false - false - -dirty - - - - - - maven-surefire-plugin - org.apache.maven.plugins - 2.22.2 - - -Djava.library.path=libraries/native -Djna.library.path=libraries/native - - **/*Test.java - - - **/integration/* - - - - - - - - org.apache.maven.plugins - maven-clean-plugin - 2.3 - - - - data/.myrobotlab - false - - - libraries - - ** - - false - - - data - - ** - - - - resource - - ** - - - - src/main/resources/resource/framework - - **/serviceData.json - - false - - - - - - - - - - - - org.apache.maven.plugins - maven-surefire-report-plugin - 2.22.2 - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.0.1 - - - - - myrobotlab - http://myrobotlab.org - - - github - https://github.com/MyRobotLab/myrobotlab/issues - - + + + org.mockito + mockito-core + 3.12.4 + test + + + + + + + false + src/main/resources + + + false + src/main/java + + ** + + + **/*.java + + + + + + false + src/test/resources + + + false + src/test/java + + ** + + + **/*.java + + + + src/main/resources + ${project.basedir} + + + + + + + + org.codehaus.mojo + properties-maven-plugin + 1.0.0 + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.1.0 + + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + no-duplicate-declared-dependencies + + enforce + + + + + + + + + + + + org.codehaus.mojo + properties-maven-plugin + + + initialize + + read-project-properties + + + + build.properties + + + + + + + + + + org.apache.maven.plugins + maven-shade-plugin + 3.1.0 + + + package + + shade + + + myrobotlab + + true + myrobotlab-full + false + + + + + org.myrobotlab.service.Runtime + ${version} + ${version} + + ${build.number} + ${maven.build.timestamp} + ${agent.name} + ${user.name} + + + ${git.tags} + ${git.branch} + ${git.dirty} + ${git.remote.origin.url} + ${git.commit.id} + ${git.commit.id.abbrev} + ${git.commit.id.full} + ${git.commit.id.describe} + ${git.commit.id.describe-short} + ${git.commit.user.name} + ${git.commit.user.email} + + ${git.commit.time} + ${git.closest.tag.name} + ${git.closest.tag.commit.count} + ${git.build.user.name} + ${git.build.user.email} + ${git.build.time} + ${git.build.version} + + + + + + + *:* + + module-info.class + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + + + + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + assembly.xml + + myrobotlab + false + + + + trigger-assembly + package + + single + + + + + + + true + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + 11 + 11 + true + true + -parameters + + + + + org.apache.maven.plugins + maven-resources-plugin + 2.4.3 + + + + pl.project13.maven + git-commit-id-plugin + 4.9.10 + + + initialize + get-the-git-infos + + revision + + + + + ${project.basedir}/.git + git + false + true + ${project.build.outputDirectory}/git.properties + + + false + false + -dirty + + + + + + maven-surefire-plugin + org.apache.maven.plugins + 2.22.2 + + -Djava.library.path=libraries/native -Djna.library.path=libraries/native + + **/*Test.java + + + **/integration/* + + + + + + + + org.apache.maven.plugins + maven-clean-plugin + 2.3 + + + + data/.myrobotlab + false + + + libraries + + ** + + false + + + data + + ** + + + + resource + + ** + + + + src/main/resources/resource/framework + + **/serviceData.json + + false + + + + + + + + + + + + org.apache.maven.plugins + maven-surefire-report-plugin + 2.22.2 + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.0.1 + + + + + myrobotlab + http://myrobotlab.org + + + github + https://github.com/MyRobotLab/myrobotlab/issues + + diff --git a/src/main/java/org/myrobotlab/framework/repo/IvyWrapper.java b/src/main/java/org/myrobotlab/framework/repo/IvyWrapper.java index 5759c4866e..aae1ace772 100644 --- a/src/main/java/org/myrobotlab/framework/repo/IvyWrapper.java +++ b/src/main/java/org/myrobotlab/framework/repo/IvyWrapper.java @@ -34,7 +34,7 @@ public class IvyWrapper extends Repo implements Serializable { private static final long serialVersionUID = 1L; - public static final String IVY_VERSION = "2.5.1"; + public static final String IVY_VERSION = "2.5.2"; class IvyWrapperLogger extends AbstractMessageLogger { diff --git a/src/main/java/org/myrobotlab/service/Python.java b/src/main/java/org/myrobotlab/service/Python.java index d17709cb3c..18329e7b2e 100644 --- a/src/main/java/org/myrobotlab/service/Python.java +++ b/src/main/java/org/myrobotlab/service/Python.java @@ -827,7 +827,6 @@ public void releaseService() { inputQueueThread.stop(); thread.interruptAllThreads(); - Py.getSystemState()._systemRestart = true; } /** diff --git a/src/main/java/org/myrobotlab/service/meta/GitMeta.java b/src/main/java/org/myrobotlab/service/meta/GitMeta.java index 310b231bd9..16372e57a1 100644 --- a/src/main/java/org/myrobotlab/service/meta/GitMeta.java +++ b/src/main/java/org/myrobotlab/service/meta/GitMeta.java @@ -17,7 +17,7 @@ public GitMeta() { addCategory("programming"); // EDL (new-style BSD) licensed - addDependency("org.eclipse.jgit", "org.eclipse.jgit", "5.4.0.201906121030-r"); + addDependency("org.eclipse.jgit", "org.eclipse.jgit", "6.6.1.202309021850-r"); } } diff --git a/src/main/java/org/myrobotlab/service/meta/OpenWeatherMapMeta.java b/src/main/java/org/myrobotlab/service/meta/OpenWeatherMapMeta.java index d481e472e1..f61d2a3f72 100644 --- a/src/main/java/org/myrobotlab/service/meta/OpenWeatherMapMeta.java +++ b/src/main/java/org/myrobotlab/service/meta/OpenWeatherMapMeta.java @@ -17,7 +17,7 @@ public OpenWeatherMapMeta() { addDescription("This service will query OpenWeatherMap for the current weather. Get an API key at http://openweathermap.org/"); addCategory("weather"); setCloudService(true); - addDependency("org.json", "json", "20090211"); + addDependency("org.json", "json", "20230227"); } diff --git a/src/main/java/org/myrobotlab/service/meta/ProgramABMeta.java b/src/main/java/org/myrobotlab/service/meta/ProgramABMeta.java index d041161259..7430f362dd 100644 --- a/src/main/java/org/myrobotlab/service/meta/ProgramABMeta.java +++ b/src/main/java/org/myrobotlab/service/meta/ProgramABMeta.java @@ -26,7 +26,7 @@ public ProgramABMeta() { addDependency("com.fasterxml.jackson.dataformat", "jackson-dataformat-xml", "2.14.0"); - addDependency("org.json", "json", "20090211"); + addDependency("org.json", "json", "20230227"); // used by FileIO addDependency("commons-io", "commons-io", "2.7"); // TODO: This is for CJK support in ProgramAB move this into the published diff --git a/src/main/java/org/myrobotlab/service/meta/PythonMeta.java b/src/main/java/org/myrobotlab/service/meta/PythonMeta.java index f4c605d962..4171e2bae5 100644 --- a/src/main/java/org/myrobotlab/service/meta/PythonMeta.java +++ b/src/main/java/org/myrobotlab/service/meta/PythonMeta.java @@ -18,7 +18,7 @@ public PythonMeta() { addCategory("programming", "control"); includeServiceInOneJar(true); - addDependency("org.python", "jython-standalone", "2.7.1"); + addDependency("org.python", "jython-standalone", "2.7.2"); } diff --git a/src/main/resources/resource/framework/pom.xml.template b/src/main/resources/resource/framework/pom.xml.template index 8a72e3c9ef..7713649881 100644 --- a/src/main/resources/resource/framework/pom.xml.template +++ b/src/main/resources/resource/framework/pom.xml.template @@ -1,474 +1,474 @@ - - - 4.0.0 - org.myrobotlab - mrl - 0.0.1-SNAPSHOT - MyRobotLab - Open Source Creative Machine Control - - - false - - - - 1.1. - - ${maven.build.timestamp} - yyyyMMddHHmm - ${timestamp} - ${version.prefix}${build.number} - ${git.branch} - ${NODE_NAME} - ${NODE_LABELS} - - - - 11 - 11 - UTF-8 - - - -{{repositories}} - - -{{dependencies}} - - org.mockito - mockito-core - 3.12.4 - test - - - - - - - false - src/main/resources - - - false - src/main/java - - ** - - - **/*.java - - - - - - false - src/test/resources - - - false - src/test/java - - ** - - - **/*.java - - - - src/main/resources - ${project.basedir} - - - - - - - - org.codehaus.mojo - properties-maven-plugin - 1.0.0 - - - org.apache.maven.plugins - maven-enforcer-plugin - 3.1.0 - - - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - no-duplicate-declared-dependencies - - enforce - - - - - - - - - - - - org.codehaus.mojo - properties-maven-plugin - - - initialize - - read-project-properties - - - - build.properties - - - - - - - - - - org.apache.maven.plugins - maven-shade-plugin - 3.1.0 - - - package - - shade - - - myrobotlab - - true - myrobotlab-full - false - - - - - org.myrobotlab.service.Runtime - ${version} - ${version} - - ${build.number} - ${maven.build.timestamp} - ${agent.name} - ${user.name} - - - ${git.tags} - ${git.branch} - ${git.dirty} - ${git.remote.origin.url} - ${git.commit.id} - ${git.commit.id.abbrev} - ${git.commit.id.full} - ${git.commit.id.describe} - ${git.commit.id.describe-short} - ${git.commit.user.name} - ${git.commit.user.email} - - ${git.commit.time} - ${git.closest.tag.name} - ${git.closest.tag.commit.count} - ${git.build.user.name} - ${git.build.user.email} - ${git.build.time} - ${git.build.version} - - - - - - - *:* - - module-info.class - META-INF/*.SF - META-INF/*.DSA - META-INF/*.RSA - - - - - - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - assembly.xml - - myrobotlab - false - - - - trigger-assembly - package - - single - - - - - - - true - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 11 - 11 - true - true - -parameters - - - - - org.apache.maven.plugins - maven-resources-plugin - 2.4.3 - - - - pl.project13.maven - git-commit-id-plugin - 4.9.10 - - - initialize - get-the-git-infos - - revision - - - - - ${project.basedir}/.git - git - false - true - ${project.build.outputDirectory}/git.properties - - - false - false - -dirty - - - - - - maven-surefire-plugin - org.apache.maven.plugins - 2.22.2 - - -Djava.library.path=libraries/native -Djna.library.path=libraries/native - - **/*Test.java - - - **/integration/* - - - - - - - - org.apache.maven.plugins - maven-clean-plugin - 2.3 - - - - data/.myrobotlab - false - - - libraries - - ** - - false - - - data - - ** - - - - resource - - ** - - - - src/main/resources/resource/framework - - **/serviceData.json - - false - - - - - - - - - - - - org.apache.maven.plugins - maven-surefire-report-plugin - 2.22.2 - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.0.1 - - - - - myrobotlab - http://myrobotlab.org - - - github - https://github.com/MyRobotLab/myrobotlab/issues - - + + + 4.0.0 + org.myrobotlab + mrl + 0.0.1-SNAPSHOT + MyRobotLab + Open Source Creative Machine Control + + + false + + + + 1.1. + + ${maven.build.timestamp} + yyyyMMddHHmm + ${timestamp} + ${version.prefix}${build.number} + ${git.branch} + ${NODE_NAME} + ${NODE_LABELS} + + + + 11 + 11 + UTF-8 + + + +{{repositories}} + + +{{dependencies}} + + org.mockito + mockito-core + 3.12.4 + test + + + + + + + false + src/main/resources + + + false + src/main/java + + ** + + + **/*.java + + + + + + false + src/test/resources + + + false + src/test/java + + ** + + + **/*.java + + + + src/main/resources + ${project.basedir} + + + + + + + + org.codehaus.mojo + properties-maven-plugin + 1.0.0 + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.1.0 + + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + no-duplicate-declared-dependencies + + enforce + + + + + + + + + + + + org.codehaus.mojo + properties-maven-plugin + + + initialize + + read-project-properties + + + + build.properties + + + + + + + + + + org.apache.maven.plugins + maven-shade-plugin + 3.1.0 + + + package + + shade + + + myrobotlab + + true + myrobotlab-full + false + + + + + org.myrobotlab.service.Runtime + ${version} + ${version} + + ${build.number} + ${maven.build.timestamp} + ${agent.name} + ${user.name} + + + ${git.tags} + ${git.branch} + ${git.dirty} + ${git.remote.origin.url} + ${git.commit.id} + ${git.commit.id.abbrev} + ${git.commit.id.full} + ${git.commit.id.describe} + ${git.commit.id.describe-short} + ${git.commit.user.name} + ${git.commit.user.email} + + ${git.commit.time} + ${git.closest.tag.name} + ${git.closest.tag.commit.count} + ${git.build.user.name} + ${git.build.user.email} + ${git.build.time} + ${git.build.version} + + + + + + + *:* + + module-info.class + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + + + + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + assembly.xml + + myrobotlab + false + + + + trigger-assembly + package + + single + + + + + + + true + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + 11 + 11 + true + true + -parameters + + + + + org.apache.maven.plugins + maven-resources-plugin + 2.4.3 + + + + pl.project13.maven + git-commit-id-plugin + 4.9.10 + + + initialize + get-the-git-infos + + revision + + + + + ${project.basedir}/.git + git + false + true + ${project.build.outputDirectory}/git.properties + + + false + false + -dirty + + + + + + maven-surefire-plugin + org.apache.maven.plugins + 2.22.2 + + -Djava.library.path=libraries/native -Djna.library.path=libraries/native + + **/*Test.java + + + **/integration/* + + + + + + + + org.apache.maven.plugins + maven-clean-plugin + 2.3 + + + + data/.myrobotlab + false + + + libraries + + ** + + false + + + data + + ** + + + + resource + + ** + + + + src/main/resources/resource/framework + + **/serviceData.json + + false + + + + + + + + + + + + org.apache.maven.plugins + maven-surefire-report-plugin + 2.22.2 + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.0.1 + + + + + myrobotlab + http://myrobotlab.org + + + github + https://github.com/MyRobotLab/myrobotlab/issues + +