-
-
Notifications
You must be signed in to change notification settings - Fork 114
InMoov gets a heart #1397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
supertick
wants to merge
159
commits into
develop
Choose a base branch
from
inmoov2-heart
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
InMoov gets a heart #1397
Changes from all commits
Commits
Show all changes
159 commits
Select commit
Hold shift + click to select a range
829ccd1
model for aiml xml
supertick 67bd304
InMoov gets a heart
supertick 754bed4
jython worky with InMoov2.py
supertick ed459da
reset
supertick e0d1687
ordered and formatted
supertick 6608cbc
Merge branch 'develop' of github.com-myrobotlab:MyRobotLab/myrobotlab…
supertick 6838084
recovering from bad merge
supertick b5794f5
reset randomtest
supertick 6e78370
Merge branch 'develop' of github.com-myrobotlab:MyRobotLab/myrobotlab…
supertick 37a3795
finite state history
supertick a7c1b66
fixed fire fsm event
supertick b90bd80
requested updates
supertick d52153e
Merge branch 'programab-model' of github.com-myrobotlab:MyRobotLab/my…
supertick 49633be
Merge branch 'develop' of https://github.com/MyRobotLab/myrobotlab in…
supertick 8d4fdb9
init scripts turned off
supertick 0cb5905
Merge branch 'develop' of https://github.com/MyRobotLab/myrobotlab in…
supertick 8580e47
Merge branch 'develop' of https://github.com/MyRobotLab/myrobotlab in…
supertick 9aacb0b
publishStateChange vs onStateChange
supertick 4c9e5e0
execScript()
supertick 9a24b72
Merge branch 'develop' of https://github.com/MyRobotLab/myrobotlab in…
supertick 5bbdfe0
config utils
supertick 565f9dd
set chatBot reference on startService added setup to fsm
supertick 535d8d4
Merge branch 'develop' of https://github.com/MyRobotLab/myrobotlab in…
supertick e3d774a
Merge branch 'develop' of https://github.com/MyRobotLab/myrobotlab in…
supertick 533eacb
Merge branch 'develop' of https://github.com/MyRobotLab/myrobotlab in…
supertick d2510bc
working processor action in servomixer
supertick b7ecaa8
Merge branch 'develop' of https://github.com/MyRobotLab/myrobotlab in…
supertick 536279f
Merge branch 'servomixer-processing' of https://github.com/MyRobotLab…
supertick 3398f8a
fix runtime.resource for tests
supertick 557cd80
again
supertick 0a3c81c
again
supertick ce82eb5
corrected wrong path
supertick a7f5fb1
Merge branch 'develop' of https://github.com/MyRobotLab/myrobotlab in…
supertick 0483fb8
Subscription fixes in config - removal of hardcoded subscriptions
supertick 135f12a
small runtime updates
supertick 1332336
added test
supertick 85dd347
Merge branch 'subscription-fix' of github.com-myrobotlab:MyRobotLab/m…
supertick 2ea567e
trying to make idempotent test
supertick 6996853
Merge branch 'subscription-fix' of github.com-myrobotlab:MyRobotLab/m…
supertick 6a05071
npe check
supertick dcdab9b
finally ! fixed randomTest issue
supertick be739aa
Merge branch 'develop' of github.com-myrobotlab:MyRobotLab/myrobotlab…
supertick 2e8fdb5
javadoc updates to runtime config
supertick 0c4ba80
guard against no runtime.xml
supertick beafe72
removed dependency test
supertick dbe67cf
fixing unit tests
supertick 188b6fd
Merge branch 'develop' of github.com-myrobotlab:MyRobotLab/myrobotlab…
supertick 62aa007
config update
supertick 139d01f
http client config
supertick 7432266
synchronized
supertick 202f364
Update CmdOptionsTest.java
supertick 3dadcac
warn
supertick bff28fa
abstract test watcher
supertick e8603f9
transient processLock
supertick 8adeb2f
clean threads
supertick d6c0831
cleaned up InMoov2 parts
supertick cc02708
clean random shutdown
supertick ab0141b
drupp neck config
supertick 0bd316b
fixed so Runtime.release(name) and Service.releaseService(name) behav…
supertick cf9405c
Merge branch 'develop' of github.com-myrobotlab:MyRobotLab/myrobotlab…
supertick 3fb04c8
drupp merge
supertick b70114e
intermediate
supertick 728c890
Merge branch 'heart-intermediate' of github.com-myrobotlab:MyRobotLab…
supertick 9b4439a
Merge branch 'develop' of github.com-myrobotlab:MyRobotLab/myrobotlab…
supertick abd63e2
javadoc and other small changes
supertick 69013e5
framework updates
supertick 46af60c
framework
supertick e895567
let framework process inmoov2 releaseService
supertick 237a515
unit test updates
supertick 95b3ddb
stop cli when runtime is released
supertick 43fff16
corrected synchronization
supertick 65542d0
corrected instance lock
supertick 5182af0
adjusted location of sleep wait
supertick 54f874b
shifted sleep position in randomtest
supertick 8065ad4
config utils fix
supertick 9428157
clean default config
supertick 63c00ec
removed registering for new services from servo
supertick aa65ad3
webgui
supertick 33a1be5
adding log service to scripts
supertick 9a44b4f
Merge branch 'adding-log-service' of github.com-myrobotlab:MyRobotLab…
supertick 77eac6e
simplifying randomtest
supertick 1d9cb90
fixes and updates
supertick d17b530
Merge branch 'reduce-servo-complexity' of github.com-myrobotlab:MyRob…
supertick fae6053
nothing
supertick 8673dda
Merge branch 'develop' of github.com-myrobotlab:MyRobotLab/myrobotlab…
supertick 402a527
servo.setMaxSpeed
supertick 8601157
ignoring servo.setSpeed(speed <0)
supertick 23988f8
Merge branch 'develop' of github.com-myrobotlab:MyRobotLab/myrobotlab…
supertick 11fefca
synching cpython javacpp and javacv versions to 15.8
supertick db9ccdd
removal of programab botdir
supertick b7c7a16
more non inmoov2 updates
supertick c6c2f14
re-adding deprecated ProgramAB.botDir
supertick 4a69574
npe fix for runtime.apply(c)
supertick 6e02e9f
npe fix for runtime.apply(c)
supertick 76c8b00
updated javacpp to 1.5.8 and updated template
supertick 5caf15d
synching javacpp 1.5.8 updating template
supertick 46f2f27
syching javacpp 1.5.8 tesseract and deeplearning4j
supertick 1851976
synching javacpp 1.5.8 with deeplearning4j and tesseract
supertick d7fad5a
changed imports on tesseract
supertick 2e6c89c
changed imports on tesseract
supertick 7290314
fixed test - was counting threads after new runtime started
supertick 9e1710a
more unit test cleanup
supertick 1fa4e62
requested fixes
supertick 2dbde91
requested fixes
supertick a032e8e
channels for discordbot and programab
supertick cbd84fa
onerror added and log.publishErrors
supertick ac9884c
updates
supertick a63e083
removed adding system tray icon
supertick 98a2428
removed onPeak info
supertick 220a002
Merge branch 'develop' of github.com-myrobotlab:MyRobotLab/myrobotlab…
supertick 2b5823d
audiofile config playlist init
supertick 72da4c5
updates
supertick 7b0bfd0
updates
supertick 814de15
fixed type
supertick db1f7d1
webgui
supertick 7470e03
getWebImage
supertick f155d0a
small config update
supertick 1cdc493
remotespeech
supertick 8924641
updates
supertick 87aa762
Merge branch 'remotespeech' of github.com-myrobotlab:MyRobotLab/myrob…
supertick c65f68b
Merge branch 'develop' of github.com-myrobotlab:MyRobotLab/myrobotlab…
supertick 2a3584a
randomtest update
supertick 72add7b
missing service images
supertick 2f7a4c9
Merge branch 'channel-only-responses' of github.com-myrobotlab:MyRobo…
supertick 365f9d3
runtime update
supertick 9f6e7ce
Merge branch 'develop' of github.com-myrobotlab:MyRobotLab/myrobotlab…
supertick 1298dbd
Merge branch 'jmonkey-updates' of github.com-myrobotlab:MyRobotLab/my…
supertick 000ed4d
reverting bad git merge
supertick 81c13b0
sliding window logs for py4j and python
supertick 75d3da5
Merge branch 'develop' of github.com-myrobotlab:MyRobotLab/myrobotlab…
supertick 12375b0
Merge branch 'develop' of github.com-myrobotlab:MyRobotLab/myrobotlab…
supertick e50e7ab
Merge branch 'inmoov2-intermediate-3' of github.com-myrobotlab:MyRobo…
supertick f963e3f
test last workflow
supertick 53591c0
pull_request to push
supertick 8376de1
excluding OpenCV tests from github build
supertick 7f5e173
trying to filter out tests on the command line again
supertick a80364c
try filtering at command line again
supertick 3ebe9b1
libgtk2.0-0 added to build
supertick df72ce3
java 18
supertick 1e1143d
Merge branch 'develop' of github.com-myrobotlab:MyRobotLab/myrobotlab…
supertick 772ed38
Merge branch 'develop' of github.com-myrobotlab:MyRobotLab/myrobotlab…
supertick 3b63f25
worky terminal manager
supertick ea1a1d4
added 2 more
supertick 11457e6
updated openblas 1.5.8
supertick a36eba5
forgot img
supertick 80f1034
Merge branch 'develop' of github.com-myrobotlab:MyRobotLab/myrobotlab…
supertick 45d7f8b
workyish tm
supertick 419b6f7
Merge branch 'develop' of github.com-myrobotlab:MyRobotLab/myrobotlab…
supertick 107c742
bottom scroll
supertick 075f5dd
Merge branch 'develop' of github.com-myrobotlab:MyRobotLab/myrobotlab…
supertick 0e5a9c3
locked in InMoov2.speakBlocking
supertick 92d98a9
Merge branch 'develop' of github.com-myrobotlab:MyRobotLab/myrobotlab…
supertick d391758
javadoc fixed
supertick 9e3e6d2
Merge branch 'develop' of github.com-myrobotlab:MyRobotLab/myrobotlab…
supertick a94466b
publish on change current session and synchronized
supertick e48cee1
Merge branch 'develop' of github.com-myrobotlab:MyRobotLab/myrobotlab…
supertick ac4edd4
java 11
supertick 11e9cfc
Merge branch 'develop' of github.com-myrobotlab:MyRobotLab/myrobotlab…
supertick bedaad1
Merge branch 'develop' of https://github.com/MyRobotLab/myrobotlab in…
supertick File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.myrobotlab.process; | ||
|
||
import java.io.IOException; | ||
|
||
import org.myrobotlab.service.TerminalManager; | ||
|
||
public class NodeTerminal extends Terminal { | ||
|
||
public NodeTerminal(TerminalManager service, String name) throws IOException { | ||
super(service, name); | ||
} | ||
|
||
} |
106 changes: 106 additions & 0 deletions
106
src/main/java/org/myrobotlab/process/PythonTerminal.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
package org.myrobotlab.process; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
import java.util.Arrays; | ||
import java.util.List; | ||
|
||
import org.myrobotlab.framework.Service; | ||
import org.myrobotlab.logging.LoggerFactory; | ||
import org.myrobotlab.service.TerminalManager; | ||
import org.myrobotlab.service.Runtime; | ||
import org.slf4j.Logger; | ||
|
||
public class PythonTerminal extends Terminal { | ||
|
||
/** | ||
* name of the venv | ||
*/ | ||
protected String venvName = "venv"; | ||
|
||
public final static Logger log = LoggerFactory.getLogger(PythonTerminal.class); | ||
|
||
public PythonTerminal(TerminalManager service, String name) throws IOException { | ||
super(service, name); | ||
} | ||
|
||
@Override | ||
public String getVersion() { | ||
try { | ||
return processBlockingCommand(getScriptCmd("python --version")); | ||
} catch (Exception e) { | ||
service.error(e); | ||
} | ||
return null; | ||
} | ||
|
||
public void installPipPackages(List<String> packages) { | ||
String packagesString = String.join(" ", packages); | ||
String command = "pip install " + packagesString; | ||
processCommand(command + "\n"); | ||
} | ||
|
||
public void installPipPackage(String string) { | ||
// TODO Auto-generated method stub | ||
|
||
} | ||
|
||
public void activateVirtualEnv() { | ||
if (isWindows()) { | ||
processCommand(venvName + "\\Scripts\\activate"); | ||
} else { | ||
// source is "bash" | ||
// processCommand("source " + venvName + "/bin/activate"); | ||
// the posix way | ||
processCommand(". " + venvName + "/bin/activate"); | ||
} | ||
Service.sleep(300); | ||
} | ||
|
||
public void installVirtualEnv() { | ||
installVirtualEnv(venvName); | ||
} | ||
|
||
public void installVirtualEnv(String venvName) { | ||
this.venvName = venvName; | ||
// processCommand(getScriptCmd("python -m venv " + venvName)); | ||
processCommand("python -m venv " + venvName); | ||
Service.sleep(300); | ||
supertick marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
public static void main(String[] args) { | ||
try { | ||
TerminalManager processor = (TerminalManager) Runtime.start("processor", "ManagedProcess"); | ||
PythonTerminal shell = new PythonTerminal(processor, "python"); | ||
// shell.setWorkspace(".." + File.separator + "webcam"); | ||
shell.start(".." + File.separator + "webcam"); | ||
shell.installVirtualEnv(); | ||
shell.activateVirtualEnv(); | ||
// shell.installPipPackage(""); | ||
shell.installPipPackages(Arrays.asList("aiortc aiohttp")); | ||
|
||
shell.processCommand("python webcam.py"); | ||
System.out.println(shell.getPids().toString()); | ||
|
||
shell.terminate(); | ||
|
||
// Example usage | ||
String directory = "../webcam"; | ||
String venvName = "venv"; | ||
String packageName = "package_name"; | ||
String pythonScript = "your_script.py"; | ||
|
||
// shell.setupAndRunPythonEnvironment(directory, venvName, packageName, | ||
// pythonScript); | ||
|
||
// Wait for the completion or handle accordingly | ||
// shell.waitForCompletion(); | ||
|
||
// Terminate the shell if necessary | ||
// shell.terminate(); | ||
|
||
} catch (IOException e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.myrobotlab.process; | ||
|
||
import java.io.IOException; | ||
|
||
import org.myrobotlab.service.TerminalManager; | ||
|
||
public class Ros2Terminal extends Terminal { | ||
|
||
public Ros2Terminal(TerminalManager service, String name) throws IOException { | ||
super(service, name); | ||
} | ||
|
||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.myrobotlab.process; | ||
|
||
import java.io.IOException; | ||
|
||
import org.myrobotlab.service.TerminalManager; | ||
|
||
public class RosTerminal extends Terminal { | ||
|
||
public RosTerminal(TerminalManager service, String name) throws IOException { | ||
super(service, name); | ||
} | ||
|
||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.