Community Question

Hello everyone I got another question and I have to say for a first timer in doing something with writing codes like this. I think I'm doing pretty good, but I have a question. I'm a little stumped and want to make sure. I'm putting the right codes codes were their suppose to go. I know that's what their there for and to use and you can edit them, but since I wanted to build her brain fro m the ground up. I did as the tutorial said to do. I just want to make sure I'm doing right. I know I have the first code right.. I'm wanting to have movement from her as she speaks and to give that realistic feel. Talking about the first Category. when I first did the a AIML code for a greeting for the pandorabot,but I also wanted to make it to where her head and stuff would move when she speaks at the same time. So the way I understood it,was to edit the AIML I had first created and added the second category and then republish the AIML code which I havent done yet want to make sure it right first. The part I'm a little cunfused is where to put the servo code information the information on 1 and 2 on step 7 for combining speech and movement. it wants me to add the servo script in the script editor, but it doesn't say which one because it wants me to save and name it then go back in and find the certain controlcommand to add to it but it doesn't say which script editor in the ez robot builder to use can someone help me out with this step. Thanks Paul. I think I have the servos done right for the first part those are for her head her mouth will be driven by the audio coming from her speaker


<?xml version="1.0" encoding="UTF-8"?>
<aiml version="1.0">

<Catogory>
<Pattern>HELLO</Pattern>
<Template>Hello! its very nice to meet you.</Template>
</Catogory>

<category>
<pattern>HELLO</patteren>
<template>[ControlCommand ("Head Movement for greeting with Speech", Scriptstart) ]</template>
</category>

</aiml>


*code for ez robot builder script editor

Say("Hello! its very nice to meet you.")
Servo(D0,1)
servospeed(D0,2)
Sleep(1000)
servo(D0,90)

Servo(D1,1)
servospeed(D0,2)
Sleep(1000)
servo(D1,90)

Servo(D2,1)
servospeed(D0,2)
Sleep(1000)
servo(D2,90)
RedDragonManor
Commented July 2017
had to go back and re edit the post it didn't post right
merne
Commented July 2017
Click on the tab at top named "project", then click the add button, again click scriptsing,a new window pops up in there click on ez-script manager.

The new script manger is added to your project. Then just click add script, on the top left side put the name "Head Movement for greeting with Speech"

Add you code. Remember there are many tutorials in the learn section on ezb's web site, wish Dj and Company and all the community have took a lot of time creating. :)

Good luck and look forward to a video .
Cheers
RedDragonManor
Commented July 2017
Yes thank you and there very helpful the ones I have looked thus far. Just one more question for now just to make sure I'm on the right track. Because I cant test the servo actions until the controller board gets here, but I take it I have everything right in the code on the left side. the servos are for her head tilt left and right your head turn left and right and her eyes to turn left and right
User-inserted image
merne
Commented July 2017
Your almost there. Not sure because I can't see the name of your script, does it have the same name as your AIML "Head Movement for greeting with Speech" without the quotes? Also the code with the servos are examples. so if you use this example make sure when you get your controller to put each servos(s) on the Corresponding digital ports, d0, D1 and D2 that it shown in your code. Not sure how many servos you're going to be using for the movement.

and just so you don't break any parts make sure the servo port settings are what you want before you put it all together. each robot is different e.g. Depending on your servos you can go 1° to 180° Each robot is different and it depends on what your rest position is going to be when you put your servos in place on your robot.

Hope this all makes sense good luck, I'm heading to bed. *sleep*
RedDragonManor
Commented July 2017
real quick the humanoid altogether had 10 servo moments. lower and upper arms and head including mouth. the code in question is just for the head. head tilt left and right head turn left and right and eyes left and right and the mouth will be driven by the audio with the dialog that goes through her speaker

the as far as servo movement for the head for this code is three head tilt head turn and eyes and I didn't then but yes I have Head Movement for greeting with Speech with out any quotes or anything
merne
Commented July 2017
There are several way to do this.
You can either use the "talk Servo" and put your servos for the head tilit, head left/right and eyes left/right. In the talk servo config under the Muilt Servo show in the pictures.

User-inserted image


User-inserted image

This is on way with out having to point the AIML to a script. You Will need to play around with this to see if it suits your needs.

Or write a script... without knowing what Digital port you are using in talk servo for the mouth, it would look like this....

User-inserted image

You may have to change the digital port(s) for the mouth since this example are using digital ports d0, d1 and D2 for the head and eyes.

On a sidenote. I am by no way a guru on this subject I've learned by examples and reading to learn sections quite often and I still struggle so don't give up keep. Keep looking at the learn section(s) and tutorials and you'll get it.

cheers,
Question
AvatarRedDragonManor
Asked on Saturday, July 29, 2017