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 / 25478
25477  |  25479
Subject: 
Re: What I would do (2)
Newsgroups: 
lugnet.robotics
Date: 
Thu, 26 Jan 2006 14:45:43 GMT
Viewed: 
1712 times
  
In lugnet.robotics, Ed Manlove wrote:
In lugnet.robotics, Alexander Sack wrote:
In lugnet.robotics, Steve Hassenplug wrote:
On Mon, January 16, 2006 8:27 pm, pisymbol wrote:
- getting a RTOS up an running (whether that be uCOS-II or Redboot/eCOS)

What is RTOS, uCOS, and Redboot/eCOS?

RTOS - Real-time Operating System

uCOS-II (MicroCos-II) which is a RTOS implementation that has been ported to
many platforms including the ARM7

http://www.micrium.com/products/rtos/kernel/rtos.html

I haven't looked at the brickOS code in about two years but my guess is that
most of the real I/O code (i.e. motor control, sensor reading) was not that
specific to either the kernel or the hitachi processer (except of course for the
8 bit data size).  So all the "peripheral" code could easily be ported.

If the mechnisms for control are still applicable, then yeah, you could port
over the code that is used to activate the various sensors.

In terms of uCOS, after reading half of the kernel book and actually working with it a little bit (the basic examples), it seems to me that one design would be to setup a bunch of high-priorty tasks that are responsible for various ports/sensors that send events to a master task waiting for these to come in.   If a sensor/port generates an event, it gets sent to the master task which consumes the event and sends out a message to the host via bluetooth (I suspect the NXT would be the master but it may work better in a multi-NXT environment to have the host page scan and be the master).  The host then consumes this message, processes some logic over it, and sends back a response which gets consumed and sent to one of the tasks responsible for each subsystem.

The next phase is to have multi-NXTs communicating to each other.  With
Bluetooth, you still have the master and slave issue, i.e. if the host (PC) is
the master in the piconet, you can't have the NXTs communicating directly to
each other (I believe that's because Bluetooth works via TDM and each time slot
is synced with a master clock (PC's host RF transceiver) during connection
initiation).  Again, so far, my thinking is to have the host federate messages
from various NXTs.  That seems resonable to me.

Again, if the message processing logic is on the host, you don't have to write
custom applications for uCOS.  The uCOS kernel runtime will just be responsible
for consuming and producing events that are handled by the host.  There would be
some standardized message consumer running on the host and a "hook" that the
host message consumer would call (think callbacks).  I'm not sure right now if
its best to have some general event callback or have a callback for each type of
event, i.e. if the types of events are really limited then a defined event
contract makes sense.  If the events are more high-level, then some generic
interface is more appropriate.

Anyway, this is just a high-level sketch (I make no claims that this
architecture is best and I'm sure it would be heavily revised when the rubber
hits the road (crosses fingers) in February or August)...

-aps

PS I suspect this would work with eCOS/Redboot as well!



Message has 1 Reply:
  Re: What I would do (2)
 
(...) Alexander, What you are describing seems more like an end application (multiple autonomous robots that do X and Y and can communicate using Bluetooth) then an RTOS design. An analogy of your description of using the NXT processor for just the (...) (18 years ago, 26-Jan-06, to lugnet.robotics)

Message is in Reply To:
  Re: What I would do (2)
 
(...) Hitachi processor to an 32 bit ARM7 processor, one would need to rewrite brickOS kernel for the ARM7 processor. But why reinvent the wheel when there is already several really good real-time operating systems for the ARM, including uCOS-II? I (...) (18 years ago, 26-Jan-06, to lugnet.robotics)

24 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