You *can* haul a boat with a Yugo, but it doesn't mean it is the right
vehical for the job. Languages like C and C++, perhaps Java, perl, and
such, suit themselves to algorithm design. They are closer to a Turing
machine. BASIC is too far abstracted. The language elements in BASIC are
very complex an hide the nature of your algorithm.
This is a computer science debate and we are here on comp.robtotics, so I
guess it is something that we'll have to disagree on.
This is probably the worst choices I've seen. I've programmed on a lot of
machines with assembly, and while it is fun, code that I've written in
assembly is "dead" i.e. I can't do anything with it. Code written in BASIC
only works when you have a BASIC environment installed, and if you've used
elements of a specific BASIC, your screwed until your BASIC vendor decides
to port their BASIC to your new platform.
If you have an algorithm you value, it is best coded in a precise and well
defined language. C is the defacto for this. Java works. Perl seems OK. I
personally like C++. Algorithms and code I write runs on Windows, Linux,
*BSD, Macintosh, and embedded operating systems unchanged.
C may not seem as easy as BASIC at first, but once you get the hang of it,
you'll look back at BASIC and question how you ever got anything done.
What "is" need not forever "be." I'd like to see some more action on this
group. I live in Boston, and for the home of MIT, we have so few resources
Don't we all.
BASIC as an example language becomes hard to follow. Pseudocode is nice, but
by its very nature something that has not been tested. A good, well defined
programming language with simple constructs is better in most cases.
But hey, its a free country (more or less) do what you want.
Why nobody remembers delphi? I've been doing software development for quite
a long time, and I know most of the "live" languages and some of the dead
too (don't force me to remember cobol :-S ), and so far, delphi is the best
of them all for all-purpose programming. (IMHO)
I've done very high level things as asset management talking to oracle and
DB2, I've done games using directX, you name it and I'll do it faster that
C++, better quality, code is more legible, and for the linux fans, there is
kylix. If you haven't done anything fancy (like talking directly to the OS
API), then the code you've done for windows compiles without a glitch to
linux. Execution speed is as fast as C++ (sometimes even faster).
I like Java and the new flavor of .net languages, but too many layers for
the type of application I do.
I have to agree, between basic and C, a thousand times C. But I still love
Pascal was developed as a language to teach programming, not a language that
was designed to write programs.
We all have our favorites.
Well, depending on your definition of "quality" and "legibility."
What about FreeBSD, MacOS, NetBSD or embedded platforms?
I wouldn't bet about the faster, your particular methodology for
implementing the algorithm may have turned out faster on Pascal than the
same appraoch in C++, but ..., well that's a different debate.
In the realm of robotics, I see little utility in the .NET languages.
My problem with Pascal, as I said, is that it was not designed to write
applications. It was designed to teach fundimentals of programming. In that
respect, it may be a good syntax for defining algorithms, but for actual
software development, I like C and C++, you can do some things that other
languages would never allow or make very difficult.
Comparing delphi with the Wirth's first creation is more or less comparing
BASIC of a TRS80 (10 print "hello" 20 goto 10) to VB.NET.
Now think about this, why was it used to teach programming? (I said "used"
in lieu of "developed to" because pascal was originally developed to be a
scientific language. The fact that is was so used as a teaching instrument
reflects the fact that pascal is a very legible language. (see below)
This is my definition as a project manager: "Quality code is the one that
performs what it was designed to perform according to its specs and can be
mantained by any other programmer, demanding a very short time to understand
what is already written." Legibility follows from that. If a junior
programmer reads the same code in delphi or in C++, he/she will take much
less time to understand what is going on reading delphi.
That's a big no no. I'm a software engineer, and I've learned that languages
are only tools for our goals. For these platforms, you have to use the tools
that are available. For example, I develop for PIC using MikroPascal because
it gives me a productivity boost, but there are some things that I still
need to do in mplab. Never done anything for MacOS, but I've heard that
pascal used to be very strong among mac developers, but it probably changed.
Some time ago (delphi 3) I've implemented the same TSP algorithm in delphi
and C. Delphi was slightly faster. I've compared the assembly code generated
by both compilers and delphi generated a few less instructions. But I cannot
claim that delphi is faster than C based on only one test, therefore I said
"sometimes". In practical terms, it is fast enough for my customers. Never
had a complain about performance (except when the project involves database,
but then delphi is used only as the frontend)
I can use that argument for LISP. There are things in that language that
C/C++ would never allow me to do or make very difficult. Although
programming in LISP/Prolog is very boring (even more if you don't have a
very good IDE), the language itself is very powerful, and it definitely has
its niche of applications. It is not a dead language at all, and if you are
lucky, you still can sell LISP based projects.
In our business, we have to be open minded. Sometimes we have to review some
old concepts, or else we may be using the wrong set of tools for a given
problem. You CAN do everything with C/C++, but can you do it faster than
your competitor? Never had to tweak the language to get anything done with
delphi. Pretty much everything I need is offered in the language. What I
like about it is that I can choose how high level or how low level I want to
go. What I dislike about it? Some decisions Borland made about following the
.NET wagon. As I said, I like the .NET concept for some types of
applications, but for the applications I do, the .NET framework is
overkilling and completely unnecessary.
It was used to teach because it had very rigid types. Very rigid function
declarations, where the functions removed passed variables off the stack.
Computer science teachers, as opposed to engineers, wanted a very rigid
environment to enforce concepts that qualified professionals are well able
to determine when and if they should be circumvented.
That is a "good" definition, but there are some things that "junior" people
will always have a hard time understanding. A good hash table, a fast and
efficient tree, stuff like that.
I would also include a reusability clause. One long function can fit into
your definition, but much of the time invested into the code may be wasted
in the larger sense because elements of it could be reusable.
I completely disagree. I have code from the '80s that with only minor tweeks
(K&R -> ANSI) still compile today and is still usable. RLE compression,
serial communication, etc.
The language is integral with your goal. I'm a private consultant and I have
generated a library of routines and classes over 20 years that includes
tons of functionality. I can whip up a fairly sophisticated application in
very short order. Writing things over and over again is wasteful.
Code written in C/C++ can be written to handle virtually every platform you
would ever intend to target. For instance, my library started out on DOS,
but in the course of its use, it has been compiled on Solaris, HPUX, VMS,
Windows95, WindowsNT, WindowsXP, NetBSD, FreeBSD, OpenBSD, ConcurrentDOS,
SCO Xenix, Coherent UNIX, Linux, and MacOS/X. It has even been used in
kernel space on WindowsNT, Windows95, and Linux.
It is a freedom I really enjoy.
I can't debate your results as I have no data with which to do so, delphi is
a good environment, no arguments, but still suffers from the afore
mentioned problem of not running on enough platforms.
I don't like "environment" languages like Java, .NET, LISP, perl, etc. Be
they interpreted or compiled into byte code, I like my code to be code.
Most often, in my case, yes. We've all seen it, right, the Java project that
never seems to ship on time because of garbage collection issues, memory
fragmentation, memory partitioning, data marshalling between components,
thread syncronization etc.
From what I can gather, Microsoft is sort of backing away from .NET. It is
having an inability to deliver the CLR and developers are backing away from
providing it themselves. (A lot of applications are downloaded these days
and the size of the CLR is prohibitive for download)
Can you elaborate on what you mean by wanting
"to see some more action on this group"?
Have you scanned over the subject titles of
this newsgroup to see what it is currently
mainly used for?
I think it is mostly hardware questions like
"what do you think of X" and "where can I
find Z" with the occasional "look at my robot
web site". I suspect the most of often asked
question is about H-bridges.
Because there is such a diversity of interests
in terms of how complex your robot system is
and what language/hardware/os configuration
you use we all fall into incompatible (at the
detailed level) groups.
Also I suspect that 90% of robot projects
never get beyond the robot base stage as the
real work is (IMHO) in the software.
This is the point I made about the fact we all
use different hardware/software/os combinations
and that makes sharing *actual* code difficult.
It doesn't matter how great a language is in
someones opinion it doesn't help those who
cannot use it for whatever reason.
A great idea works fine in any language and
if I come up with one I am sure you can easily
adapt it to Wozbot?
Although I think your robot Wozbot will lack
the oomph to do any major vision processing?
Judging from all the other posts about what language to program in, I
think it is obvious that psuedo-code is the best way to share ideas.
Then you share the ideas, not the program structure. Everyone can tehn
program the psuedo-code in whatever language suits there hardware, OS,
skill level etc.
In practice an algorithm is explained in
English (if that is your native language),
maybe some equation fragments, and some
sketches. A book I have on vision called
"Digital Image Processing" by Gregory A.
Baxes doesn't have any code and it explains
everything in a way that I have no problem
at all implementing in my own programs in
whatever language or OS I want.
So you use whatever language is appropriate
to your particular situation. The professional
programmer has no monopoly on good ideas but
they do have an advantage when it comes to
implementing them in a complex OS.
Thanks for the name/author of the book.
Does anyone else have a good book to
I cannot recommend any because I
haven't found any. I have a list of
papers I've found on the net that
were very helpful.
Are there any good books concerning
autonomous navigation? I am curious
because I wrote one while I was doing
net research, and I wonder if I would
have any competition if I were to publish.
How about machine learning books? AI?
: I'm building a robot and I think I have a few ideas that are cool. I'd like
: any feedback ranging from "wow! great idea" to "dude, that's the lamest
: thing I ever heard."
Great idea. I'm working on something similar. Way out of date pictures of my
bot are at http://www.westnet.com/~chris/Robots /
I'm useing an AVR ATmega16 as a low-level controller for I/O, running AvrX.
I have PID working, with a rotateing head on which sonars will be mounted.
High level computer is a Virgin Webplayer -- an I-appliance hacked to run
Linux. 200mhz processor, with 800x600 LCD, runs on 5v, and takes a laptop
battery. It has 2 RS-232 ports that run at TTL level, so I can connect it
directly to the AVR without a max232 or any level shifter.
Unfortunately, I only get to work on it in bursts since my kids were born --
teething, lack of sleep, house projects, work, etc keep causeing large
delays. My two main goals for the project are sonar mapping, and
experimenting with a Unix-style software system.
What I want to try is having low-level drivers that listed on device
handles which control hardware. So, say, you could make the robot move with
echo "forward 10" >/dev/motors
Or read sonars with cat /dev/sonar
Of course -- you wouldn't really do that in day to day running. But, I
would like to see how modular it can be made, so that behaviors, features,
etc can be added by simply starting new processes.
Of course, I expect the Webplayer to be far too slow for ALL of this.
However, at this rate, by the time I get to the higher-level stuff, I should
have a 2ghz motherboard retired from my desktop to use.
Chris Candreva -- firstname.lastname@example.org -- (914) 967-7816
Cool pics, how are those wheel/motor combos? Where did you buy them?
I'm a true Linux convert. After writing articles about Windows programming,
and spending 15 years developing software on Windows, I've had it. Linux is
easy to use and develop software on. I ain't going back.
You know, that is a neat idea, but I'm actually doing something different.
Web services! how about this:
This way, you can have access to your robot from *any* software, and if you
have internet, it is automatically a remote control.
That's the beauty of web services, IMHO.
Yea, the nano-ITX boards look very cool.
BTW: Where are you? I'm in Boston.
: Christopher X. Candreva wrote:
: Cool pics, how are those wheel/motor combos? Where did you buy them?
Motors were from Diverse Electronics http://members.tripod.com/~divelec /
But are long sold out. $10 each at the time for surplusu DeWirt motors. They
look similar to what I see sold for a bit more now as surpluss wiper motors.
Wheels are lawnmower wheels from the hardware store. TheOneSpot.com site I
mention had the complete method he used to attach them. Site is gone - but
AH, the Wayback machine has it. I'll have to pull this down:
My base started as a copy of Lazlo, with plywood instead of plexi.
: > Linux. 200mhz processor, with 800x600 LCD, runs on 5v, and takes a laptop
: > battery. It has 2 RS-232 ports that run at TTL level, so I can connect it
DOH -- I mean laptop HARD DRIVE.
: You know, that is a neat idea, but I'm actually doing something different.
: Web services! how about this:
I would wonder if you can get real-time response from web services.
I'm not convinced it's going to work the way I envision it either, but
figure I can always combine all the small programs into a big one if it
: BTW: Where are you? I'm in Boston.
New York, Westchester.
Chris Candreva -- email@example.com -- (914) 967-7816
"realtime" is so subjective. Obviously you would not need sub-milisecond
responses, but if you can tollerate 100ms, it should be possible depending
on the infrastructure and size of the messages.
I was thinking the higher level interfaces would work a web services. The
internal parts would be MPI.
I said in another part of this thread, I'm aslo thinking about MPI. I can
envision the robot as a cluster. Take a look at:
If all the self contained logical blocks are written as MPI functions, then
your robot software can grow and spead out over any number of computers.
Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here.
All logos and trade names are the property of their respective owners.