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:
3 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|