Inmoov Updates.

hi i've had a go at making some changes to some services and making one my self, but i don't know where to go from here . iv attach all the files iv made changes to.

GroG's picture

Wow JHack, Thanks, I'm

Wow JHack,
Thanks, I'm impressed - this is the first post you've done and you've made a service, modified existing system, and added new functionality in one swoop !

This is really great !

Let me have some time to digest what you've done, then we can figure out the best method of integration. 

Thanks a lot for all your work !



jhack's picture

the python script

# a basic script for starting the InMoov service
# and attaching the right hand
# an Arduino is required, additionally a computer
# with a microphone and speakers is needed for voice
# control and speech synthesis

# instead of saying: you said... it would say: did you say...? and I would confirm with yes or give the voice command again
# face tracking in InMoov ... activated by voice ...

inMoov = Runtime.createAndStart("inMoov", "InMoov")

#rightSerialPort = "COM8"
#leftSerialPort = "COM7"

leftHandComPort = "COM34"
rightHandComPort = "COM35"
headComPort = "COM16"
bodyComPort = "COM22"
cameraIndex = 0

# attach an arduinos to InMoov
# possible board types include uno atmega168 atmega328p atmega2560 atmega1280 atmega32u4
# the MRLComm.ino sketch must be loaded into the Arduino for MyRobotLab control


#-- attach left hand and set servo pins thumb , index , majeure , ringFinger , pinky and wrist
#-- or can be attached using default pins by inMoov.attachHand("right")
# -- attach right arm to arduinobody set pin bicep , rotate ,shoulder and omplate
# -- this also can be set to right arduino by inMoov.attachArm("right",3,4,5,6)
# -- and can be done by inMoov.attachArm("right") with all the defaults
##------------------------------------- need to move wrist to arduino body---------------------------

# ------------ inverte all servos needed
# --------- finsh up and publish state -------

##-------------------- attach left side ----------------------------
inMoov.attachArduino("left","atmega328p", leftHandComPort)
#-- attach left hand and set servo pins thumb , index , majeure , ringFinger , pinky and wrist
# -- attach left arm to arduinobody set pin bicep , rotate ,shoulder and omplate

##------------------------------------- need to move wrist to arduino body ---------------------------

# ------------ invert left boby parts
# --------- all right hand fingers have been moved -------
##-------------------- all done
## attach to arduino head and set pins for eye x , eye y , neck and rotHead
#-- note that eye x and eye y are not in use at the moment.
#inMoov.attachMouthControl("head",12) to conect servo to pin 12
#inMoov.attachMouthControl("head",12,0 , 20) to set servo to pin 12 and servo to poition 0 for close, poition 20 for open

# set voice to male
# system check

# new process for verbal commands
ear = inMoov.getEar()
ear.addCommand("rest", inMoov.getName(), "rest")
ear.addCommand("open hand", inMoov.getName(), "handOpen", "both")
ear.addCommand("close hand", inMoov.getName(), "handClose", "both")
ear.addCommand("camera on", inMoov.getName(), "cameraOn")
# ear.addCommand("off camera", inMoov.getName(), "cameraOff") - needs fixing
ear.addCommand("capture gesture", inMoov.getName(), "captureGesture")
ear.addCommand("track", inMoov.getName(), "track")
ear.addCommand("freeze track", inMoov.getName(), "clearTrackingPoints")
ear.addCommand("hello", inMoov.getName(), "hello")
ear.addCommand("giving", inMoov.getName(), "giving")
ear.addCommand("fighter", inMoov.getName(), "fighter")
ear.addCommand("fist hips", inMoov.getName(), "fistHips")
ear.addCommand("look at this", inMoov.getName(), "lookAtThis")
ear.addCommand("victory", inMoov.getName(), "victory")
ear.addCommand("arms up", inMoov.getName(), "armsUp")
ear.addCommand("arms front", inMoov.getName(), "armsFront")
ear.addCommand("da vinci", inMoov.getName(), "daVinci")

ear.addCommand("manual", ear.getName(), "lockOutAllGrammarExcept", "voice control")
ear.addCommand("voice control", ear.getName(), "clearLock")
ear.addCommand("stop listening", ear.getName(), "stopListening")

ear.addCommand("ok", "python", "ok")



def ok():
inMoov.setHandSpeed("left", 0.30, 0.30, 1.0, 1.0, 1.0, 1.0)
inMoov.setHandSpeed("right", 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
inMoov.setArmSpeed("left", 0.75, 0.75, 0.75, 0.95)
inMoov.setArmSpeed("right", 1.0, 1.0, 1.0, 1.0)
inMoov.setHeadSpeed(0.65, 0.75)

jhack's picture


thats ok take all the time you need.

GroG's picture

Quite honestly JHack I was

Quite honestly JHack I was expecting to see a heavily modified InMoov service which would break existing InMoov systems.  I was stunned to see such well thought out, and well designed integration and a new service to boot. 

Kudos ... ! 

I don't have an InMoov myself so I can't test but I will be adding all your files exactly as you have submitted them.  I'd like Gael to verify, just in case I missed something (always a possibility).  But again, I have to say a stunningly excellent contribution.

And I am very glad you created a seperate service for MouthControl - even a well thought out service name (which is a non-trivial matter).  The first thing which came to mind was Halloween talking skull projects will benefit greatly from your updates !

I have also added you as a contributor - you now have the capability to update the repo directly, and I look forward to seeing InMoov and others benefit from your contributions ..  

I genuflect to your Code-Fu


P.S. Tried to add you as contributor to repo - but wants every contributor to have a account - it could be a gmail account or new account here -

jhack's picture

Thank you


didn't get the service to show up on the runtime possible services (don't know how to do that. )  this is my first time programing java/ python i haven't done much programing for about 10 years and that was in vb 6 lol


i just changed my email address on my google account so i hope it works now.

GroG's picture

Ok, that worked .. your

Ok, that worked .. your in.

to get your password you'll need to get it here -

When you "commit" it should ask for your credentials, let me know if you have any issues.

Glad to have you aboard ;)

GroG's picture

The only piiece you were

The only piiece you were missing to get it do display in the runtime Services - is an entry - with its dependencies in the serviceData.xml file .. this is under /thirdParty/repo directory - it controls what service are available and their dependencies.

I added it and checked it in - I've also created a service page (  feel free to change or add anything as you see fit.

Oh, I'll check your script into the repo too under /src/resource/Python/examples/  This way at least there is a modicum of a chance of it getting tested and maintained, versus free form text on a web page.  The repo file can be viewed online when the notation [[]] is used on the service page.

Thanks again for your work !