Mars Rover Controlled By Java

  • Thread starter Michael N. Christoff
  • Start date
B

Bjorn-Ove.Heimsund

In comp.arch Jan Panteltje said:
Java is the worst thing that could happen to computing since the
invention of the chuwing gum hard disk.
It is slow, slow, slow, slow, SLOW, and not to mention slow.
And on top of that it is slow.

I think most people have that impression either by playing with Java 1.0
(or listening to those who have), or by using Swing applications.

Newer Java versions and graphical applications using ie. SWT perform
the same as native C/Fortran applications. In fact, the new Hotspot
optimizer in 1.4 is quite good at numerical codes too. For some large
scale computations, my Java codes perform identical to Fortran codes,
with the added benefits of readability and maintainability, not to
mention trivial cross-platform deployment (from my desktop to the local
supercomputer, with excellent scalability).

I might add that Java w/Hotspot quite often outperforms vanilla C
codes, it's only when adding lots of optimization flags to the compiler
that the performance gap closes.
 
D

Dale King

Well, the gravity is not proporitonal to mass alone. It's radius is
smaller as well, so its gravity, on surface, is doen only by a factor
of 2 or so.

For the record, Mars' surface gravity is 0.38 (about 1/3) times Earth's
gravity.
 
B

Bjorn-Ove.Heimsund

In comp.arch Jan C. Vorbrüggen said:
Really? Even if you compile with optimization?

Yes, but I might add that the things I do are not easily vectorizable
(sparse matrix calculations). For dense array computations, a good
compiler can do fancy unrolling tricks and other things which is not
(yet) available in Java nor in Hotspot.
I consider a reasonably well-written F95 program to be very maintainable
and more portable than Java - if only for the fact that there's only one
F95 standard all compilers are written to, while there are several

It's very easy to create unmaintainable code in any language, Java is no
exception. It's just that Java doesn't have a 40 year legacy baggage,
and encourages good design practices. Java seems to be well recieved
in some computer science institutes as well, especially as an
introduction to OO programming.

On the portability side, I have had issues porting some F95 codes
between compilers, both of which had different ideas how the standard
were to be interpreted (and the compilers were quite new too). F77
compiles nicely, though.
incompatible (in various ways) Java "standards" around, not to mention
the different thread semantics of different implementations.

Since Java 1.2, I have yet to encounter any issues with thread
implementations, be it on AIX, Solaris, Linux or Windows. There are
of course some more issues relating to thread local storage and
caching, but the semantics of this is being worked out (for Java 1.5)
For any modern compiler of a 3GL language, not compiling with (the equivalent
of) -fast is grossly negligent.

Agreed. But many folks around here run their codes compiled with
"f77 -g" (not that I do that, of course :)
 
P

Programmer Dude

seemanta said:
of course by increasing the velocity several times we can generate
some lift, but that would be a totally wasteful use of energy.

One can also increase wing area. This is, e.g., why 747s can land
so amazingly slowly for such a big bird.
 
R

Richard Maine

Jan C. Vorbrüggen said:
For any modern compiler of a 3GL language, not compiling with (the equivalent
of) -fast is grossly negligent.

