Hi everyone
Help please with setting up myrobotlab
I was using Gaels V4 script with myroblab 1412 and I had most servos working OK, could hear the acapela voice on start up but never manged to get voice control working. I could not attach the stomach servos however. I could succesfully manually control most of the my robot.
I have now installed the V7 script with myrobtlab 1723. I now get the new voice on start up, but no voice control and all the working servos run really slowly now. I still cannot attach the mid and top stomach servos. I emailed Gael about the speed issue on the inmoov forums and he suggested changing velocity settings but this does not work for me.
So a few problems! Appreciate a sanity check on all this!!
I have been checking the start up batch file to see if I am correctly starting all the services and that has also confused me as when I setup the correct directories as I understand them, robotlab will not start, but using the default settings, robotlab does start.
Here are the batch files and the modified V7 script.
This batch file is mrl_lm2.bat which has incorrect drive paths but starts up the program
taskkill.exe /F /IM java.exe
taskkill.exe /F /IM javaW.exe
cd "C:\Myrobotlab\myrobotlab.1.0.1723\ProgramAB\bots\inmoovWebKit/aimlif"
del "learnf.aiml.csv"
cd "C:\Myrobotlab\myrobotlab.1.0.1723"
java -jar myrobotlab.jar -invoke python execFile C:\Users\lorn\Documents\Arduino\libraries\InMoov3.Deep.AB.V7.py
and this batch file mrl_lm4 which has correct paths but does not start up the program. Note the additional X64 part of the address
taskkill.exe /F /IM java.exe
taskkill.exe /F /IM javaW.exe
cd "C:\Myrobotlab\myrobotlabX64.1.0.1723\Myrobotlab\myrobotlab.1.0.1723\ProgramAB\bots\inmoovWebKit/aimlif"
del "learnf.aiml.csv"
cd "C:\Myrobotlab\myrobotlabX64.1.0.1723"
java -jar myrobotlab.jar -invoke python execFile C:\Users\lorn\Documents\Arduino\libraries\InMoov3.Deep.AB.V7.py
Also, these Issues with this 1723 version:
I cannot attach top and midstom servos on left arduino pin 27 and 28. Its a bit unclear which pins to use but whichever pins I use will not attach.
Also ALL servos run really slowly. I have tried changing velocity or bipassing velocity settings in Gaels script V7 but this has not effect
Here is my version of edited V7 script:
from java.lang import String
import threading
import time
import random
from org.myrobotlab.net import BareBonesBrowserLaunch
##
import urllib, urllib2
import json
from datetime import datetime
#######################
import io
import itertools
import textwrap
import codecs
import socket
import os
import shutil
import hashlib
import subprocess
import csv
from subprocess import Popen, PIPE
#############################################################
# This is the InMoov script
# InMoov is powered by MyRobotLab
# Initially we'll start simple
# It will use ProgramAB & Webkit for all interactions with
# the bot.
#############################################################
# All bot specific hardware configuration goes here.
leftPort = "COM5"
rightPort = "COM3"
headPort = leftPort
# gesturesPath = "C:\Myrobotlab\myrobotlab.1.0.1723\ProgramAB bots\gestures"
gesturesPath = "C:\myrobotlab\myrobotlabX64.1.0.1723\Myrobotlab\ProgramAB bots\gestures"
# aimlPath = "C:\Myrobotlab\myrobotlab.1.0.1723\ProgramAB\bots"
aimlPath = "C:\myrobotlab\myrobotlabX64.1.0.1723\Myrobotlab\myrobotlab.1.0.1723\ProgramAB\bots"
aimlBotName = "inmoovWebKit"
aimlUserName = "lorn"
#botVoice = "Ryan"
#############################################################
# LANGUAGE ( FR/EN )
lang="EN"
Voice="cmu-slt-hsmm" # Default female for MarySpeech
#Voice="cmu-bdl-hsmm" #Male US voice.You need to add the necessary file.jar to myrobotlab.1.0.XXXX/library/jar
#Voice="upmc-pierre-hsmm" #French voice
voiceType = Voice
client_id = "your_id"
client_secret = "yoursecret_key"
global human
global inmoov
global weathervar
global walkingThread
#############################################################
# toggle to only load program ab and skip the inmoov services
startInMoov = True
######################################################################
# helper function help debug the recognized text from webkit/sphinx
######################################################################
def heard(data):
print "Speech Recognition Data:"+str(data)
######################################################################
#
# MAIN ENTRY POINT - Start and wire together all the services.
#
######################################################################
# launch the swing gui?
# gui = Runtime.createAndStart("gui", "GUIService");
######################################################################
# Create ProgramAB chat bot ( This is the inmoov "brain" )
######################################################################
#neopixel = Runtime.createAndStart("neopixel","Serial")
#neopixel.connect("COM3", 57600, 8, 1, 0)
inmoovWebKit = Runtime.createAndStart("inmoovWebKit", "ProgramAB")
#inmoovWebKit.setPath(aimlPath)
inmoovWebKit.startSession(aimlUserName, aimlBotName)
######################################################################
# Html filter to clean the output from programab. (just in case)
htmlfilter = Runtime.createAndStart("htmlfilter", "HtmlFilter")
######################################################################
# mouth service, speech synthesis
mouth = Runtime.createAndStart("i01.mouth", "MarySpeech")
#mouth.setVoice(botVoice)
mouth.setVoice(voiceType)
#Volume(amount=2.0)
#TractScaler(amount=1.4)
#F0Scale(f0Add=2.0)
#F0Add(f0Add=60.0)
#Robot(amount=0.0)
#Rate(amount=3.75)
#Whisper(amount=100.0)
#Stadium(amount=100.0)
#Chorus(delay=1.466;amp1=0.54)
#FIRFilter(type=3;fc1=500.0;fc2=2)
#mouth.setAudioEffects("Volume(amount=1.75) + TractScaler(amount=0.95) + F0Scale(f0Add=3.0)")
#mouth.setLanguage(lang)
######################################################################
# the "ear" of the inmoov TODO: replace this with just base inmoov ear?
ear = Runtime.createAndStart("i01.ear", "WebkitSpeechRecognition")
ear.addListener("publishText", python.name, "heard");
ear.addMouth(mouth)
######################################################################
WebkitSpeechRecognitionFix = Runtime.start("WebkitSpeechRecognitionFix","Clock")
WebkitSpeechRecognitionFix.setInterval(1000)
WebkitSpeechRecognitionFix.startClock()
######################################################################
# MRL Routing webkitspeechrecognition/ear -> program ab -> htmlfilter -> mouth
######################################################################
ear.addTextListener(inmoovWebKit)
inmoovWebKit.addTextListener(htmlfilter)
htmlfilter.addTextListener(mouth)
######################################################################
#Gets the battery level
level = Runtime.getBatteryLevel()
######################################################################
# Start up the inmoov and attach stuff.
######################################################################
i01 = Runtime.create("i01", "InMoov")
##############
head = Runtime.create("i01.head","InMoovHead")
##############
# tweaking default settings of jaw
head.jaw.setMinMax(42,101)
head.jaw.map(0,180,42,101)
head.jaw.setRest(42)
# tweaking default settings of eyes
head.eyeY.map(0,180,85,110)
head.eyeY.setMinMax(0,180)
head.eyeY.setRest(90)
head.eyeX.map(0,180,75,120)
head.eyeX.setMinMax(0,180)
head.eyeX.setRest(90)
head.neck.map(0,180,75,128)
head.neck.setMinMax(0,180)
head.neck.setRest(90)
head.rothead.map(0,180,60,130)
head.rothead.setMinMax(0,180)
head.rothead.setRest(90)
##############
torso = Runtime.create("i01.torso", "InMoovTorso")
# tweaking default torso settings
#torso.topStom.setMaxVelocity(13)
torso.topStom.setMinMax(60,120)
torso.topStom.map(0,180,60,120)
#torso.midStom.setMaxVelocity(13)
torso.midStom.setMinMax(0,180)
torso.midStom.map(0,180,50,130)
#torso.lowStom.setMaxVelocity(13)
#torso.lowStom.setMinMax(0,180)
#torso.lowStom.map(0,180,60,120)
torso.topStom.setRest(90)
torso.midStom.setRest(90)
#torso.lowStom.setRest(90)
##############
leftHand = Runtime.create("i01.leftHand","InMoovHand")
# tweaking default settings of left hand
#leftHand.thumb.setMaxVelocity(250)
leftHand.thumb.setMinMax(0,180)
#leftHand.index.setMaxVelocity(250)
leftHand.index.setMinMax(0,180)
#leftHand.majeure.setMaxVelocity(250)
leftHand.majeure.setMinMax(0,180)
#leftHand.ringFinger.setMaxVelocity(250)
leftHand.ringFinger.setMinMax(0,180)
#leftHand.pinky.setMaxVelocity(250)
leftHand.pinky.setMinMax(0,180)
#leftHand.wrist.setMaxVelocity(250)
leftHand.wrist.setMinMax(0,180)
leftHand.thumb.map(0,180,62,150)
leftHand.index.map(0,180,35,135)
leftHand.majeure.map(0,180,35,180)
leftHand.ringFinger.map(0,180,45,150)
leftHand.pinky.map(0,180,50,170)
leftHand.wrist.map(0,180,40,130)
###############
leftArm = Runtime.create("i01.leftArm","InMoovArm")
#tweak defaults LeftArm
#leftArm.bicep.setMaxVelocity(26)
leftArm.bicep.setMinMax(5,95)
leftArm.bicep.map(0,180,45,140)
#leftArm.rotate.setMaxVelocity(18)
leftArm.rotate.setMinMax(40,180)
leftArm.rotate.map(40,180,60,142)
#leftArm.shoulder.setMaxVelocity(14)
leftArm.shoulder.setMinMax(0,180)
leftArm.shoulder.map(0,180,42,150)
#leftArm.omoplate.setMaxVelocity(15)
leftArm.omoplate.setMinMax(10,82)
leftArm.omoplate.map(0,180,36,135)
################
rightHand = Runtime.create("i01.rightHand","InMoovHand")
# tweaking defaults settings of right hand
#rightHand.thumb.setMaxVelocity(250)
rightHand.thumb.setMinMax(0,180)
#rightHand.index.setMaxVelocity(250)
rightHand.index.setMinMax(0,180)
#rightHand.majeure.setMaxVelocity(250)
rightHand.majeure.setMinMax(0,180)
#rightHand.ringFinger.setMaxVelocity(250)
rightHand.ringFinger.setMinMax(0,180)
#rightHand.pinky.setMaxVelocity(250)
rightHand.pinky.setMinMax(0,180)
#rightHand.wrist.setMaxVelocity(250)
rightHand.wrist.setMinMax(0,180)
rightHand.thumb.map(0,180,64,135)
rightHand.index.map(0,180,42,160)
rightHand.majeure.map(0,180,35,165)
rightHand.ringFinger.map(0,180,40,140)
rightHand.pinky.map(0,180,45,130)
rightHand.wrist.map(0,180,30,135)
#################
rightArm = Runtime.create("i01.rightArm","InMoovArm")
# tweak default RightArm
#rightArm.bicep.setMaxVelocity(26)
rightArm.bicep.setMinMax(5,95)
rightArm.bicep.map(0,180,45,140)
#rightArm.rotate.setMaxVelocity(18)
rightArm.rotate.setMinMax(40,180)
rightArm.rotate.map(40,180,75,130)
#rightArm.shoulder.setMaxVelocity(14)
rightArm.shoulder.setMinMax(0,180)
rightArm.shoulder.map(0,180,42,150)
#rightArm.omoplate.setMaxVelocity(15)
rightArm.omoplate.setMinMax(10,82)
rightArm.omoplate.map(0,180,45,135)
#################
i01 = Runtime.start("i01","InMoov")
i01.setMute(False)
#################
if startInMoov:
i01.startAll(leftPort, rightPort)
#i01.startMouth()
#i01.startMouthControl(leftPort)
i01.mouthControl.setmouth(43,95)
#################
#i01.startEyesTracking(leftPort)
#i01.startHeadTracking(leftPort)
#################
#to tweak the default PID values
i01.eyesTracking.pid.setPID("eyeX",12.0,1.0,0.1)
i01.eyesTracking.pid.setPID("eyeY",12.0,1.0,0.1)
i01.headTracking.pid.setPID("rothead",5.0,1.0,0.1)
i01.headTracking.pid.setPID("neck",5.0,1.0,0.1)
#################
#i01.startEar()
#i01.startRightArm(rightPort)
#i01.startRightHand(rightPort,"atmega2560")
#i01.startLeftArm(leftPort)
#i01.startLeftHand(leftPort)
i01.startTorso("COM5")
#################
#i01.startPIR("COM5",23)
else:
i01.mouth = mouth
# InMoov has a forward servo, i'm adding
forwardServo = Runtime.start("forwardServo","Servo")
directionServo = Runtime.start("directionServo","Servo")
rollneck = Runtime.start("rollneck","Servo")
right = Runtime.start("i01.right", "Arduino")
right.connect("COM7")
directionServo.attach(right, 24)
forwardServo.attach(right, 26)
rollneck.attach(right,12)
rollneck.setRest(90)
rollneck.moveTo(90)
#################
#Sets FaceRecognizer
#fr=i01.opencv.addFilter("FaceRecognizer")
#lastName=fr.getLastRecognizedName()
#################
##Velocity settings
# head.eyeX.setVelocity(0)
# head.eyeY.setVelocity(0)
# head.neck.setVelocity(12)
# head.rothead.setVelocity(12)
# head.jaw.setVelocity(0)
torso.topStom.setVelocity(5)
torso.midStom.setVelocity(5)
#torso.lowStom.setVelocity(5)
rightHand.thumb.setVelocity(15)
rightHand.index.setVelocity(15)
rightHand.majeure.setVelocity(15)
rightHand.ringFinger.setVelocity(15)
rightHand.pinky.setVelocity(15)
rightHand.wrist.setVelocity(15)
leftHand.thumb.setVelocity(15)
leftHand.index.setVelocity(15)
leftHand.majeure.setVelocity(15)
leftHand.ringFinger.setVelocity(15)
leftHand.pinky.setVelocity(15)
leftHand.wrist.setVelocity(15)
# leftArm.bicep.setVelocity(100)
# leftArm.rotate.setVelocity(100)
# leftArm.shoulder.setVelocity(100)
# leftArm.omoplate.setVelocity(100)
# rightArm.bicep.setVelocity(100)
# rightArm.rotate.setVelocity(100)
# rightArm.shoulder.setVelocity(100)
# rightArm.omoplate.setVelocity(100)
######################################################################
# Launch the web gui and create the webkit speech recognition gui
# This service works in Google Chrome only with the WebGui
#################################################################
#webgui = Runtime.create("webgui","WebGui")
webgui.autoStartBrowser(False)
webgui.startService()
######################################################################
# END MAIN SERVICE SETUP SECTION
######################################################################
if lang=="EN":
ear.setLanguage("en-EN")
python.subscribe(ear.getName(),"publishText")
######################################################################
# Helper functions and various gesture definitions
######################################################################
i01.loadGestures(gesturesPath)
Hello Lorncambell, yes,
Hello Lorncambell,
yes, because the scripts were not checked in with the mrl build itself - things have drifted considerably. There is a InMoov repo now here in myrobotlab @ github (Yay!) and the general idea is to get it working with the "latest".
When the checked in InMoov script get insync with the rest of mrl - they will be built together - and you should have a single working system (plus some configuration on your side to remedy the differences in builds)
Regards,
Greg.
MRLComm 38 not MRLComm 55 issue??
Hi Greg and everybody
I have now installed MRL 1.0.1943 and I now have voice responses working !! My microphone finally working and chrome pages looking really good. MarySpeech talking back and answering away, telling me the time etc .
I had several incorrect settings on my computer, have now correctly updated to 64-bit Chrome and 64-bit Java and checked bat file and script file paths etc.
However I am getting a message saying MRLComm 38 not MRLComm 55 expected shown in mrl gui. Is there a correct MRLComm I should be using? Cannot connect to my arduinos at present.
I am using the MRLComm from Kracken 1723 downloaded from inmoov site.
Any help most apprecaited
kind regrds
Lorn
MRLComm versions
Use this guide.
http://myrobotlab.org/content/uploading-mrlcomm-arduino-0
It shows where you can find MRLComm and how to upload it to the Arduino.