initial commit

This commit is contained in:
2026-03-22 03:21:45 +02:00
commit 897fea9f4e
15431 changed files with 2548840 additions and 0 deletions

9
node_modules/jibo-tools/bin/README.MD generated vendored Normal file
View File

@@ -0,0 +1,9 @@
# bin
Everything in the ```/bin``` folder ends up copied into the ```/jibo/sdk/bin``` folder of robots.
They are not meant to be run directly from on the robot, but rather are executed remotely from
the computer of people executing ```jibo``` CLI commands.
- bin/window-manager.js
- Windows Manager
- bin/index-robot.js
- Index Robot

26
node_modules/jibo-tools/bin/setup.sh generated vendored Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/sh
# echo "Making sure Jibo's Audio, Body, and TTS service are running."
# Kill all of the services
# TODO: Make sure this isn't causing issues where services expect to shutdown nicely
killall jibo-audio-service >/dev/null 2>&1
killall jibo-body-service >/dev/null 2>&1
killall jibo-tts-service >/dev/null 2>&1
# Give some for the processes to be killed
#sleep 1
# Now startup the services again
jibo-audio-service -c /etc/jibo/jibo-audio-service.json >/tmp/jibo-audio-service.log 2>&1 &
jibo-body-service -c /etc/jibo/jibo-body-service.json >/tmp/jibo-body-service.log 2>&1 &
jibo-tts-service -c /etc/jibo/jibo-tts-service.json >/tmp/jibo-tts-service.log 2>&1 &
#echo "All services are a go."
# Enable the robot to network to more than local host
# (example use git, or npm, and just hit remote endpoints in general)
# route add default gw 192.168.1.1 wlp1s0 >/dev/null 2>&1
# echo "nameserver 192.168.1.1" > /tmp/resolv.conf 2>/dev/null
# Give the above command some time to take effect/finish
sleep 1

57
node_modules/jibo-tools/bin/window-manager.js generated vendored Normal file
View File

@@ -0,0 +1,57 @@
/**
* Simpler version of jibo-wm that does not have any dependencies and is the entry point for electron
* and launches the provided skill's index.html that is passed as the first parameter.
*/
// Early out of the process if no skill path argument was provided
var skillPath = process.argv[3];
var token = null;
if(process.argv.length > 4) {
token = process.argv[4];
}
if(!skillPath){
console.log('skill path argument must be provided');
process.exit();
}
var app = require('app'),
BrowserWindow = require('browser-window'),
Menu = require('menu'),
path = require('path'),
ipc = require('ipc'),
mainWindow = null;
app.on('window-all-closed', function () {
if (process.platform != 'darwin')
app.quit();
});
function loadSkill(registryHost) {
var options = {width: 1280, height: 720};
options.frame = false
mainWindow = new BrowserWindow(options);
ipc.on('get-registry-host', function (event, arg) {
event.sender.send('set-registry-host', {
registryHost: registryHost,
token: token
});
});
var indexPath = skillPath;
mainWindow.loadUrl('file://' + indexPath);
mainWindow.on('closed', function () {
mainWindow = null;
});
}
//the simulation will return the registry data
ipc.on('registry-init', function (event, registryHost) {
loadSkill(registryHost);
});
app.on('ready', function () {
// Make sure there are no menus
Menu.setApplicationMenu(Menu.buildFromTemplate([]));
loadSkill('http://127.0.0.1:8181/registry');
});

16
node_modules/jibo-tools/bin/xwindows-warmup.sh generated vendored Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/sh
# Kill any instance(s) of xwindows running
kill -9 `ps auxw | egrep "/usr/bin/[s]tartx" | awk '{print $1}'` >/dev/null 2>&1
# Actually start XWindows (This triggers the initial 4 minute initialization of xwindows)
# Afer this has successfully completed launching a skill will not set 4 minute load times
# Also time how long it takes
echo -n "Warming up X Windows... (Takes approximately 4 minutes, the first time after booting up a robot)"
date1=$(date +"%s")
startx /bin/echo "done" >/dev/null 2>&1
date2=$(date +"%s")
diff=$(($date2-$date1))
echo
echo "Warmup took $(($diff / 60))m$(($diff % 60))s."
echo "Warmup complete."