To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.javaOpen lugnet.robotics.rcx.java in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / Java / 44
43  |  45
Subject: 
please help with threaded robot program
Newsgroups: 
lugnet.robotics.rcx.java
Date: 
Mon, 19 Feb 2001 19:09:58 GMT
Viewed: 
2479 times
  
Hi, this is my first message to the robotics groups.  A little background: I've
had RIS 1.0 for a couple of years, I have ~14 years of programming experience
but only 1 year of Java (mostly server side).

I downloaded leJOS beta 3 last week and wrote a simple program that goes
forward, turns, and backs up when it hits a wall, but it was strictly a
procedural do this - then do that kind of program.  I am also reading Jonathan's
book for tips.

My question is this: will subsumption architecture work under leJOS?  I tried
implementing something similar what's in the Robotag chapter, except with fewer
tasks.  My program has two tasks: (1) go forward (following a line) and (2)
react to falling off the line.  I kicked off a new thread for each of these
tasks.  However, when I run it, it just keeps going forward as if the "hey, am I
off the line?" thread is not even there (or is not getting processing time).
Since I haven't done a whole lot of thread programming, I'm not sure whether the
problem lies in (1) my understanding of subsumption architecture, (2) my
implementation of threaded tasks, or (3) something in leJOS.

The code is here if anyone wants to look at it: <URL: http://code.shoover.com/>

Thanks in advance for any assistance,
Susan



Message has 1 Reply:
  Re: please help with threaded robot program
 
Hi Susan, Subsumption works great in leJOS. See this message for some example code: (URL) think what you're missing is an arbitrator, which will probably run as yet another thread. Regards, Jonathan (...) (24 years ago, 20-Feb-01, to lugnet.robotics.rcx.java)

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