A few years ago, I was asked to help with improving the performance of
a major production code here. The author of the code didn't even
know how to turn on the optimizer. I mean turning on the optimizer
at all, even with a simple -O, much less experimenting with the other
settings. I was a bit shocked that they felt the need to call for
help and hadn't even tried that. This was from a supposedly
professional full-time programmer and was in a code that had gone
through all the formal development process (for what little that
was actually worth :-() and was in production use.

But then, I found plenty of other problems also. I suppose it
figures. :-(

It was a Fortran code, but the major problems didn't have much to
do with the language. If you are sufficiently clueless, you can
manage to express that cluelessness in any language.
 
M

Michael N. Christoff

The code on the rover wasn't specified, but it's most likely C/C++ as
that is the primary development language for Wind River VxWorks. I'm
not even sure if that OS has Java support, though even if it did it
would be a BAD choice. Java is NOT designed with real-time operating
systems in mind. It's a fine language for what it is, but it's not
really a suitable choice for this application. Ada might actually be
the best choice, as this is the sort of thing that language was
designed for, but C/C++ is a good alternative that is widely supported
and well known.

Seems like Java may well be used on the actual rover in the future:

Jim Sculley wrote:
<quote>
In any event this entire discussion has ignored the Realtime
Specification for Java, implementations of which are being used in
mission critical apps, such as control systems for a future Mars rover:

http://www.opengroup.org/rtforum/uploads/40/2930/OpenGroup_Golden_Gate_May01
-v05.pdf

Jim S.
</quote>



l8r, Mike N. Christoff
 
A

Ashlie Benjamin Hocking

Richard Maine said:
If you are sufficiently clueless, you can manage to express that
cluelessness in any language.

I think this is a quote worthy of a .sig file. (I'm assuming this is a
Richard Maine original?)

---------------------------------------------------------------------
| "Good and evil both increase at compound
Ben Hocking, Grad Student | interest. That is why the little
(e-mail address removed) | decisions you and I make every day are of
| such infinite importance." - C. S. Lewis
---------------------------------------------------------------------
 
M

mmeron

For the record, Mars' surface gravity is 0.38 (about 1/3) times Earth's
gravity.
Good, So, my estimate is fine.

Mati Meron | "When you argue with a fool,
(e-mail address removed) | chances are he is doing just the same"
 
R

Randy Howard

One can also increase wing area. This is, e.g., why 747s can land
so amazingly slowly for such a big bird.

Flaps and slats (particularly on large aircraft) make a huge difference.

This is somewhat interesting, although the animation is fairly weak.
http://www.grc.nasa.gov/WWW/K-12/airplane/flap.html

During takeoff and landing the airplane's velocity is relatively low.
To keep the lift high (to avoid objects on the ground!), airplane designers
try to increase the wing area and change the airfoil shape by putting some
moving parts on the wings' leading and trailing edges. The part on the leading
edge is called a slat, while the part on the trailing edge is called a flap.
The flaps and slats move along metal tracks built into the wings. Moving the
flaps aft (toward the tail) and the slats forward increases the wing area.
Pivoting the leading edge of the slat and the trailing edge of the flap
downward increases the effective camber of the airfoil, which increases the
lift. In addition, the large aft-projected area of the flap increases the drag
of the aircraft. This helps the airplane slow down for landing.
 
P

Programmer Dude

Randy said:
Flaps and slats (particularly on large aircraft) make a huge
difference.

One reason they make a diff on large aircraft is the proportional
difference in increasing the wing area of an already large wing.

Keep in mind that ALL aircraft land with flaps. 747s are slower
because their wings are bigger to begin with.
...To keep the lift high (to avoid objects on the ground!), airplane
designers try to increase the wing area and change the airfoil shape
...

Yep. Airfoil shape is another mechanism. High camber affects
performance, so isn't used other than at slow speeds (IIUC).
Compare this to fighter jets with itty bitty razor-sharp wings.
Those babies need serious speed to fly at all!
 
H

Harry Conover

Michael N. Christoff said:
Java, the software developed by Sun Microsystems in the mid-1990s as a
universal operating system for Internet applications, gave NASA a low-cost
and easy-to-use option for running Spirit, the robotic rover that rolled
onto the planet's surface on Thursday in search of signs of water and life.

http://news.com.com/2100-1007_3-5142220.html?tag=nefd_top


Mike, I have no facts to support this, but my guess is that that the
PR blurb you post is little more than a bit of marketing spin whose
quotes are being read out of context by a few Java enthusiasts.

First of all, obviously Java is not an operating system. It's an
application programming language or tool targeted to the production of
Internet (particularly browser applications). You also cannot
implement a true operating system using Java as your programming
language. If you doubt this, I'll hand you an 80586 chip with 128-Megs
of online memory and chuckle as you try!)

Java is absolutely useless except when running on a platform already
equipped with an operating system, and many layers of data
communications and application programs, where the top levels include
an operating TCP/IP stack and browser software.

Almost certainly the OS within the rover is a highly optimized
real-time kernel likely programmed in assembler, C, C++ or some other
system implementation langage. (Perhaps even Ada, although that would
be a long-shot.) Java is certainly not a member of this tight-knit
club of system implementation languages, and I simply cannot picture
anyone even attempting to implement a real-time OS using it. Java is
not running the Rover, its real-time operating system is.

My guess is that when you get details of the facts supporting this PR
release, you'll learn that certain Java apps form a portion of the
man-machine interface design employed for the entry of command
sequences here on earth, since Java is capable of simpllifying the
design of this type of software over what could otherwise be
programmed using xlib, C, C++ or even (gasp) assembly language, since
the programming of a control entry MMI is today not exactly rocket
science (no pun intended). (Heck, you could probably even use Visual
Basic for the purpose, if really desperate! Back in the early days of
surveilance satellites, we even programmed the ground based command
interpreters for the K-series birds using Fortran, and they were both
trivial to program and functioned perfectly.)

Also, at last count the foundations of the Internet rested heavily on
C/C++/Assembler implementations running on Unix platforms, however
this may or may not have changed over the years. (At last count, the
thousands of different routines supporting operation of the Internet
involved the use of nearly as many different programming tools...since
so long as they all result in the production of really tight, robust,
executable machine code, the choice of programming language really
doesn't matter.)

When a firm intentionally confuses application programming tools such
as Java with real-time OS implementation methodoloy, in my mind they
both risk and deserve justifiable ridicule. I don't believe that Sun
intended to create such confusion in their publicity release, however
a few Java enthusiasts do seem bent on misrepresentation of Java's
capabilities, potentially at Sun's credibility expense.

Harry C.
 
T

Toon Moene

I think this is a quote worthy of a .sig file. (I'm assuming this is a
Richard Maine original?)

It bears a relation to "Real Programmers can write Fortran in any
language", but I hesitate to call it a "corollary".

[ dodges ]
 
H

Harry Conover

mitch said:
Read the article carefully. Java is being used to create 3D views of
terrain, and for command and control functions, ON EARTH. The last
paragraph correctly states that Wind River Systems made the embedded
software in the Spirit and Opportunity rovers. They run applications
created by JPL which execute on the VxWorks real-time operating system
(RTOS). I know this because a little of my work is in that RTOS - I
worked for Wind River until recently.

If you want more info on VxWorks, see the web site: www.windriver.com

The VxWorks RTOS also ran the Mars Lander and is in many other active
NASA probes like Stardust.

--mitch

Now that I can believe! :)

I'm still supporting embedded 8051 packages running on the original
Franklin RTOS, nearly all embedded control systems using the Intel
80X86 family now run VxWorks, with the exception of the 80186. Wind
River is certainly doing something right.

Their VxWorks RTOS package is really slick...I know this because I was
once comissioned to write a RTOS OS for the 80186 similar to VxWorks
(which doesn't support the 80186 in order to provide support for a
legacy PLC controller design. Sadly, the firm quickly lost interest
and cancelled the funding 3-months into the project, just when I was
begining to become really good at rewriting VxWorks 80386 OS code into
80186 code! :)

I never found out if the mission was scrubbed because of an internal
marketing decision, or because Wind River and its attorneys got wind
(no pun inteded) of the project.

What do/did you think of "Tornado"? Seemed to me that it was equally
as bad as "Starteam", and the neither of these two CM systems came
close to equaling the features provided by the old Unix PWB (for you
newbies, PWB "Programmers Workbench", arguably the original software
configuration management tool).

Harry C.
 
H

Harry Conover

Richard Maine said:
A few years ago, I was asked to help with improving the performance of
a major production code here. The author of the code didn't even
know how to turn on the optimizer. I mean turning on the optimizer
at all, even with a simple -O, much less experimenting with the other
settings. I was a bit shocked that they felt the need to call for
help and hadn't even tried that. This was from a supposedly
professional full-time programmer and was in a code that had gone
through all the formal development process (for what little that
was actually worth :-() and was in production use.

If he was dealing with embedded software, the original designer may
have had good reason not to turn on the optimizer.

In embedded software, we frequently write to memory addresses that are
in turn mapped to hardware control registers. Early optimizer design
was frequently done by software folk not familiar with this practices,
often optimizing out writes to address that they didn't see being
later read.

IIRC, Microsoft's "MASM" was an assembler whose optimization exhibited
this defect. Today, no many people use MASM, so I don't know if the
flaw was ever corrected. As a result, many embedded software/firmware
designers today still operate with the optimizer turned off for
"safety", and prefer to optimize their own code.

Franklin's 8051 development suite initially exhibied the same problem,
but given that their target market was entired embedded software
designers, the problem was corrected by the 2nd release of the
product.
It was a Fortran code, but the major problems didn't have much to
do with the language. If you are sufficiently clueless, you can
manage to express that cluelessness in any language.

Amen to that statement, and suggest that it be etched it in stone.

A skilled programmer can even write in GWBASIC and produce fantastic
results through the clever use of (IIRC) PUT and POKE commands, which
allow the insertion of machine language instructions in the GWBASIC or
the Atari BASIC command stream. (I wonder how many of today's
programmers would be resouceful enough to use of such extreme
techniques to achieve their goals? Heck, for that matter how many have
ever even directly used machine code?)

Harry C.
 
A

Alan Balmer

Mike, I have no facts to support this, but my guess is that that the
PR blurb you post is little more than a bit of marketing spin whose
quotes are being read out of context by a few Java enthusiasts.
You're about four days late with this observation ;-) Folks who
actually read the referenced article, "Java runs remote-controlled
Mars rover", learned that while a Java program "runs" a simulated
rover, here on earth, and is a very useful tool for mission planning,
it does not run *on* the rover, or directly control it. Read the
article.

You can get the software at http://mars.telascience.org/
 
A

Alan Balmer

A skilled programmer can even write in GWBASIC and produce fantastic
results through the clever use of (IIRC) PUT and POKE commands, which
allow the insertion of machine language instructions in the GWBASIC or
the Atari BASIC command stream. (I wonder how many of today's
programmers would be resouceful enough to use of such extreme
techniques to achieve their goals?

Programmers tend to be as resourceful as necessary, to the detriment
of the remainder of the code's life cycle.. Fortunately, such
techniques are usually not necessary on today's programming platforms.
Unfortunately, some programmers use them anyway.
Heck, for that matter how many have
ever even directly used machine code?)

Rarely needed, even in my day. Assembler language is much preferable,
and lots of people still use it. Direct use of machine code is (was)
sometimes useful for debugging and patching.
 
R

Randy Howard

One reason they make a diff on large aircraft is the proportional
difference in increasing the wing area of an already large wing.

Keep in mind that ALL aircraft land with flaps.

That's simply not true. Not only do some airplane designs simply not
have flaps, but accomplished pilots practice flapless landings in
case of a system failure.

Numerous early Piper aircraft had no flaps at all, and flew very
well. Same is true for quite a few other designs.

Even exotic special purpose modern aircraft, such as the Extra 300
series have no flaps.
 
M

Michael N. Christoff

Harry Conover said:
"Michael N. Christoff" <[email protected]> wrote in


Mike, I have no facts to support this, but my guess is that that the
PR blurb you post is little more than a bit of marketing spin whose
quotes are being read out of context by a few Java enthusiasts.

First of all, obviously Java is not an operating system. It's an
application programming language or tool targeted to the production of
Internet (particularly browser applications). You also cannot
implement a true operating system using Java as your programming
language. If you doubt this, I'll hand you an 80586 chip with 128-Megs
of online memory and chuckle as you try!)

Java is absolutely useless except when running on a platform already
equipped with an operating system, and many layers of data
communications and application programs, where the top levels include
an operating TCP/IP stack and browser software.

Almost certainly the OS within the rover is a highly optimized
real-time kernel likely programmed in assembler, C, C++ or some other
system implementation langage. (Perhaps even Ada, although that would
be a long-shot.) Java is certainly not a member of this tight-knit
club of system implementation languages, and I simply cannot picture
anyone even attempting to implement a real-time OS using it. Java is
not running the Rover, its real-time operating system is.

My guess is that when you get details of the facts supporting this PR
release, you'll learn that certain Java apps form a portion of the
man-machine interface design employed for the entry of command
sequences here on earth, since Java is capable of simpllifying the
design of this type of software over what could otherwise be
programmed using xlib, C, C++ or even (gasp) assembly language, since
the programming of a control entry MMI is today not exactly rocket
science (no pun intended). (Heck, you could probably even use Visual
Basic for the purpose, if really desperate! Back in the early days of
surveilance satellites, we even programmed the ground based command
interpreters for the K-series birds using Fortran, and they were both
trivial to program and functioned perfectly.)

Also, at last count the foundations of the Internet rested heavily on
C/C++/Assembler implementations running on Unix platforms, however
this may or may not have changed over the years. (At last count, the
thousands of different routines supporting operation of the Internet
involved the use of nearly as many different programming tools...since
so long as they all result in the production of really tight, robust,
executable machine code, the choice of programming language really
doesn't matter.)

When a firm intentionally confuses application programming tools such
as Java with real-time OS implementation methodoloy, in my mind they
both risk and deserve justifiable ridicule. I don't believe that Sun
intended to create such confusion in their publicity release, however
a few Java enthusiasts do seem bent on misrepresentation of Java's
capabilities, potentially at Sun's credibility expense.

a) the article never said that Java was on the rover itself. b) Java is
more than a language, it is a platform. c) the fact that Java needs an
underlying OS has never been disputed by anyone. The idea is for Java to be
portable to other _already developed_ platforms. It would not be very
portable if you had to dual boot into a Java OS to run Java apps. d) There
is no reason to believe a real time system cannot be virtual machine based.
It is technicaly feasible and all the benefits of seperating code from
hardware/OS are just as relevant on embedded systems as they are on
desktops. Just look at cell phones. (note: many many people laughed at the
idea that something as small as a cell-phone could run any VM-based
language. Java on top of VM on top of embedded OS seemed way too bulky to
ever be practical. But Moore's law apparently does not apply only to
desktops, but even embedded devices). Will a real-time Java have all the
features of regular Java? Doubtful. ie: automatic garbage collection may
not be possible.



l8r, Mike N. Christoff
 
M

Michael N. Christoff

As I mentioned, you would not implement the OS in Java, but would implement
a VM for the OS that allows one to run Java code with deterministic time
contraints on operations.

I posted this already in another thread.

Jim Sculley wrote:
<quote>
In any event this entire discussion has ignored the Realtime
Specification for Java, implementations of which are being used in
mission critical apps, such as control systems for a future Mars rover:

http://www.opengroup.org/rtforum/uploads/40/2930/OpenGroup_Golden_Gate_May01
-v05.pdf

Jim S.
</quote>



l8r, Mike N. Christoff
 
R

Richard Heathfield

Harry said:
You also cannot
implement a true operating system using Java as your programming
language. If you doubt this, I'll hand you an 80586 chip with 128-Megs
of online memory and chuckle as you try!)

Send them over. I could do with the chip (and the RAM). Feel free to
chuckle, whilst I fetch my screwdriver. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top