Random movement from Gesture.

56 views
Skip to first unread message

Shido Xen

unread,
Mar 10, 2021, 6:17:52 PM3/10/21
to InMoov
Hello Gael! Hope all is well.

Just was curious if you knew a way to initiate the moverandomize.py/randommovementclock from the within a gesture? Not sure if that is clear, but I'm trying to write a gesture and then launch it into random movement from within the .py file of the gesture.

I'm trying to set up a skit in which there is certain timing from within the gesture movements in which I want to ask the robot some questions before he moves to the next gesture. I can obviously write in some random movements to make it work in a similar way, but was thinking....man, life would be very easy if there was a way to call the random movement for a certain amount of time before moving onto the next gesture (if stacking gestures in one file)

Not sure how it is set up and my python knowledge is still fairly lacking, just seemed like there would likely be a python line to initiate that function seeing as the tab is already up and running from start up. I could be wrong. :9

This is an example of the kinda thing I would like to achieve. (Obviously this one doesn't work, but just as an idea at what I'm trying to get it to do)

def randommovementafterhello():
  i01.startedGesture()
  hello()
  sleep(2)
  i01.finishedGesture()
  MoveRandom ()

gael langevin

unread,
Mar 11, 2021, 5:56:06 PM3/11/21
to Shido Xen, InMoov
Hello,
To initiate random pausing you need to invoke:
VieAleatoire()
To stop the random pausing, you need to invoke:
VieAleatoireStop()

If I take your exemple, i haven't tested it , but it would be something like that:

def randommovementafterhello():
  i01.startedGesture()
  if VieAleatoire(): 
    VieAleatoireStop()
    hello()
    sleep(2)
    i01.finishedGesture() 
    VieAleatoire()
  else:
    hello()
    sleep(2)
    i01.finishedGesture() 
    VieAleatoire()

Gael Langevin
Creator of InMoov
InMoov Robot
@inmoov




--
You received this message because you are subscribed to the Google Groups "InMoov" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inmoov+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/inmoov/0841eb99-880a-4a8b-b891-a92a089a01b5n%40googlegroups.com.

Shido Xen

unread,
Mar 12, 2021, 9:51:34 AM3/12/21
to InMoov
GAH! And here I thought I was becoming fairly familiar with the gestures folder. It was right there already set up for me and I completely missed it. XD

Thank you for pointing that out Gael! Now it is playtime. :)
Reply all
Reply to author
Forward
0 new messages