modding the inmoov service

I’ve been modifying the inmoov service in my robot lab to make it a bit easier to get my inmoov robot up and running as i haven’t followed the norm and gone with using 4 arduino’s instead of the 2. so needed a way to set the pins for the servos

I will looking at getting the service updated with these changes to help everyone else out.
You can download the modified file.

inmoov service

# 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.

# 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)

Inmoov Mouth moving

iv been working on getting the mouth on my inmoov robot to move, i had to work out how to program python to do it so my first script you can see working in the video.

the code is :

from time import sleep
from org.myrobotlab.service import Arduino
from org.myrobotlab.service import Speech
from org.myrobotlab.service import Runtime

def talk (sent): # this is the bit that makes the mouth move up and down 
  ison = False
  a = sent.split()
  for word in a:
    if word[len(word)-2:] == "es" : # removing es at the end of the word
      testword = word[:-2] +'xx' # adding x's to help keep the timing
    elif word[len(word)-1:] == "e" : # removing the silant e at the end of the word
      testword = word[:-1] +'x'
      testword = word
    for x in range(0, len(testword)):
      if testword[x] in ('a', 'e', 'i', 'o', 'u', 'y' ) and ison == False :
        #arduino.digitalWrite(13, Arduino.HIGH)
        mouth.moveTo(6) # move the servo to the open spot
        ison = True
        mouth.moveTo(20) # close the servo 
      elif testword[x] in ('.') :
        #arduino.digitalWrite(13, Arduino.LOW)
        ison = False
      else: #sleep(0.5)  sleep half a second
        #arduino.digitalWrite(13, Arduino.LOW)
        ison = False
        sleep(0.06) # sleep half a second
    #arduino.digitalWrite(13, Arduino.LOW)
# end of talk function


# create an Arduino service named arduino
arduino = runtime.createAndStart("arduino","Arduino")
speech = Runtime.create("speech","Speech")

if arduino.isConnected() == False :
# set the board type
  arduino.setBoard("atmega328") # atmega168 | mega2560 | etc
# set serial device
sleep(1) # give it a second for the serial device to get ready
# update the gui with configuration changes
# set the pinMode of pin 13 to output
arduino.pinMode(13, Arduino.OUTPUT)
#words = 
# Speak with initial defaults - Google en

talk ("Hello. i am inmoov")
sleep (2)
talk ("this is a test to see if my mouth moves correctly")
sleep (2)
talk ("j-hack has made as script to make me talk.")
sleep (2)
talk ("its not perfect but it will do for now")
sleep (2)
talk ("i think it would be nice if i had a mans voice")
sleep (2)
talk ("thank you for  watching")
sleep (2)
talk ("till next time. bye")

# disconnect the arduino

Inmoov finger sensor is here!!!

Hi all

I thought it was time to release this to the world, after countless failures and bad prints I have a working design, as it’s the first design I believe  there will be modifications to it by me and others. I welcome all mods and only hope you will post them up for everyone to see.

This was design for the left arm and has not been tested/ design for the right however simply mirroring base and cover should get it to fit.

sadly there has to be modification done to arm to get everything to fit in the following photos highlights were some plastic needs to be removed. i had to cut a bit out for wired to pass under the servo base this isn’t shown on the photo but its only needed if you wire this up the same way.




Once the plactic has been removed, i added an arduino mini pro (Atmega328 5v) you can see in the photo, the arduino only has 6 pwm outputs so i have wired  the rist to come from the arduino controling the arm (yet to be added),IMG_1116 the next photo shows the extreme amount of wires in the arm some how they all fit, the small yellow wires are the sensor wires(ill go into  IMG_1118more detail on how to wire them in my next post)




servo bracket installed.



IMG_1117 IMG_1119


the servo pulleys i used are from one of my designs the size I used is 22mm as this just rubs together on the back two servos, i need to sorten the screw as show here.









this is the servo bracket read for use with the tendons guides glued on.


video of it working.

Trial and Error

taking the path of trial and error isn’t a bad thing however im my case i seem to go though lots of parts and time this is just some of the prototyping i keeped trying to design a finger sensor for the Inmoov robot.


Inmoov sensor v2

I’ve been working on the finger sensor for some time an version one was getting to fragile at the tips and I didn’t want to upset the design of the hand to much as Gael has done a fantastic  job with the design. so when Gael released “Simple Servo Bed for InMoov”  it gave me an idea to attempted to add the sensors inside the arm.  I designed a spring loaded servo mount that still incorporates  Hall Effect sensors and Rare Earth Neodymium  Magnets.

Inmoov finger sensor v1


I’m building a inmoov robot ( and trying to build a sensor for the fingers this is my first a temped at it, and my first blog so here I go.
I looking at using a cheap sensor as there will need to be ten of them, so the A1302 Ratiometric Hall Effect sensor seems like a good start found here  and needed some magnets to go with 2mm x 1mm Super Strong Disc Rare Earth Neodymium  Magnets found here and an o-ringinmoov finger sensor apart , I had laying around.

the idea behind the parts is the hall sensor needs a magnet to move to or away from it, with no magnet near the sensor its output voltage is 2.5v and when a magnet move closer to it, the voltage will move up or down depending if it’s the north or south pole . the o-ring is used as a spring to resist the movement of the finger tip.


inmoov finger sensori made a video showing the movment of the voltage to the finger at the moment the o-ring seems too hard and needs to be replaced with a  softer rubber.

the movment in the voltage is about 0.4v I’m hoping this will be ok, will need to do more testing.