Subject:
|
Re: How advanced can RCX programming be?
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Mon, 10 Jan 2000 21:26:58 GMT
|
Original-From:
|
alex wetmore <alex@phred.org!Spamcake!>
|
Viewed:
|
958 times
|
| |
| |
From: "Matthew Miller" <mattdm@mattdm.org>
> Tobias Möller <tobias.moller@telia.com> wrote:
> > I´ve heard that you can program the RCX in very advanced ways, multitasking
> > and so on.
> > How advanced can it be?
>
> Depends how hard you want to work. With LegOS or pbForth, which replace the
> official firmware, you can program the hardware at the machine level, so you
> can do very advanced stuff. With NQC (or RoboLab) you're still limited by
> Lego's firmware, so it's not as powerful. (For example, with NQC, you're
> limited to 32 variables.)
Even with the 32 variable limit I think that you can make programs which
exhibit pretty complex behaviors. I plan to play with pbForth and LegOS
soon, but really haven't felt extremely limited with NQC yet.
Yesterday I played with the sublimation architecture described in the two
Mindstorms books for the first time. I haven't read anything about this,
but played with an example that my father sent me. I found it to be a very
interesting (an simple, yet not necessarily obvious) way to think about
programming a robot.
The sublimation architecture has a task for each of the things that your
robot does. So on my robot I had two tasks, drive and avoid. Drive would
just always go forward, and avoid would detect bumps and stop and turn
around.
There is then a dispatcher task which watches the input from these other
tasks and decides what to do. Each of the tasks sets a task specific
variable stating what they would like the motor to do. The dispatcher task
then goes through each of these variables and takes the highest priority one
(avoid in my case) and follows it's command. If the avoid task says "do
nothing" then it will bubble down to the drive task.
My code can be found at http://www.phred.org/~alex/lego/wander.nqc. My
father wrote a much more complex program for a lightseeking robot using the
same technique that you can find at
http://www.phred.org/~alex/lego/rotseek.nqc.
Anyway, both of these programs show how to use multitasking while sticking
with the basic NQC stuff. I think that there are a lot of exciting
possibilities which can be based on this same architecture. I plan to play
with it over the next few days.
The hardest part with Mindstorms is coming up with an interesting project...
Most of my current robots just wander around the room and try not to get
stuck on things.
alex
|
|
Message has 1 Reply: | | Re: How advanced can RCX programming be?
|
| (...) I hate to see this about a toy I've had so much fun with, but it isn't likely that (esp. once you upgrade to pbForth or legOS) you'll feel limited by software, even with the 32K limitation. The big limitation is hardware. The sensors (esp. (...) (25 years ago, 10-Jan-00, to lugnet.robotics)
|
3 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|