Simplest - yet most effective object avoidance

Who can make the best object avoidance, using the simplest code?

In order to qualify, your robot must be able to reverse out of difficult corners, just zig-zagging on easy terrain is not enough. And code must be downloadable in a form that makes it easy to adapt to own project.

The challenge is: Make the best object avoindance with the simplest code.

As perhaps 75% of all our projects include object avoidance, it will be great to have a place with good examples for everyone to enjoy :)

 

My own take at the challenge would be this: https://www.robotshop.com/letsmakerobots/node/5751
Looking forward to see yours :)

 

Thanks to The_Black_Cat for inspiring me to make the challenge ;)

This is an open challenge, and the winner is never going to be appointed, because this is very much a matter of personal preferences, platform etc. But please do show us what you've got :)

To participate, please just post links to your (or your fellow LMR memba's) project below :)

Imagine if a person programs

Imagine if a person programs in asm. 

Here is my entry.Number of

Here is my entry.

Number of lines 0
Prosessor None

:slight_smile:

https://www.robotshop.com/letsmakerobots/node/18035

 

Dang, you beat me to it!

My entry would have had one whole line. So your robot defeats mine. Plus it actually exists! My (Picaxe Basic) entry would read:

rem Sit still you stupid robot or you will run in all kinds of obstacles!

lines?

If I’m not mistaken, in C/C++ you can write everything on one line except the preprocessors (and // comments and probably other stuff), so that would be cheating. In arduino, it isn’t even necessary to use preprocessors (the libraries are pre-included), so…  If the goal changes to “a fewest characters of code”, everyone will use one-char variables. I suggest the goal changes to “a fewest words of code”.

Ok, you are all very funny

Ok, you are all very funny :wink:

Point here was not to make a contest in fewest lines of code, but to inspire people to make simple routines and share them.

Pardun my bad english. Point

Pardon my bad english. Point was to inspire to share smart little pieces of code to do a basic task that many struggle with, or make too complicated.

I have modified the post :slight_smile:

Second, I was trying to lift people over the simple “my robot can drive around”, to at least “And it does it simply”, or possibly even beyond, like “And this is just the base. The thing it does when driving around is…”

Well, OK, one can make

Well, OK, one can make robots without MCU’s. And that is a good point.

However, allow me to repeat myself:

"In order to qualify, your robot must be able to reverse out of difficult corners, just zig-zagging on easy terrain is not enough. And code must be downloadable in a form that makes it easy to adapt to own project."

I do not see this reverse out of difficult corners, and I cannot download any freakin code!

Sorry

I just couldn’t resist :slight_smile:

 

I might do some thing like

I might do something like this with my brothers rc car

can we modify your code for something like this

ZE best one is…

Not only to be simple but to be cheap you can utilize a LDR  aka light dependant resistor, just light fritsl´s project https://www.robotshop.com/letsmakerobots/node/1823

which uses something like the Amanda LDR (Frits LDR)  https://www.robotshop.com/letsmakerobots/node/1833

soon ill send the code.

Well, thank you for pointing

Well, thank you for pointing at my humble stuff… However, this is not any navigation code, as far as I remember?!

… something like “this”?

… something like “this”? Like what?

the rc car navagation

the rc car navagation


Cmon Frits…

I dont mean that, I mean you could use the same method to navigate around using LDRs

I believe its the most simple… You just need to make some changes and DONE!

Something like:

readadc 0, b1

readadc 1, b2

if b1>b2 then gosub…

you know something like that

im working on the code, you know… I´m a newb so taking some time! :slight_smile:

I dunno…

I think Rik was working on something very Zen.
He is a very smart guy you know.

Your contest is admirable

But being that there are so many languages, platforms, actuators, wheel drive & steering, sensors, boards, etc…

Maybe it would be worthwhile to submit different Algorithms to avoid obstacles.

From Geir Project it seems

2 forward facing switches cross connected to two motors

Wouldn’t this be the universal symbol?

 

universal.png

Hmmm... I wonder what the symbol is for , backup check left 45, check right 45 - what is further - go that way :D

Ill bite. Not a short code

Ill bite. Not a short code by anymeans, and its my first, but it seems to be the only one on here :stuck_out_tongue:

https://www.robotshop.com/letsmakerobots/node/28057

Nice!

Aaahhh - Nice one, looking good :smiley:

Thanks for starting the party!

Three lines.

I can do it in three lines of code and use very complex image processing algorithms at the same time. (python psuedocode)

while true:
    serialPC.send(onBoardCamera.getRawImage())
    eval(serialPC.response())