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 / 2753
2752  |  2754
Subject: 
Re: Pseudocode
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Sat, 20 Sep 1997 18:34:17 GMT
Original-From: 
Jeffrey Strauss Morehead <morehead@ece.utexas.AVOIDSPAMedu>
Viewed: 
1264 times
  
I think what you may be wondering is how does the code do all this at
once instead of sequentially as normal code runs. If you are not
wondering this then I'll tell you anyway. The awesome feature of the
handyboard is the pcode. The pcode is a multithreaded OS on the HB.
You write a process (or function:see the code manual on the web) and the
pcode time slices each one. It runs each process for a ms then runs the
next one and so on.

This is what makes your program simple. You just write code that
runs while no flag is present from the sensor processes. Then you have
processes that handle the errors and reset flags. The pcode handles the
multitasking through timeslicing. Perfect for robotics.

jm

On Fri, 19 Sep 1997, Karl Altenburg wrote:

On Fri, 19 Sep 1997, jackedIN wrote:
If i design a simple robot that simply (to some ppl, heh) moves around on
the floor scanning for things so it may take appropriate action to avoid
hitting them, just how would someone program that.

One thing to remember: the input is the world (through the sensors) and
the output are the robots actions on the world.

A program outline

repeat
turn on drive motors
repeat
read wall/obstacle sensor
until sensor reads an obstacle
stop motors
reverse motors a few seconds
stop motors
if wall was to the left
turn right a few seconds
else
turn left a few seconds
stop motors
until universe blows up


Karl R Altenburg   altenbur@plains.NoDak.edu
North Dakota State University
Fargo, ND  58105     http://www.acm.ndsu.NoDak.edu/~altenbur
All things are artificial, for nature is the art of God.  SIR THOMAS BROWNE





Message is in Reply To:
  Re: Pseudocode
 
(...) One thing to remember: the input is the world (through the sensors) and the output are the robots actions on the world. A program outline repeat turn on drive motors repeat read wall/obstacle sensor until sensor reads an obstacle stop motors (...) (27 years ago, 19-Sep-97, to lugnet.robotics.handyboard)

3 Messages in This Thread:

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

Custom Search

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