Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
Asked — Edited

Ez-Builder And Autonomous Robots

Hello All!

I recently ordered my EZ-B Complete Kit and can't wait to receive it.

One of my main interests is writing various programs for the robot so it can act on it's own (autonomous) without me having to control it's every move.

I just want a clarification on how you do this with EZ-Builder? Is this done with scripts?

Something like this:
http://www.instructables.com/id/My-Autonomous-HomeMade-Wall-E-Robot/

Did DJ Sures do this with ARC or EZ-SDK?

Would I have to use EZ-SDK with Visual Studio to write custom logic? So I would basically follow the visual studio ez-sdk controller tutorial. Then I would have access to all the classes and methods to control EZ-B. That would allow me to write custom program and then run it?

Thanks so much!

#3  
Also if you want to be able to store data from the robot to be recalled at a later time, is this possible with EZ-Scripts?
#4  
@feros I also had the same questions. There is a Random Personality Generator. Just fill it with things you want it to do or scripts or what ever, then set the time interval between actions and your all set.

This is a pseudo version by there's a list/table and each one of those is an action so on one line I have

Servo(D0,90)
Servo(D1,90)

then in the next one I have something like

CommandControl("Sound Board",track_0)

(or something to that effect)

I originally thought I was going have to write a ton of code to do this but I just made a few scripts and called them in the RPG and my little guy will randomly move around, spout out some sound bytes from sealab 2021, throw it's "arms" in the air and spin around. I had some talk commands for a minute but i pulled them in favor of the sound bytes for now. I did this all in about 45 minutes after I discovered the Random Personality Generator.

Sure you can write you own and get super detailed with it but, if you just want to have something that appears autonomous until you can get more experience with the ezb system the RPG is awesome. That's what I did and that's where I'm at.


As far as reading data I believe that some you can and some you can't. I know you can read the positions and speeds of the standard servos that come with the kit. But (I may be mistaken here) I think that you CAN NOT read the position of DC motors or modified servo positions. I think DC motors do not have a data wire. (I'm still learning alot of this myself)

I hope that helps.
#5  
That does help. But can you have the robot react to the environment with EZB Scripts? Can you store data from the robot to be recalled at a later time in the program with EZB Scripts?
#6  
@feroze. Yes there are several ways. I've only messed with my ezb a little but I'll tell you what I know.
The camera has tracking and recognition options. Color, face, glyph, rqcode, and I think 1 or 2 more. Those can be set to work in various ways. This is where I'm currently playing around. They can be set so that the robot will move to follow and/or avoid? I'm not sure about avoid. But it appears that it tries to move in order to keep an object within its view finder.

Then there's a way to set it to where servos for arm(s) and cameras (probably will be your head) so that the whole robot wont move to follow but just the camera or arm(s). I've only just started playing with these so I don't know much about them.

Now something I know even less about.
You can do avoidance with the UltraSonic sensor that comes with the EZ complete. I have not hooked mine up yet. I'm moving soon and didn't want to get to invested in it here when I'm about to have a fantastic work space. (Close on Wednesday ;-) So while I'll be getting into these things more in a few weeks but I do know they can be done.

As far as storing data. You can create Variables but I'm not sure on the details too much or their "Life Time". I've messed with the keyboard controls a little and set variables to store a couple of servo positions and then I set the positions using the variables with a different key.

And none of it seems too complicated. And if you have doubts, just ask. The EZ peoples, company and customers are all amazing people. I'm just trying to be helpful and more like them ;-)
#7  
What a powerful platform, it can do so much "out-of-the-box"

I think I will start programming my robot with EZ-Scripts to get familiar with the commands then move onto C# to write more complex programs. The methods names are probably the same...
United Kingdom
#8  
I wouldn't even bother with C# unless you have good reason to do so. You'll find the controls built into ARC will be sufficient in most cases and where they aren't then EZ-Script is powerful enough to do most other things.

Can you give a specific task example for what you are expecting to need to use the SDK for.

You can store data using data files and the WriteFile (or FileWrite I never remember which way round it is). This will store the data for as long as the file is there. I haven't touched the file methods yet but I'm sure there are ways to "import" data too.

To be honest, you would be better off thinking about what algorithms and functions you are planning for your robot that way we can give specific answers. Until we know what it is you are planning we can only give generic answers and no real help.
#9  
Can I write programs using ARC that utilize logic statements like if, else, switch, for loops etc.? Can I create arrays, matrix, etc to store data? Basically can I write OOP style or functional style programs with ARC?

