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 / 21139
21138  |  21140
Subject: 
Re: Porting LEGO Robotics Kit.
Newsgroups: 
lugnet.robotics
Date: 
Tue, 5 Aug 2003 02:15:01 GMT
Original-From: 
Steve Baker <SJBAKER1@AIRMAIL.stopspamNET>
Viewed: 
1000 times
  
ayian@telecom.ece.ntua.gr wrote:
Dear sir/madam,

During the last week at our laboratory at the National Technical University
of Athens, Greece, we have become interested in using the LEGO Robotics Kit,
in order to allow students that take the course of "Computer Vision &
Robotics" to have a general idea on programming for automation.

However, we use only C/SDL for programming purposes, plus we use a project
management system, developed by us, that keeps track of the projects (i.e.
who has booked it out/in, backups,...), allow compilation of the project
depending on the nature of the project (dll, lib, exe, module, driver,
system, interface, test case, package, protocol, ...)

So if your students already know C, why not program the Lego robots in
C ?   You could either use 'NQC' (which is a C subset specially designed
to run on the standard Lego firmware) - or you could replace the standard
Lego firmware with BrickOS (formerly known as LegOS) and write programs
in full C or C++ using 'gcc'.

The issue that we want to resolve, before proceeding, is how we can
integrate the Robotics programming kit to our environment. Currently, I have
downloaded the MindStorms SDK 2.0 and I had a look at the pdf files that
explain what has to be done in order to program the RCX. Nevertheless, what
it's not mentioned in these documents, is what compiler we should use, in
order to create the firmware, how we can download executables to the Robot
Microcontroller.

Using Lego's programming environment, you "write programs" by building things
like flow charts using a graphical drag-and-drop paradigm.  There is no compiler.
It generates 'byte code' which is downloaded to the RCX using an infra-red link
that plugs into a standard PC.

This only works under MS Windows.

The NQC system is OpenSourced and not from Lego.  It's a more or less conventional
compiler that generates the same kind of byte code that the Lego graphical
environment generates - so it can be downloaded in the same way.  NQC runs under
Linux - and probably several other OS's as well as MS Windows.

The RCX has downloadable 'firmware' - provided by Lego - that interprets the
byte code and drives the robot.

The BrickOS environment replaces that firmware with a more conventional (but
very tiny) operating system that allows you to run raw machine code in the RCX.
Thus, an appropriate version of 'gcc' can be used to compile machine code for
the RCX.

Using BrickOS is a lot harder - because of the setup hassle - but the result
runs much faster than byte-code and leaves much more space for code and variables.

NQC is a LOT easier to use - I recommend it strongly (at least until you run out
of space or time and NEED to switch to BrickOS).

The Lego graphical programming environment is OK for people who don't know how
to program - but most programmers quickly get frustrated with it - so stick with
NQC.

Additionally, we need to know how the LEGO built-in events
(like timeouts) can map onto SDL signals, and vice-versa how SDL timers can
map to in some way to LEGO timers.

SDL runs on the PC - but the RCX is a separate, autonomous controller.  The
RCX can communicate with the PC - but I have no idea how you could make it
talk to SDL.  The data from the RCX would appear as either serial port or
USB data coming from the InfraRed 'tower' that you connect to your PC.

You couldn't run SDL on the RCX.

What we need from you, is to provide us with as much information as
possible, for the afore mentioned issues.

Feel free to ask more questions.

---------------------------- Steve Baker -------------------------
HomeEmail: <sjbaker1@airmail.net>    WorkEmail: <sjbaker@link.com>
HomePage : http://www.sjbaker.org
Projects : http://plib.sf.net    http://tuxaqfh.sf.net
            http://tuxkart.sf.net http://prettypoly.sf.net
-----BEGIN GEEK CODE BLOCK-----
GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M-
V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++
-----END GEEK CODE BLOCK-----



Message is in Reply To:
  Porting LEGO Robotics Kit.
 
Dear sir/madam, During the last week at our laboratory at the National Technical University of Athens, Greece, we have become interested in using the LEGO Robotics Kit, in order to allow students that take the course of "Computer Vision & Robotics" (...) (21 years ago, 4-Aug-03, to lugnet.robotics)

2 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