I plan on beginning the construction of a robot of sorts when school gets back in. In essence, it will be a small computer one wheels. Perhaps we will add a camera or something later.
I want programming to be added to the robot in modules, without recompiling it's "operating system." Essentially, I will write drivers for its motors and then wrap the drivers in python. There will be directories in the robot's filesystem for placing python scripts, and the operating code (C++) will load all python scripts in each directory (different directories indicate different manners of running the scripts) and invoke the python interpreter.
This would allow for the AI coding/any interfacing to be written in python rather than having to write C or C++ code and constantly recompile.
Recommendations on improvements to the system? Is python a decent choice of scripting language? Thoughts?
>>3
Is english a decent choice for a language for you?
I doub't it's
Name:
Anonymous2011-08-02 1:26
what type of computer are you going to be using? Is it a real, full on, personal computer, or is it a board with a micro controller? If micro controller, then C + ASM, or even just ASM. Microcontrollers usually have fun and intuitive assembly languages.
>>10
No, why, consider for example http://www.keil.com/support/man/docs/is51/is51_mov.htm, the mov bit, C and mov C, bit instructions. One of them takes 2 cycles, another takes 1. No other such pair of instructions has that behaviour.
My meaning is, it might be fun in an autistic way, but not intuitive, never.
>>14
The most popular microcontrollers per volume are fucking awful and make things like PIC12 look nice and sexy.
Name:
Anonymous2011-08-03 0:38
OP here.
>>11
Is Lua's interpreter faster? I didn't have any particular reason for selecting Python, other than I knew it had a lot of modules, and interfacing with the internet and various periphera (camera, audio) is a big goal. Any recommendations would be greatly appreciated though.
>>17
Right, but it allows the modular development.
>>7
I'm actually rather excited for the learning programming.
people say that lua is really fast. It seems to have less going on than python, so I would think so, but I'm not sure. You can also run C stuff with lua pretty easily, although I haven't done that yet.
you can do modular development in pretty much any sane programming language. You just need to either use a feature in the language that provides it for you or be creative and use a consistent convention for getting modularity.
Name:
Anonymous2011-08-03 5:56
Lua isnot fast its just as slow as python which is really slow.
Lua is on average 32x slower than C in single-threaded performance, and it doesn't even support multi-threading so it's not in the multi-threaded benchmarks.
>>20
Wrapping C functions in Python is relatively straightforward as well, and >>24 claims there isn't multithreading in Lua. Not that it really matters too much, the computer I'm using is an old single core.
While I'm thinking about it, does anyone know of a way to do pathfinding using a single camera input? I suppose I could use two cameras for three dimensional input, but a microsoft kinect isn't exactly in the budget...
>>20
You can't get much more modular than a scripting language though. I can add new scripts to a directory and then just use whatever console I add to re-search the directory for scripts. You can add code without recompiling or losing what you've got stored in RAM.
Name:
Anonymous2011-08-03 11:17
>Debian
Isn't Debian a bit to overkill for your purposes? Personally I'd go with something like Slitaz.
Nobody needs just another Linux/X86 based robot. They are useless period, except maybe your laziness.
But not even that
at least do what >>35
told you if you aren't skilled enough to write it from scratch.
Name:
Anonymous2011-08-04 23:03
>>31-38
Name a feature in Debian that is overkill for this project.
Also, I'm writing this in a higher level language because I'm more interested in a working Robot with working learning algorithms that solve multiple problems than I am with learning to write in a particular assembly language and tinkering with microcontrollers. I'm interested in Computer Science and not this boring shit that all of you seem to be.
Name:
Anonymous2011-08-04 23:06
>>35
Although it would be neat to use an Arduino and have computing done on a distant server...