go_away

Author Topic: Wavefront  (Read 3915 times)

0 Members and 1 Guest are viewing this topic.

Offline newbieTopic starter

  • Jr. Member
  • **
  • Posts: 36
  • Helpful? 0
Wavefront
« on: August 24, 2008, 04:23:39 AM »
basically i understand how the wavefront algorithm works but the c code =  ??? :D
need someone to explain about the wavefront code:
1.
Quote
int counter=0
what is counter? is it counter means times of run?
Quote
y++
Quote
x++
2.what do the above symbols mean?
Quote
!=
3.what does this symbol mean?
4.what do the "mean node location in up, down, left, right "mean?

the question is based on the irobot\wave_front.c

i will really appreciate if someone can explain the whole code to me. I am too greedy?? ;D ;)

Thank you.
« Last Edit: August 24, 2008, 04:27:29 AM by newbie »

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,663
  • Helpful? 169
    • Society of Robots
Re: Wavefront
« Reply #1 on: August 24, 2008, 03:59:45 PM »
It sounds like you are a very weak programmer . . .
http://www.societyofrobots.com/robot_faq.shtml#programming_tutorial

I suggest getting some books on programming in C:
http://www.societyofrobots.com/robot_faq.shtml#robot_books

It will really help you understand code.

Google around for programming tutorials too:
http://www.google.com/search?q=program+C+tutorial

counters are for while/for loops

y++;
is the same as
y=y+1;

!=
means
'does not equal'

Quote
what do the "mean node location in up, down, left, right "mean?

a node is a location in the grid

Offline newbieTopic starter

  • Jr. Member
  • **
  • Posts: 36
  • Helpful? 0
Re: Wavefront
« Reply #2 on: August 26, 2008, 07:53:17 AM »
how i upload the code to my arduino , by using normal arduino official software or others using isp programmer?
my maze is 6x6 (although simple but i ....  ???,haha), i do not know my goal coordinate and starting point coordinate, can i still using this method?
i want my robot has a speed run mode after the first searching mode, how to program it???

thank you.

pls reply  :'(
« Last Edit: August 27, 2008, 12:00:26 AM by newbie »

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,663
  • Helpful? 169
    • Society of Robots
Re: Wavefront
« Reply #3 on: August 28, 2008, 08:29:43 AM »
you can just use the normal Arduino software

Offline newbieTopic starter

  • Jr. Member
  • **
  • Posts: 36
  • Helpful? 0
Re: Wavefront
« Reply #4 on: September 01, 2008, 03:01:48 AM »
you can just use the normal Arduino software
i receive the below error:
Quote
error: 'long int map [6][6]' redeclared as different kind of symbolC:\Users\user\Desktop\arduino-0011\hardware\cores\arduino/WProgram.h:19: error: previous declaration of 'long int map(long int, long int, long int, long int, long int)'


 In function 'int propagate_wavefront(int, int, int, int)':
 In function 'void unpropagate(int, int)':
 In function 'void clear_map()':
 In function 'int min_surrounding_node_value(int, int)':

Offline newbieTopic starter

  • Jr. Member
  • **
  • Posts: 36
  • Helpful? 0
Re: Wavefront
« Reply #5 on: September 01, 2008, 04:21:26 AM »
Quote
abs(new_state-old_state)==2
Quote
(signed int) (old_state-new_state)==-1

can anyone explain the above code? thank you in advance

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,663
  • Helpful? 169
    • Society of Robots
Re: Wavefront
« Reply #6 on: September 01, 2008, 08:11:19 AM »
Look through those links I sent you before. The answers are in those programming tutorials. Its very basic stuff, you just need to spend the time reading it . . .

 


Get Your Ad Here