Subject:
|
Re: Mindstorms NXT programming languages
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Fri, 13 Jan 2006 20:56:51 GMT
|
Viewed:
|
2195 times
|
| |
| |
In lugnet.robotics, dan miller <danbmil99@yahoo.com> wrote:
> What you say below is entirely true, up to a point. Note that most Lego
> stuff (and this is true outside Lego -- it applies to most controller code
> I've seen for robotics) is now using bytecode interpreters. The memory
> advantages far outweigh the CPU superiority of compiled code.
>
> Python is a bytecode interpreter. It's true that the libraries take up alot
> of memory (>5meg for the latest version), but that is mostly Python source
> code. The actual interpreter is 20K on my machine.
>
> So my thought is something like this: create a stripped-down bytecode
> interpreter (VM) that understands _compiled_ Python code (the fact that
> Python is compiled is usually hidden from casual users, but it's just like
> Java -- it compiles a binary.)
>
> A utility would exist that could recursively figure out exactly which
> modules your code was using, and compile only those. That stuff is loaded
> onto the NXT and executed. Support utilities for debugging, logging, and
> possibly extended data analysis (vision, large map databases) can be
> executed on the remote machine, and communicate with the NXT over a socket.
>
> This is not too different from how things work today with NQC ir Interactive
> C, or even with Java I suspect. In reality, the choice of language is not
> that critical to performance, within some bounds. The advantage of Python
> is that it is easy to learn, and there is a ton of Robotics code already
> written for it. It's become somewhat popular in AI circles too, I think
> primarily for its polymorphic abilities (though that requires a compiler,
> which probably exceeds the NXT's budget).
>
> An alternative scenario would be more like what Pyro did with hemisson,
> where the NXT would just be a dumb controller written in C, and Python would
> always run on the host machine over bluetooth. That might be fun, but in
> the end I want a way to get the NXT to operate autonomously.
Dan,
Once you get your hands on an NXT I encourage you to try. Sounds like you
have considered the costs and it might work. Don't wait for permission from us!
Just try it. Often when people say it can't be done, I just consider it a
challenge.
Kev
|
|
Message is in Reply To:
| | Re: Mindstorms NXT programming languages
|
| What you say below is entirely true, up to a point. Note that most Lego stuff (and this is true outside Lego -- it applies to most controller code I've seen for robotics) is now using bytecode interpreters. The memory advantages far outweigh the CPU (...) (19 years ago, 13-Jan-06, to lugnet.robotics)
|
52 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|