United Kingdom
Asked — Edited
Resolved Resolved by CochranRobotics!

Help With Roborealm Saying Detected Objects

Hey guys.

I need a little help with some script. As the title suggests, I'm trying to get an ARC script to speak an identified object using RoboRealm. It is all set up and passing variables to ARC, and I have a couple of objects trained, but I'm having trouble writing a correct script. Here's what I've got so far...

if($RR_NV_ARR_OBJ_NAME[0])
say("Steve")
elseif($RR_NV_ARR_OBJ_NAME[1])
say("control")
endif

I would be grateful for any help with this to get me started.

Thanks.


ARC Pro

Upgrade to ARC Pro

Discover the limitless potential of robot programming with Synthiam ARC Pro – where innovation and creativity meet seamlessly.

#33  

if($RR_NV_ARR_OBJ_NAME[0]) say("Steve") elseif($RR_NV_ARR_OBJ_NAME[1]) say("control") endif

#34  

this is working fine for him with the code that was supplied. The port wasn't enabled in ARC.

The code mentioned in the previous post isn't what should be used and is not good code. It won't do what you want it to do.

This code is working code that allows the name of the object, as specified in RoboRealm to be said. There is no need to do what is being done in the code above.


:StartOfLoop
WaitForChange($RR_NV_ARR_OBJ_NAME[0])
say("I see " + $RR_NV_ARR_OBJ_NAME[0]+ ".")
Goto(StartOfLoop)

#35  

@Aidan Your code in post #34 won't work.... Your comparator has no exact match.... What your code says is that if $RR_NV_ARR_OBJ_NAME[0] contains any text string, say Steve... What if $RR_NV_ARR_OBJ_NAME[0] = Fred or Frank or rubber chicken? Part of your code would sort of work if you only trained one object (Steve in this case) in RoboRealm, but what if you had many trained objects? Look at David's code in post #35.... that's how it should be done....

#38  

Wait I know this go to learn on ez robot.com there is a tutorital for this

United Kingdom
#39  

@Aiden.

The script you supplied in post #34 was copied from what I originally posted in post #1. This script, as already mentioned by others and tried by the poster, does not and will not work. That is the reason why I started this thread, so I could get the correct script from somebody and compair where I went wrong to help others facing the same issue. 10 out of 10 for your willingness to help which is great, but be sure any advice you offer is tried and tested and correct. My advice for what it's worth is to study the tutorials in depth and learn what ARC has to offer. That way you will have great fun building and controlling robots and you will become a great asset to the community.:)

@Herr Ball.

Sorry I couldn't reply to you sooner to offer some help. I've been away from the forum for a while dealing with life's little problems it seems to be throwing at me at the mo. I'm pleased David got you sorted out and you finally got it working.