Asked — Edited

Some Help With Ez_Ai, Roborealm And ARC

OK, Getting Alan the Android head together for the KS video. I'm asking here hoping that the few people who are working with EZ, RR and EZ-AI, can help me work thru the highlights for the video.

In the video I'd like to highlight some of the obvious ARC items, like color detection, face tracking etc. I have these set up just fine. As I get into EZ-AI I want to set up the Chatbot, which I am having trouble with the script that D.Cochran had on his video (prolly my fault). I get an error on line 5, here is the code I'm using from the video and the error:

$QueryParams = "/C"
EXEC("C:\EZ-AI\EZ-AI.exe"), $QueryParams
Sleep(3000)
:SayRobotAnswer
  waitforchange($robotanswer)
  say($robotanswer)
goto(SayRobotAnswer)

(In the above code there is a space before line 5 and 6, which i think dave said needed to be there but doesnt show here?)

> Error on line 5: Variable not defined: $robotanswer

Next up I want to set up roborealm to do object and facial recognition. I need to set up so that the object name is sent back to EZ builder. I got most of dave video set up but not sure the code for variable watch for incoming and how to use the data. I want the robot to be able to use the name sent back for the robot to say "hello _____" when recognized. But only once or to maybe store in database to then address the person in chatbot etc.

Then the same similar set up for object recognition, with the robot saying what an object is, if queried.

Anyone who can help with these scripts I would be grateful. We have an extremely tight deadline for KS and a calendar of things to do.

Also any ideas of what you think would be great for ALAN to highlight in the video, suggestions are open!

I probably have a million other things but this is a good start.


ARC Pro

Upgrade to ARC Pro

Subscribe to ARC Pro, and your robot will become a canvas for your imagination, limited only by your creativity.

#1  

there is an init script that I use. It is setting $robotanswer = ""

you could add this at the top of this script without any issue.

I can setup roborealm for you if you would like.

#3  

This is my startup script. It runs when there is a connection made to the EZB from ARC


$rsstext = ""
$rssLocation = ""
$feedDescription = ""
ControlCommand("Camera", CameraStart)
ControlCommand("Camera", CameraFaceTrackingEnable)
ControlCommand("HTTP Custom Server", StartServer)
Sleep(2000)
ControlCommand("Sound Servo", PauseOn)
#Starts roborealm that will begin facial recognition
Exec("c:\RoboRealm\RoboRealm.bat")
Sleep(2000)
#Runs some scripts
ControlCommand("Script Manager", ScriptStart, "WhoAmI")
#Monitors things like power, light levels and other things.
ControlCommand("Script Manager", ScriptStop, "Monitor")
ControlCommand("Script Manager", ScriptStart, "Monitor")
Sleep(5000)
#gets parent and grandparent information from the database for this user.
ControlCommand("Script Manager", ScriptStart, "GetDatabaseInfo")
Sleep(5000)
if ($username = "David")
#used to make sure that I have parent info loaded and database is working.
ControlCommand("Script Manager", ScriptStart, "RemindToCallParents")
Sleep(5000)
EndIf
If ($username = "McKay")
sayEZB("Do your school work")
EndIf
Sleep(10000)
$SongsEnabled = 0
$BrainFunctionTaskComplete = 0
#The core of EZ-AI
ControlCommand("Script Manager", ScriptStart, "BrainFunctions")

WHOAMI script


SayEZB("Let me have a good look at you.")

controlcommand("Script Manager", scriptStart, "Greetuser")1

GreetUser script


#This Script is thanks to Rich
# Make sure the variable exists and is reset
$user0 = "null"

IF ($RR_NV_ARR_OBJ_NAME[0] != "")
$user0 = $RR_NV_ARR_OBJ_NAME[0]

     SayEZB("You are " + $user0 + ".  It is great to see you!")

EndIf

# Loop back to the start


GetDatabaseInfo script


#Starting variables for EZ-DB
$UserName = ""
$UserName = $user0
$SqlReturn = " "
$SqlCommand = ""
$FatherName = ""
$MotherName = ""
$GrandmaName = ""
$GrandpaName = ""
$NumberOfVariablesToStore = 2
$RobotName = "Teddy"
$RobotID = ""
ControlCommand("Script Manager", ScriptStart, "GetRobotIDFromDatabase")
Sleep(1000)
ControlCommand("Script Manager", ScriptStart, "GetGrandpaFromDB")
Sleep(1000)
ControlCommand("Script Manager", ScriptStart, "GetGrandmaFromDB")
Sleep(1000)
ControlCommand("Script Manager", ScriptStart, "GetFatherFromDB")
Sleep(1000)
ControlCommand("Script Manager", ScriptStart, "GetMotherFromDB")
Sleep(1000)

BrainFunctions Script


1$UserActivity = ""
$SQLResult = ""
$SQLReturn = ""

