- the "Service Page" script !!!

Ahoy !!
We've done a tonne of work !  Close 50+ bugs (

But wait there's more !  ... We've made better documentation, now all our Services Pages which document our MRL building blocks have an auto-magically linked Python example at the bottom ... called "Examples"

But wait there's more ! ..  A MRL service called the Test service - can auto-magically test each and every one of these python scripts - not only during each build, but on different devices too !

So I'm now in the process of virtualizing hardware in all the scripts to make them worky without hardware.  I do it in a way that I hope is clear, and you can turn off virtualization simply by changing someVirtualThingy = False at the top of the scripts.

Let's take a peek at the InMoov "Service Page"

When you scroll to the bottom of the documentation you'll see an 


and below you'll see our awesome InMoov script ... but its not so awesome..  I think it can be much more awesome since I have virtualized the hardware.  I'm curious about the differences of this script vs "other" official & non-offical scripts, perhaps its time we normalize ?  What is the difference between using startup batch files too ?  
"As a user" .. I want the service/ to do lots of cool things, and be worky every release !! (Is that too much to ask for ? .. I don't think so)
This script is pretty  "weenie" .. needs more meat !


#file : service/ edit raw
# a very minimal script for InMoov
# although this script is very short you can still
# do voice control of a right hand or finger box
# for any command which you say - you will be required to say a confirmation
# e.g. you say -> open hand, InMoov will ask -> "Did you say open hand?", you will need to
# respond with a confirmation ("yes","correct","yeah","ya")
useRightVirtualArduino = True
useLeftVirtualArduino = True
useVirtualInMoov = True

useVirtualArduinos = True

rightPort = "COM8"
leftPort = "COM10"

i01 = Runtime.start("i01", "InMoov")

if (useRightVirtualArduino):
    rightVirtual = Runtime.start("rightVirtual","VirtualArduino")

if (useLeftVirtualArduino):
    leftVirtual  = Runtime.start("leftVirtual","VirtualArduino")

# starting parts
#to tweak the default voice
# tweaking defaults settings of right hand

# verbal commands
ear = i01.ear

ear.addCommand("attach right hand", "i01.rightHand", "attach")
ear.addCommand("disconnect right hand", "i01.rightHand", "detach")
ear.addCommand("rest", i01.getName(), "rest")
ear.addCommand("open hand", "python", "handopen")
ear.addCommand("close hand", "python", "handclose")
ear.addCommand("capture gesture", ear.getName(), "captureGesture")
ear.addCommand("manual", ear.getName(), "lockOutAllGrammarExcept", "voice control")
ear.addCommand("voice control", ear.getName(), "clearLock")



def handopen():

def handclose():


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
hairygael's picture

Super great update Grog! I

Super great update Grog!

I always love your posts!

But why using an old script with Min and Max for the demo/exemple?

The correct scripts are located here:

GroG's picture

Hi Gael ! I'm glad you

Hi Gael !

I'm glad you asked,

because when scripts are under pyrobotlab/service/{serviceName}.py they become Auto-Magical !

They are "auto-magically" included in documentation at the end for each Service Page.
They are "auto-magically" referenced in help menus.
They are "auto-magically" included in "examples"

/service/{serviceName}.py most "auto-magical" aspect is :

Testing Every Build !

Wuh ? did I hear that right. Someone is going to test these python scripts every single build.  So testing everytime the code changes ?  Who has that dedication ?  Who has that stamina ?  Who can be testing 24/7 365 days a year ?

Auto-magical Elves !  That's who 

Ok, so thanks for the direction .. I'll look at the scripts references you sent and start updating

/service/ etc ...

Because the elves are very eccentric and particular, they will only look at scripts which are placed in :

They also live in the virtual world....
And don't really see "real" hardware, but must use virtual hardware..

They are funny that way ..

moz4r's picture

InMoov service need

InMoov service need documentation refresh !!! and little inventory...

- We need testing script for humans ( sometime humans like to do the job of auto-magical Elves , and they like to understand how a single file with few code lines worky , for education )

- We need testing for Auto-magical Elves

- We need a switches to launch the magic, out of the box

- We need to merge !


First, the inventory, about what I know ( lot of things ?? )

Minimal testing scripts used by humans :

Magical script ( start_inmoov.bat is the switch )

Service script & documentation ( InMoov.* )

Test script used by compilater

( Is this Service script ? )


So. Maybe we can use Minimal testing scripts used by humans, for Auto-magical Elves.

By exemple if they see rightPort = "COM42" -> They decide to mount a virtual arduino

Maybe auto-magical Elves can test Magical script too ? By default it launch allready virtual things. Ant It will be usefull for us.


GroG's picture

Thanks for the map and

Thanks for the map and directions moz4r ...
I'll hike around a bit, and look ..