Script Tutorial

 
#1

So I have found some great help in learning from Rich and others who post script examples for us to learn from... However, I cant find a really good post with lots of examples as I learn best from this kind of thing... Anyone have a link to any threads that is filled with good examples to learn from ? ( i have read most of the popular tutorials..ect just looking for more of the hidden gems)

#2

I have a wall-e project in the public cloud you can download. There are a lot of scripts in it.

#3

Have you read Rich's scripting tutorial? http://www.ez-robot.com/Community/Forum/posts.aspx?threadId=3011

Alan

#4

@Jayutmb You know the ez builder download comes full of Example Projects and examples of how to use each control... They can be found in the file menu...

#5

Yea Richard, but i like the style of tutorials like Rich has posted.. they really helped make sense of what I was looking at since I am teaching myself from knowing zip ( my background is in medicine far removed from scripting) Frown

#6

@Jayutmb... No problem... Sometimes if you have something specific it might be best to just ask here... 2 reasons... 1) beats trolling through old threads looking for an answer and ... 2) Some people currently reading would benefit to from your questions... it jogs their memory on things they might have wanted to ask as well...

So true, @Rich has some serious programing skills... sometimes the way he does things makes me feel embarrassed as my code is usually not as well "polished" as his...

#7

Well I'm back home now, at least for a few days.

Give me an idea of what you want to achieve and I'll knock up an example script with explanation of how to achieve it step by step (provided it's nothing too extravagant such as autonomous returning to a charging station or 3d mapping from the ping sensor and encoders or gps etc.)

#8

Is it possible from within EZ Builder, to set a WP (short distance, not GPS) such as 10 feet, than have the robot navigate to that point, avoiding obstacles along the way?

#9

Yes it's possible however;

1) How is the waypoint set?
2) How does the robot measure the distances and angles that it's moved?

Avoiding obstacles is easy with the native controls for the ping sensor or by using the ping roam script I wrote (and modifying it to suit your needs). But in order to script movement to a waypoint the above information is needed.

Unless you add in sensors the robot will no know where it is, where it's going or where it has been. Those sensors could be many different types and connect digitally/serially, by analogue or via I2C. To write a script, or even guide you on writing one, without this information is impossible without covering every combination of methods.

#10

What i was wondering if there was already a way to do it, with EX Builder before reinventing the wheel, which ive done a few times already, only to realise that EZ B has got me covered lol Smile
But if nothing exist, then what about using a Gyro/compass/accel to know where it is, and direction its heading, the encoders to track its movement? Complete newbie spit balling here. So for example, Move forward 50 feet, then it plots a course to that point, but works to avoid obstacles along the way. Think in terms of how the Mars rovers are controlled vs direct control over steering, since this is what i'm shooting for in the end.

In my perfect world, i could plot a course with APM, or similar, then the rover takes it from there.

http://ardupilot.com/