Eventually I would like to write more complex programs that uses multiple classes. Even utilize other people frameworks. That is the main reason I would like to use the SDK but if you can program all this within the EZ-scripts then that would be great too!
United Kingdom
#10  
Download ARC and try it out, you will be able to use parts of it without the EZ-B, EZ-Script is one thing that you can play around with, you can find out what commands you have and what is possible. Be aware that while it is already very powerful it is still evolving with new commands being added.
#11  
Ok so I just checked it out, and tried looking for these answers on the website but still have some things I am unclear about.

1) Firstly, when I add a script and click settings, under Script Help it shows me all the EZ-Script Functions. But is there a manual online with all the other syntax needed like conditional statement (if, else) and looping statements? How to declare variables in scripts? All I see is how to list one function after another.

Like I found this forum post: http://www.ez-robot.com/Community/Forum/posts.aspx?threadId=2574
Where he uses loops statements, if, print, seems to be writing methods? Is there a manual for all this syntax? All that is shown is the function in EZ-Builter Script Help

2) Next question is about Script flow? I understand how you can create different scripts and control them with script manager. But what is script flow? Is that just using ControlCommand to call one script from another?

3) Lastly, it seems like with the scripts you mainly just use them to plan a custom order of specific functions? As where with the SDK you can use all the same functions but also be able to create methods, arrays, matrix, conditionals, loops, basically you have a normal programming environment? Is this a correct interpretation?

Thanks so much for the help clearing up my confusion!
United Kingdom
#12  
Have a look in the Scripting section of the forum, and on the EZCloud, there are a lot of examples which should help you out.

Also, take the time to read through my An Introduction To Scripting topic, this covers the IF statements and conditions in quite a lot of detail.

Since you will be scripting in the script dialogue the manual is to the right, where each command has an example and with ARC constantly being updated (excluding the short period where it hasn't due to the upcoming major release) there is no official online manual, however I do keep a PDF version as up to date as possible here

In ARC there are also many examples for all script commands.

Scripts are not "just to plan orders". EZ-Script is a very powerful, fully functioning scripting language. Multiple commands can all be used at the same time. Some functions may require more than one script running at the same time however my Ping Avoidance and Ping Avoidance V1.1.0 (and V1.1.1)scripts tackle having to move a servo, drive a robot, read the ping sensor and act accordingly.

Read through the forums, search for specific commands that you are unsure of, check out the cloud and examples, check the controls and read through the tutorials. Every control has a ? by the X in ARC, clicking on it will take you to the relevant page for that control.
#13  
Thanks so much Rich, that is very helpful. I will look through the manual and your Ping Avoidance script as an example.

Is your Ping avoidance script basically what DJ Sures did with the Omnibot here: http://youtu.be/LhlC7xOUadU
United Kingdom
#15  
I believe DJ built his Omnibot before ARC existed.
#16  
Ah so I suppose using the 2D Autonomous mapping code would requiring using the SDK. The video says the source code is available at the website, I wonder if they are talking about it being available in the SDK. It just seems like if you know how to program then the SDK offers everything ARC does but more....
United Kingdom
#17  
Yes but you also need to build it all from a blank canvas where as most functions exist in ARC with new ones being added all the time so it is a trade off. Personally I use ARC and it hasn't fallen short yet.
#18  
yah thats true I see that.

It would be great if you could use ARC with C# or C++ style programming in the scripts. I noticed there was once a C# scripting tool, but look like DJ Sures took it out. I wonder why because C# scripts have much more tools available to program with.

I checked out your pdf of commands for EZ-Buidler Script and it has conditional statements and goto commands which is awesome but I could not find syntax for loops, 'while' or 'for loops'? Can you do this with ARC Script?

Basically I am looking for an environment like ARC but be able to write scripts for my robot in typical c#, c++, or java programming language.
United Kingdom
#19  
The compilers were removed because they were barely used and because EZ-Script is powerful enough for most tasks.

Code:


:loop
Print("This is a loop")
Goto(loop)


Code:


:loop
$x = GetPing(D0,D1)
If($x > 75)
Goto(loop)
ElseIf($x <90 and $x >75)
Goto(alert)
Else
Goto(panic)
EndIf


I use loops a lot in my scripts, check some of them out. The ping avoidance one uses a lot of loops, gotos and labels.
#20  
sweet thanks a lot Rich for the info! I am much better prepared now with the help of your answer, pdf, and example scripts.
#21  
Hey Rich,

I just tried out your Ping Avoidance Script and I have to say it is by far the coolest thing I have done with my robot. Watching is navigate my room all by itself is awesome. I found it best to mount the ping sensor close to the floor right in front of the robot.

Thanks for the awesome script!
United Kingdom
#22  
That's great to hear:)

It's all commented too and there is a topic where it's been discussed (although I don't know where to look for it) so it should be really easy to adapt to your requirements if you need to.