To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 22591
22590  |  22592
Subject: 
Re: Multitasking
Newsgroups: 
lugnet.robotics
Date: 
Sun, 18 Jul 2004 08:24:23 GMT
Viewed: 
842 times
  
Hi,

how does BrickOS handle the following situation?
Its a path follower robot with bumpers to detect an obstacle.
When the robot starts it seeks the black path and follows it.
When the robot hits an obstcle, he gets back and turns.
How do I implement this behavior?

My first idea is to put the bumper sensor in its own thread.
This will interupt path following, he avoids the obstacle.
But what happens after returning to the first thread?
I think the robot will have lost the black path, but the when
the robot returns to its first thread, it returns somewhere in
the middle of the path following algorithm. The question now is
do I have to poll to detect this situation?
Any ideas?

This is a constructed example, not the path following and bumper
is important. This can be any algorithm.

Thx



Message has 1 Reply:
  Re: Multitasking
 
(...) A useful technique (which doesn't really require parallel threads) is called a "State Machine" (also known as a "Finite State Automaton" or FSA for short). The idea is to list all the 'states' the robot can be in and to assign a number to each (...) (20 years ago, 19-Jul-04, to lugnet.robotics)

Message is in Reply To:
  Multitasking
 
Hi, I have some questions about usage of multitasking in robotics. I think its necessary, because it simplifies programming. Instead of breaking down actions in small pieces and check sensors in between. For example: driving a square and watching (...) (20 years ago, 9-Jul-04, to lugnet.robotics)

5 Messages in This Thread:


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

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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