HOW TO start MRL from *.BAT without GUI, then Call full3.py and use the Chrome Browser for the GUI

Hi all,

I have see seen the post at https://github.com/MyRobotLab/pyrobotlab/blob/master/home/Mats/startbrowser.py#L1

and am unsure how to integrate those concepts into my full3.py : can you help? : the first bunch of lines are here:

#file : InMoov2.full3.byGael.Langevin.1.py
#mod 11/27/2016 SVB
 
# this script is provided as a basic guide
# most parts can be run by uncommenting them
# InMoov now can be started in modular pieces
import random
import threading
import itertools
leftPort = "COM3"
rightPort = "COM4"
 
i01 = Runtime.createAndStart("i01", "InMoov")
inmoov = Runtime.createAndStart("alice", "ProgramAB") 
inmoov.startSession() 
 
#directionServo = Runtime.start("directionServo","Servo")
#forwardServo = Runtime.start("forwardServo","Servo") 
 
right = Runtime.start("i01.right", "Arduino")
right.connect("COM4")
 
#cleverbot = Runtime.createAndStart("cleverbot","CleverBot")
 
# starts everything
#i01.startAll(leftPort, rightPort)
#directionServo.attach(right, 12)
#forwardServo.attach(right, 13)
#directionServo.attach("COM4", 12)
#forwardServo.attach("COM4", 13)
 
# starting parts
i01.startMouthControl(leftPort)
i01.startMouth()
 
#to tweak the default voice
#i01.mouth.setGoogleURI("http://thehackettfamily.org/Voice_api/api2.php?voice=Ryan&txt=")
 
 
i01.startHead(leftPort)
##############
# tweaking default settings of jaw
i01.head.jaw.setMinMax(90,140)
i01.mouthControl.setmouth(90,120)
i01.head.jaw.setRest(90)
 
# tweaking default settings of eyes
i01.head.eyeY.setMinMax(110,180)
i01.head.eyeY.setRest(145)
i01.head.eyeX.setMinMax(75,105)
i01.head.eyeX.setRest(90)
 
# tweaking default settings of head
i01.head.neck.setMinMax(0,180)
i01.head.neck.map(0,180,15,155)
i01.head.neck.setRest(70)
i01.head.rothead.setMinMax(0,180)
i01.head.rothead.map(0,180,30,150)
i01.head.rothead.setRest(86)
 
#i01.startEyesTracking(leftPort)
#i01.startHeadTracking(leftPort)
 
 
i01.startEar()
##############
 
#torso = i01.startTorso(leftPort)
##############
# tweaking default torso settings
torso.topStom.setMinMax(30,130)
torso.midStom.setMinMax(0,180)
torso.topStom.map(0,180,30,130)
torso.topStom.setRest(80)
torso.midStom.setRest(90)
torso.lowStom.setRest(90)
 
i01.startLeftHand(leftPort)
##############
# tweaking default settings of left hand
i01.leftHand.thumb.setMinMax(0,180)
i01.leftHand.index.setMinMax(0,180)
i01.leftHand.majeure.setMinMax(0,180)
i01.leftHand.ringFinger.setMinMax(0,180)
i01.leftHand.pinky.setMinMax(0,180)
 
i01.leftHand.thumb.map(0,180,45,140)
i01.leftHand.index.map(0,180,40,140)
i01.leftHand.majeure.map(0,180,30,176)
i01.leftHand.ringFinger.map(0,180,25,175)
i01.leftHand.pinky.map(0,180,15,112)
 
 
i01.startLeftArm(leftPort)
################
#tweak defaults LeftArm
i01.leftArm.bicep.setMinMax(0,90)
i01.leftArm.rotate.setMinMax(40,160)
i01.leftArm.shoulder.setMinMax(30,100)
i01.leftArm.omoplate.setMinMax(10,80)
 
moz4r's picture

Hi ! you can launch your

Hi ! you can launch your script with that:

java -jar myrobotlab.jar -invoke python execFile %cd%/YOURSCRIPT.PY -service python Python

and put in your script :

webgui = Runtime.create("WebGui","WebGui")
webgui.autoStartBrowser(False)
webgui.startService()
webgui.startBrowser("http://localhost:8888/#/service/i01.ear")

mayaway's picture

More info...

I would like to start.ear, then run everything else with attach/detach verbally.
What is the dif between i01.start.head and executing verbal command ear.addCommand("attach head", "i01.head", "attach")?