:Beginning
#IF($userActivity = "News")
#  WaitForChange("$BrainFunctionTaskComplete")
#  $BrainFunctionTaskComplete = 0
#ElseIf($userActivity = "Weather")
#  WaitForChange("$BrainFunctionTaskComplete")
#  $BrainFunctionTaskComplete = 0
#ElseIf($userActivity = "Traffic")
#  WaitForChange("$BrainFunctionTaskComplete")
#  $BrainFunctionTaskComplete = 0
#ENDIF

#Identify next thing to tell the user from the database based on 
#who is using the robot and what has been told to the user within timmers
ControlCommand("Script Manager", ScriptStart, "GetUserActivityFromDB")
SLEEP(2000)
$UserActivity = $SQLReturn
#Based on what came back from the database call one of the following or say that there is nothing new for them at this time.

#Holiday
IF($SQLReturn = "Check Dates")
  $SQLReturn = ""
  Sleep(2000)
  ControlCommand("Script Manager", ScriptStart, "GetPersonalHolidayFromDB")
  SLEEP(2000)
  IF(LENGTH($SQLReturn) > 0)
    SayEZB("Today is your " + $SQLReturn + ".") 
  ENDIF
  SLEEP(5000)
  ControlCommand("Script Manager", ScriptStart, "GetHolidayFromDB")
  SLEEP(2000)
  IF(LENGTH($SQLReturn) > 0)
    SayEZB("Today is " + $SQLReturn + ".") 
  Endif
  SLEEP(5000)
ELSEIF($SQLReturn = "Reminders")
  sleep(1000)
ELSEIF($SQLReturn = "News")
  $BrainFunctionTaskComplete = 0
  ControlCommand("Script Manager", ScriptStart, "ReadNews")
ELSEIF($SQLReturn = "Weather")
  $BrainFunctionTaskComplete = 0
  #SayEZB("Here I would read the weather")
  ControlCommand("Script Manager", ScriptStart, "ReadWeather")
ELSEIF($SQLReturn = "Traffic")
  $BrainFunctionTaskComplete = 0
  #SayEZB("Here I would say the traffic")
  ControlCommand("Script Manager", ScriptStart, "ReadTraffic")
ELSEIF($SQLReturn = "Songs")
  IF($SongsEnabled = 1)
    $SongID = ""
    ControlCommand("Script Manager", ScriptStart, "GetSongIDFromDB")
    SLEEP(10000)
    #sayEZB("Play song here " + $SongID)
    ControlCommand("Soundboard v4", $SongID)
    SLEEP(50000)
  Else
    $SQLReturn=""
    SLEEP(5000)
  EndIf
ELSEIF($SQLReturn = "Timers")
  SLEEP(1000)
ELSE
  SAYEZBWAIT($SQLReturn)
ENDIF
SLEEP(5000)
GOTO(Beginning)

I can get all of these other scripts for you or you could download the sample teddy project. I just tried to get the link but, it doesnt look like you can download from here. let me put it up at CochranRobotics.com. Sec.

PRO
USA
#4  

I'm out at a farmers market til 7 pm pacific time. I can't get robot realm to accept the camera, I get an error "return image was not a JPEG image" or something like that . I followed your video. I'll see if you are online at 7 ish.

Thanks

#6  

I sent you a link to my googledrive. You can grab the Example Project from there, but let me know when you get on and I will get Alan recognizing you and doing things based on him recognizing you.

#7  

Hey Will. Here is what I got back from Steven at RoboRealm.

David,

AVM has actually migrated to a FREE plugin for RoboRealm. However, it is  no longer distributed along with the main package nor sold alongside  RoboRealm. Your user will need to access the files from the main  documentation page at

http://www.roborealm.com/help/AVM_Navigator.php

See the instructions at the top of that page on how to download and install.

Note, you can disable the nag message by selecting the checkbox that  appears on that same screen (sometimes reading what it says is helpful!) :-)

There is an existing problem that was corrected today that would not  reload the AVM module correctly. It seems there was a naming issue in  that the module is called AVM Navigator while the DLL is just Navigator.  This has been fixed. Your user can either download the file again (as  mentioned in the documentation page) or just rename Navigator.dll to  AVM_Navigator.dll in the plugins folder.

STeven.

On 6/19/2015 9:00 AM, David Cochran wrote: > Hi Steven, > > I have purchased a couple copies of RoboRealm and use them in an AI  > project that I am working on.  The project requires AVM.  I have a  > user who just purchased RoboRealm but couldn't find a way to buy AVM.   > Is that product still available or has it become a part of RoboRealm? > > What is happening is that the user is able to add a Navigation object  > to his RoboRealm project but gets a license nag message. When he saves  > the .robo file and then reloads the project, the Navigation object is  > no longer in his project.  I assume that this is because he is not  > licensed to use AVM. > > I am unable to find the AVM module for sale anymore. > > Thanks > David

PRO
USA
#8  

Thanks David. I'll redownload or rename the file. Might need your help with the two scripts you added after your saved the ezb file. ARC locked up and crashed so I lost the two last chatbot scripts.

#9  

At family birthday party right now. I will see if you are on after this thing wraps up in about an hour.

#10  

Will, are you around? I am able to connect now and get those scripts going for you.