Asked — Edited

Script Tutorial

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)


ARC Pro

Upgrade to ARC Pro

Take control of your robot's destiny by subscribing to Synthiam ARC Pro, and watch it evolve into a versatile and responsive machine.

#1  

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

#3  

@Jayutmb You know the ARC download comes full of example projects and examples of how to use each control... They can be found in the file menu...

#4  

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):(

#5  

@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...

United Kingdom
#6  

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.)

#7  

Is it possible from within ARC, 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?

United Kingdom
#8  

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.

#9  

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:) 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/

#10  

But unlike APM, i wouldn't plan on setting multiple points and just let it go. It would always be a visual destination.

United Kingdom
#11  

That's achievable. A compass and encoders are two things on my ever growing wish list.

It would really just be a case of storing the current heading when an object is detected, the new heading when the avoidance script has run to point the robot in a clear path, the distance travelled off course and a little bit of simple geometry to calculate the current position.

#12  

@Rich I have the MPU 6050. Is that a good fit for this, or maybe another option? What about incorporating a Pixhawk Autopilot into the mix? And might that simplify things at all?

#13  

One thing expected to be apart of this, is a tethered drone, that would fly to an altitude of say 50 feet (no wind), take shots, then pulled back in to dock, to create a panoramic map of sorts. An overlay would be developed during the testing phase, so that you can visually judge from the photos, how far an object would be from the Rover. Of course this is one of those "looks great on paper" ideas, and time will tell if it is feasible, but thats the plan. This is intended to be an educational platform, so im avoiding a lot of nifty point and click options. Many different exercises being planned out, with this type of navigation being part of it.