
RedDragonManor
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)
You also might want to put a sleep command maybe 20 to 50 if needed in between your code if needed.
But without seeing the code in your Head "Movement for greeting with Speech", Scriptstart) i'm only guessing here.
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)
then I'm suppose to save it with a file name then reopen the script editor and use the Cheat Sheet to add the ControlCommand part I need with this Part here is a link to the steps
https://www.ez-robot.com/Tutorials/UserTutorials/156/6
Then put your code in the script. I use script manager because you can put all your scripts in one spot In ezb.
You don't have to use the Cheat Sheet if you already know how to write the code which I see you already have. However it keeps you from typos.
Good luck,
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
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*
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
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.
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....
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,