To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.handyboardOpen lugnet.robotics.handyboard in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Handy Board / 4388
4387  |  4389
Subject: 
Re: <obstacles>
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Tue, 15 Sep 1998 02:49:00 GMT
Original-From: 
krasing@iastate!AvoidSpam!.edu
Viewed: 
4461 times
  
Ok. If you used 2 motors in m1(right) & m3(left) , and your sensor was at
the front (and only one), and in port 15, a short program for running it
could be:
/*Start of avoid.c */
void main(){
  while(1){    /*Puts program in an infinite loop*/
   fd(1); fd(3); /* Drives the robot forward */
     while(analog(15<100){ /*Approaching an obstacle */
        off(1); bk(1); /* Turns robot right */
} }  }
/*End of avoid.c */

Of course, if there's more than one sensor or whatever, you'd make the
appropriate changes. And 100 might not be the number you want to use, too.

-Kate

> Dearest kate
> I am using infra red sensor which return value from 255 to 0. 255 when
> it does not sense any thing and valve reduces when there is any thing in
> front. lowest valve is 0.
> 
> 
> 
> 
> Kind Regards
> 
> Sincerely,
> Javaid Iqbal
> 
> On Mon, 14 Sep 1998 krasing@iastate.edu wrote:
> 
> > I don't really know how to explain finite state machines (FSMs) or parse
> > trees...(I'm not in computer science...) but my artificial life class's
> > homepage is still up and the text is available through it in post-script
> > format (http://www.math.iastate.edu/danwell/math378.html).
> > 
> > To everyone that wants my "hard code" - I need to know what kind of
> > sensors you're using and whether or not your environment is a set one.
> > Also, my evolving code is much better at obstacle avoidance than the hard
> > code. (It's not as hard as it may sound!)
> > 
> > -Kate
> > ---
> > Kate
> > krasing@iastate.edu
> > 
> > > > There's many ways you can approach obstacle avoiding.
> > > 
> > > > There are neural nets, evolutionary code (incl. genetic programming and
> > > > genetic algorithms), finite state machines, and there's hard-coding it into
> > > > the program (which, of course is no fun at all but such a headache saver!).
> > > 
> > > > I have some code available, somewhere, that I can dig up - I have a
> > > > hard-code version in IC, an evolving FSM code in C++, and a half-finished
> > > > evolving parse tree in IC (note: use a more recent edition that has
> > > > multi-dimensional arrays. so much easier).
> > > 
> > >  Hi, do you mind sending your hard-code version to me? I would like to have
> > >  a look. I'm currently writing the program for my obstacle avoidance robot
> > >  running on 2 steppers and a HB.
> > > 
> > >  Btw, what is finite state machines and parse tree?
> > 
> > 
> > 
> > 
> 



1 Message in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR