Skip to content

Commit

Permalink
Merge branch 'develop' of github.com-myrobotlab:MyRobotLab/myrobotlab…
Browse files Browse the repository at this point in the history
… into inmoov-and-statemachine-1
  • Loading branch information
supertick committed Oct 12, 2023
2 parents ecd64cb + 11f47e3 commit 7759ff5
Show file tree
Hide file tree
Showing 10 changed files with 511 additions and 492 deletions.
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit</artifactId>
<version>5.4.0.201906121030-r</version>
<version>6.6.1.202309021850-r</version>
<scope>provided</scope>
</dependency>
<!-- Git end -->
Expand Down Expand Up @@ -1171,7 +1171,7 @@
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20090211</version>
<version>20230227</version>
<scope>provided</scope>
</dependency>
<!-- OpenWeatherMap end -->
Expand Down Expand Up @@ -1245,7 +1245,7 @@
<version>2.14.0</version>
<scope>provided</scope>
</dependency>
<!-- Duplicate entry for org.json-json-20090211 skipping -->
<!-- Duplicate entry for org.json-json-20230227 skipping -->
<!-- Duplicate entry for commons-io-commons-io-2.7 skipping -->
<dependency>
<groupId>org.apache.lucene</groupId>
Expand Down Expand Up @@ -1286,7 +1286,7 @@
<dependency>
<groupId>org.python</groupId>
<artifactId>jython-standalone</artifactId>
<version>2.7.1</version>
<version>2.7.2</version>
</dependency>
<!-- Python end -->

Expand Down Expand Up @@ -1358,7 +1358,7 @@
<dependency>
<groupId>org.apache.ivy</groupId>
<artifactId>ivy</artifactId>
<version>2.5.1</version>
<version>2.5.2</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
13 changes: 12 additions & 1 deletion src/main/java/org/myrobotlab/service/InMoov2.java
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,8 @@ public InMoov2Config apply(InMoov2Config c) {
if (c.loadInitScripts) {
loadInitScripts();
}

loadAppsScripts();

if (c.loadGestures) {
loadGestures();
}
Expand Down Expand Up @@ -728,6 +729,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");
}
Expand Down
1 change: 0 additions & 1 deletion src/main/java/org/myrobotlab/service/Python.java
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,6 @@ public void releaseService() {

inputQueueThread.stop();
thread.interruptAllThreads();
Py.getSystemState()._systemRestart = true;
}

/**
Expand Down
21 changes: 15 additions & 6 deletions src/main/java/org/myrobotlab/service/config/InMoov2Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,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"));
Expand Down Expand Up @@ -422,23 +429,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"));
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/myrobotlab/service/meta/GitMeta.java
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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");

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/myrobotlab/service/meta/PythonMeta.java
Original file line number Diff line number Diff line change
Expand Up @@ -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");

}

Expand Down
Loading

0 comments on commit 7759ff5

Please sign in to comment.