i was watching some videos and i came across this robot called the dog robot. using some ultrasonic beacon's to know were to go here is the link to know how to make them.
so i had this question, can this be attached to and EZ-B?
Upgrade to ARC Pro
Experience the transformation – subscribe to Synthiam ARC Pro and watch your robot evolve into a marvel of innovation and intelligence.
So when the distance is increased, the ping is increased, check that against a pre-determined number and move accordingly. However, turning to find the direction would also be required, a simple If loop to turn, check distance and stop the routine when found should do - much like the escape routine in my Ping Roam 1.1.2 script but the other way around (look for an obstacle rather than no obstacle).
Really, if you split it down in to sections it would be a pretty simple script to write. And because I want other people to learn stuff and get good at scripting etc. I'm not going to write it, I'm going to try and get others to write it (with help where needed though)
And then with what rich said you'll need a turn section. I think using motion tracking with the camera might work better. then use Cheat Sheet to to add it to your script.
All IF conditions must end with an EndIf.
There is also an ElseIf command which could be used. ElseIf is checked only if the first (and any previous ElseIfs in the tree) is not met.
i.e.
If(5<1)
# This will not run as the condition is not met
ElseIf(5=3)
# This also will not run as the condition is not met
ElseIf(5>2)
# This will run, then it will skip the remainder of the tree and only run what is past the EndIf
ElseIf(5=5)
# This will not be run as the ElseIf will not be checked
ElseIf(5>4)
# This will not be run as the ElseIf will not be checked
Else
# This will not be run as the tree has met a condition
EndIf
#Anything below here will run
The IF will only meet one of the conditions and run the commands between it's condition and the next one, then move on to whatever is after the EndIf (if anything) or halt (if nothing).
This alone will only have the robot run to get to 50 units from an object in front of it, it will not look left and right for an object and it will not back away from an object.
A good start for this small project would be to look at the Ping Roam script, it's pretty much the same but backwards. The ping roam script is commented in detail so should be pretty easy to follow and understand. Also my An Introduction to Scripting may be of use too, the example does the opposite and runs away from anything that gets close. However, the syntax may have now changed due to recent EZ-Script improvements.
However, before any coding is done you should be thinking about how you want it to react and to what. Once you know what you want it to do in specific circumstances you can then tackle each part and slowly put together a complex script to do what you need it to do.
I'll update this with links to the posts and projects when I have more time.
You're right, slight typo on my part
So when the distance is increased, the ping is increased, check that against a pre-determined number and move accordingly. However, turning to find the direction would also be required, a simple If loop to turn, check distance and stop the routine when found should do - much like the escape routine in my Ping Roam 1.1.2 script but the other way around (look for an obstacle rather than no obstacle).
Really, if you split it down in to sections it would be a pretty simple script to write. And because I want other people to learn stuff and get good at scripting etc. I'm not going to write it, I'm going to try and get others to write it (with help where needed though)
i think the Code will be:
If(GetPing(D0,D1) > 50) Forward() :loop If(GetPing(D0,D1) < 50) Stop() Else Goto(loop)
diego that will cause a stop loop. youll stop once and then never move again. it should really be:
:loop If(GetPing(D0,D1) > 50) Forward() If(GetPing(D0,D1) < 50) Stop() Else Goto(loop)
And then with what rich said you'll need a turn section. I think using motion tracking with the camera might work better. then use Cheat Sheet to to add it to your script.
@diego Almost. @Technopro so close but not quite.
All IF conditions must end with an EndIf. There is also an ElseIf command which could be used. ElseIf is checked only if the first (and any previous ElseIfs in the tree) is not met. i.e.
The IF will only meet one of the conditions and run the commands between it's condition and the next one, then move on to whatever is after the EndIf (if anything) or halt (if nothing).
This alone will only have the robot run to get to 50 units from an object in front of it, it will not look left and right for an object and it will not back away from an object.
A good start for this small project would be to look at the Ping Roam script, it's pretty much the same but backwards. The ping roam script is commented in detail so should be pretty easy to follow and understand. Also my An Introduction to Scripting may be of use too, the example does the opposite and runs away from anything that gets close. However, the syntax may have now changed due to recent EZ-Script improvements.
However, before any coding is done you should be thinking about how you want it to react and to what. Once you know what you want it to do in specific circumstances you can then tackle each part and slowly put together a complex script to do what you need it to do.
I'll update this with links to the posts and projects when I have more time.