Now Reading
LISP — Mecrisp Stellaris Unofficial 1.0 documentation

LISP — Mecrisp Stellaris Unofficial 1.0 documentation

2023-01-25 15:41:35

LISP and Forth have been described as ‘lone wolf’ sort languages that are excellent for single programmers or small groups constructing refined applications, however they suck if the groups get massive or if the programmers are inexperienced.

Forth is very similar to LISP. There isn’t any distinction made between core procedures within the language and extensions added by the programmer. This allows the language to be versatile to an extent past comprehension to individuals who haven’t extensively used the aptitude. As each process is added to the language, the obvious language out there to the programmer grows

In honour of LISP I’m inserting this story about its demise on the Jet Propulsion Labs (JPL). Written in 2002 a lot of the hyperlinks are 404 now, nineteen years later.

It’s a tragic story and one which I believe deserves to be remembered.

Lisping at JPL

Copyright (c) 2002 by Ron Garret (f.okay.a. Erann Gat), all rights reserved.

That is the story of the rise and fall of Lisp on the Jet Propulsion Lab as advised from my private (and extremely biased) viewpoint. I’m not writing in my official capability as an worker of JPL, nor am I in any approach representing the official place of JPL. (This may turn out to be somewhat apparent shortly.)

1988-1991 – The Robotics Years—-Mecrisp-Stellaris-Unofficial-10-documentation.jpg

I got here to JPL in 1988 to work within the Synthetic Intelligence group on autonomous cellular robots. Instances had been completely different then. {Dollars} flowed extra freely from authorities coffers. AI Winter was simply starting, and it had not but arrived at JPL. (Know-how on the Lab tends to run just a few years behind the state-of-the-art 🙂

JPL on the time was within the early planning levels for a Mars rover mission known as Mars Rover Pattern Return (MRSR). In these days house missions had been Massive, with a capital B. The MRSR rover was to weigh almost a ton. The mission funds was going to be within the billions of {dollars} (which was typical in these days).

Towards this backdrop I went to work for a fellow named David Miller, who additionally occurred to be my thesis advisor. Dave had the then-radical concept of utilizing small rovers to discover planets as an alternative of huge ones. In 1988 that was a troublesome promote. Only a few folks believed {that a} small rover may do something helpful. (Many nonetheless don’t.)

Utilizing some creatively acquired R&D funding, Dave employed Colin Angle (then a grad scholar working for Rod Brooks at MIT, now CEO of IS Robotics) as a summer season scholar. Colin constructed a small robotic named Tooth, which stood in very stark distinction to the 2000-pound Robby, which was the testbed for the MRSR mission.

On the time it was roughly taken as a right that AI work was completed in Lisp. C++ barely existed. Perl was model new. Java was years away. Spacecraft had been largely programmed in assembler, or, when you had been actually being radical, Ada.

Robby had two Motorola 68020 processors operating vxWorks, every with (if reminiscence serves) 8 MB of RAM. (This was thought of an enormous quantity of RAM in these days. In reality, the Robby work was typically criticized for, amongst different issues, being too memory-hungry to be of any use.) Tooth, in contrast, had two Motorola 68hc11 8-bit microcontrollers every with 256 bytes of RAM and 2k bytes of EEPROM. (In later robots we used 6811’s with a whopping 32k bytes of RAM.)

(As a sign of simply how briskly and the way radically attitudes can change, the opposite day I heard an engineer complain that “you’ll be able to’t do something with solely 128 megabytes.”)

Each Robby and Tooth had been programmed utilizing Lisp. On Robby we really ran Lisp on-board. The Lisp we used was T 3.1 which was ported from a Sun3 to vxWorks with quite a lot of assist from Jim Firby, who got here to JPL from Yale. Jim additionally wrote a T-in-common-lisp compatibility bundle known as Widespread T. Utilizing Widespread T we may do code growth on a Macintosh (utilizing Macintosh Widespread Lisp and a Robbie simulator, additionally written by Jim) after which run the ensuing code immediately on Robby with no modifications.

Tooth’s processors didn’t have almost sufficient RAM to run Lisp immediately [1] so as an alternative we used a custom-designed compiler written in Lisp to generate 6811 code. At first we used Rod Brooks’s subsumption compiler, however later I made a decision I didn’t just like the constraints imposed by the subsumption structure and wrote my very own for a language known as ALFA [2]. ALFA was subsequently used to program an entire sequence of rovers, the Rocky sequence, which finally led to the Sojourner rover on the Mars Pathfinder mission. (Sojourner had an Intel 8085 processor with 1 MB of bank-switched RAM. It was programmed in C. Extra on this resolution later.)

Tooth, Robby, and the Rocky sequence had been among the many most succesful robots of their day. Robby was the primary robotic ever to navigate autonomously in an out of doors setting utilizing stereo imaginative and prescient as its solely sensor. (NOTE: The stereo imaginative and prescient code was written in C by Larry Matthies.) Tooth was solely the second robotic to do an indoor object-collection job, the opposite being Herbert, which was developed a yr or two earlier in by Jonathan Connell working in Rod Brooks’s mobot lab at MIT. (However Tooth was vastly extra dependable than Herbert.) The Rocky robots had been the primary ever microrovers to function efficiently in rough-terrain environments. In 1990, Rocky III demonstrated a totally autonomous traverse and pattern assortment mission, a functionality that has not been reproduced to my information within the twelve years since.

The interval between 1988 and 1991 was amazingly productive for autonomous cellular robotic work at JPL. It was additionally, sadly, politically turbulent. Dave Miller’s group was, alas, not a part of the organizational construction that had the “official” constitution for doing robotics analysis at JPL. The consequence was a bloody turf battle, whose eventual consequence was the dissolution of the Robotic Intelligence group, and the departure of almost all of its members (and, in all probability, the truth that Sojourner was programmed in C).

1992-1993 – Miscellaneous tales—-Mecrisp-Stellaris-Unofficial-10-documentation.jpg

In 1993, for my very own robotics swan track, I entered the AAAI cellular robotic contest. My robotic (an RWI B12 named Alfred) was entered in two of three occasions (the third required a manipulator, which Alfred lacked) and took a primary and second place. (Alfred was really the one robotic to complete one of many occasions.) However the cool half is that each one the contest-specific code was written in three days. (I began engaged on it on the aircraft experience to the convention.) I attribute this success to a big extent to the truth that I used to be utilizing Lisp whereas a lot of the different groups had been utilizing C.

Additionally in 1993 I used MCL to assist generate a code patch for the Gallileo magnetometer. The magnetometer had an RCA1802 processor, 2k every of RAM and ROM, and was programmed in Forth utilizing a growth system that ran on a long-since-decommissioned Apple II. The instrument had developed a foul reminiscence byte proper in the course of the code. The code wanted to be patched to not use this dangerous byte. The magnetometer workforce had initially estimated that resurrecting the event setting and producing the code patch would take so lengthy that they weren’t even going to try it. Utilizing Lisp I wrote from scratch a Forth growth setting for the instrument (together with a simulator for the {hardware}) and used it to generate the patch. The entire challenge took slightly below 3 months of part-time work.

1994-1999 – Distant Agent

In 1994 JPL began engaged on the Distant Agent (RA), an autonomous spacecraft management system. RA was written solely in Widespread Lisp regardless of unrelenting political stress to maneuver to C++. At one level an try was made to port one a part of the system (the planner) to C++. This try needed to be deserted after a yr. Primarily based on this expertise I believe it’s secure to say that if not for Lisp the Distant Agent would have failed.

We used 4 completely different Widespread Lisps in the middle of the Distant Agent challenge: MCL, Allegro, Harlequin, and CLisp. These ran in varied mixtures on three completely different working techniques: MacOS, SunOS, and vxWorks. Harlequin was the Lisp that finally flew on the spacecraft. Many of the floor growth was completed in MCL and Allegro. (CLisp was additionally ported to vxWorks, and possibly would have been the flight Lisp however for the truth that it lacked threads.) We moved code effortlessly backwards and forwards amongst these techniques.

The Distant Agent software program, operating on a {custom} port of Harlequin Widespread Lisp, flew aboard Deep House 1 (DS1), the primary mission of NASA’s New Millennium program. Distant Agent managed DS1 for 2 days in Might of 1999. Throughout that point we had been in a position to debug and repair a race situation that had not proven up throughout floor testing. (Debugging a program operating on a $100M piece of {hardware} that’s 100 million miles away is an fascinating expertise. Having a read-eval-print loop operating on the spacecraft proved invaluable to find and fixing the issue. The story of the Distant Agent bug is an fascinating one in and of itself.)

Distant Agent Bug:

Deep House 1—-Mecrisp-Stellaris-Unofficial-10-documentation.jpg

The Distant Agent was subsequently named “NASA Software program of the 12 months”.


From right here on the story takes some somewhat much less nice turns. If you’re not within the temper for dangerous information and a number of cynical ranting and raving, cease studying now. You might have been warned.

1999 – MDS

Now, you would possibly anticipate that with a observe file like that, with one technological success after one other, that NASA could be speeding to embrace Lisp. And you’ll, after all, be flawed.

The New Millennium missions had been speculated to be the flagships for NASA’s new “higher, sooner, and cheaper” philosophy, which meant that we got a funds that was impossibly small, and a schedule that was impossibly tight. When the inevitable schedule and funds overruns started the challenge wanted a scapegoat. The essential turning level was a significant assessment with about 200 folks attending, together with lots of JPL’s high managers. At one level the software program integration engineer was giving his presentation and itemizing all the issues that had been going flawed. Somebody (I don’t know who) interrupted him and requested if he may change just one factor to make issues higher what wouldn’t it be. His reply was: do away with Lisp [3].

That one occasion was just about the tip of Lisp at JPL. The Distant Agent was downgraded from the mainline flight software program to a flight experiment (now renamed RAX). It nonetheless flew, but it surely solely managed the spacecraft for 2 days.

I attempted to resurrect Lisp on my subsequent challenge (the JPL Mission Knowledge System or MDS) however the injury was completed. In an try to handle one of many main objections to Lisp, that it was too massive, I employed Gary Byers, who wrote the compiler for Macintosh Widespread Lisp (MCL) to port MCL to vxWorks. (Alongside the way in which he additionally produced ports for Linux and Solaris.) The MCL picture was solely 2 MB (in comparison with 16 or so for Harlequin), but it surely turned out to not matter. Lisp was useless, at the least at JPL. After two years Gary realized that his work was by no means going for use by anybody and he too left JPL. Just a few months later I adopted him and went to work at Google. (The work Gary did on the Linux port finally discovered its approach into OpenMCL so it was not a complete loss for the world.)

There have been at the least two different main Lisp developments at JPL: Mark James wrote a system known as SHARP (Spacecraft Well being Automated Reasoning Prototype) that identified {hardware} issues on the Voyager spacecraft, and Curt Eggemeyer wrote a planner known as Plan-IT that was used for floor planning on plenty of missions. There have been many others as properly. All are lengthy forgotten.

2000-2001 – Google

This part is somewhat off-topic, since that is speculated to be a historical past of Lisp at JPL, however some points of my expertise at Google would possibly nonetheless be of curiosity.

One of many causes I stayed at JPL for twelve years was that I used to be appalled at what the software program business had turn out to be. The administration world has tried to develop software program engineering processes that enable folks to be plugged into them like interchangeable elements. The “interface specification” for these “elements” normally includes a listing of instruments through which an engineer has obtained “coaching.” (I actually detest the usage of the phrase “coaching” in relation to skilled actions. Coaching is what you do to canine. What you need to be doing with folks is educating them, not coaching them. There’s a massive, massive distinction.)

To my thoughts, the hallmark of the interchangeable element mannequin of software program engineers is Java. With out going into too many particulars, I’ll simply say that having programmed in Lisp the shortcomings of Java are obviously apparent, and programming in Java means a lifetime of continuous and unremitting ache. So I vowed I might by no means be a Java programmer, which just about shut me out of 90% of all software program engineering jobs within the late 90’s. This was OK since I used to be managing to place collectively a fairly profitable profession as a researcher. However after Distant Agent I discovered myself increasingly pissed off, and the chance to work at Google simply occurred to coincide with a neighborhood frustration most.

One of many causes I made a decision to go work for Google was that they weren’t utilizing Java. So after all you’ll be able to guess what my first project was: lead the inaugural Java growth on the firm, what finally grew to become Google AdWords. Thank God I had a junior engineer working for me who really knew one thing about Java and didn’t thoughts it a lot. Within the historic custom of senior-junior relationships, he did all of the work, and I took all of the credit score. (Nicely, not fairly – I did write the billing system, together with a fairly wizzy safety system that retains the bank card numbers safe even in opposition to dishonest staff. However Jeremy wrote the Lion’s share of AdWords model 1.)

I did attempt to introduce Lisp to Google. Having had some expertise promoting Lisp at JPL I obtained all my geese in a row, had a cool demo going, confirmed it to all the opposite members of the adverts workforce, and had all of them satisfied that this was a good suggestion. The one factor left was to get approval from the VP of engineering. The dialog went one thing like this:

Me:  I would like to speak to you about one thing...
Him: Let me guess - you wish to use Smalltalk.
Me:  Er, no...
Him: Lisp?
Me: Proper.
Him:  No approach.

And that was the tip of Lisp at Google. Looking back I’m not satisfied that he made the flawed resolution. The interchangeable element mannequin of software program engineers appeared to work moderately properly there. It’s simply not a enterprise mannequin through which I want to be concerned, at the least not on the component-provider aspect. So after a yr at Google I give up and returned to JPL.

2001-2004 Your tax {dollars} at work

Once I returned to JPL they put me to work on – (await it) – engines like google! Apparently they obtained this concept that as a result of I labored at Google for a yr that I used to be now a search engine knowledgeable (by no means thoughts that I didn’t really do any work on the search engine). Fortuitously for me, engaged on engines like google at JPL doesn’t imply the identical factor as engaged on engines like google at Google. Whenever you work on engines like google at Google it means really engaged on a search engine. Whenever you work on engines like google at JPL it means shopping for a search engine, about which I really knew fairly a bit. (Name Google, place an order.) You don’t wish to know what number of of your taxpayer {dollars} went to pay me for serving to to shepherd buy orders by the JPL forms.

However I digress.


[1] It’s potential to run Lisp on surprisingly small processors. My first Lisp was P-Lisp, which ran on an Apple II with 48k of RAM. The three-disk towers-of-hanoi drawback was about on the limits of its capabilities.

See Also

[2] ALFA was an acronym that stood for A Language For Motion. My plan was to finally design a language that may be known as BETA, which might stand for Higher Even Than ALFA. However I by no means obtained round to it.

[3] This begs the query of why he mentioned this. The rationale he gave on the time was that the majority of his time was being taken up coping with multi-language integration points. Nevertheless, this was belied by the next truth: shortly earlier than the assessment, I met with the mixing engineer and supplied to assist him with any Lisp-related points he was encountering. He replied that there weren’t any that I may assist with. So whereas there have been points that arose from the truth that Lisp needed to interoperate with C, I don’t consider {that a} good-faith effort was made to handle these points.

Postscript: Lots of the multi-language integration complications had been brought on by the interprocess communication system that allowed Lisp and C to speak. The IPC relied on a central server (written in C) which crashed frequently. Eliminating Lisp did in reality alleviate these issues (as a result of the unreliable IPC was now not essential). It’s nonetheless supremely ironic that the demise of Lisp at JPL was in the end due in no small measure to the unreliability of a C program.

Replace 7 August 2022

So, did NASA shifting to C enhance the rovers ?—-Mecrisp-Stellaris-Unofficial-10-documentation.jpg

From: New Scientist;Curiosity Mars rover gets 50 per cent speed boost from software update

A brand new software program replace will quickly give NASA’s Curiosity Mars rover a 50 per cent velocity increase, permitting it to cowl a higher distance and full extra science. However the replace very almost didn’t occur due to a mysterious bug within the software program that eluded engineers for years.

Observe: This rover code was written in C and operational logs are scanned by Python again on earth. The PDF’s under describe the method:

Curiosity, which landed on Mars 10 years in the past this month, has already enormously outlived its deliberate two-year lifespan. It may be managed in a number of methods, however the overwhelming majority of the time, it operates …

in visible odometry (VO) mode. This implies it stops at waypoints, that are normally a metre aside in accordance with wheel rotation measurements, and makes use of images to calculate how far it has really travelled. This may be very important as a result of if the rover relied solely on measuring wheel rotations, massive errors would creep in over time.

NASA has relied closely on VO since earlier Mars rover missions utilizing solely inner sensors obtained irreparably caught in sand. If engineers had recognized that wheels had been spinning somewhat than propelling the rover forwards, they might have been in a position to avert catastrophe and prolong missions. Throughout one drive that was speculated to be round 50 metres lengthy, the Alternative rover, which was energetic on Mars from 2004 to 2018, encountered wheel spins and solely travelled 2 metres in actuality.

However this cautious method comes with a trade-off in velocity. Curiosity presently travels about 45 metres an hour in VO mode, regardless of the {hardware} itself being able to 120 metres per hour.

The up to date software program will enable Curiosity to take photographs of its environment whereas stationary, however then examine its prior resting place because it travels. It may well subsequently compensate for any errors if they’re discovered. This brings a small drop in accuracy, however permits the rover to maneuver virtually repeatedly. Checks confirmed that it might allow a velocity of 83.2 metres an hour.

Mark Maimone at NASA’s Jet Propulsion Laboratory in California, who works on the rover driving workforce, says the replace will carry Curiosity nearer to the velocity of its youthful cousin, the Perseverance rover. Perseverance also can calculate whereas driving, however its cameras are in a position to take sharp photos whereas on the transfer, which means it doesn’t need to cease at every waypoint. Even in a cautious VO mode, Perseverance can cowl round 135 metres an hour.

“As a driver, after all we’d prefer to go sooner, however we’ve come to essentially recognize the advantages of getting high-quality place estimates and with the ability to halt a drive earlier than the wheels get embedded in sand,” he says.

“Since drive charges are anticipated to be 50 per cent sooner on common, that can depart extra energy and time out there for science observations,” says Maimone. “One other profit is that as our mission continues into its second decade, energy ranges will slowly lower and this new code will enable us to drive simply as safely even when it takes longer to recharge the batteries.”

The brand new software program will probably be uploaded to Curiosity early subsequent yr and marks the tip of three years of thorough testing. Growth started in 2015, however throughout the first take a look at on an Earth-based rover that very same yr, a doubtlessly harmful bug was discovered. Engineers couldn’t replicate it in simulations on a pc, and the replace finally stalled as different priorities took over. However in 2019, an improved model of the pc simulation that extra intently mimicked the actual rover revealed the identical bug, permitting engineers to trace it down and repair it.

One other workforce has additionally been engaged on rover driving methods that don’t depend on VO, which can be essential for brand spanking new rover missions the place featureless terrain makes navigation tougher, resembling these on the moon or Europa.

Cagri Kilic at West Virginia College says that whereas VO is “near good” for Mars, it may wrestle elsewhere. He and his colleagues have developed a method that he says goes again to the technique of early rovers, which navigated utilizing nothing greater than counting wheel rotations for distance and sensor readings from inner gyroscopes for detecting slips and wheelspins.

Their model improves accuracy by capitalising on moments when sensors are recognized to be static to offset gathered errors. For example, when the rover stops, the management software program can inform that any slight indication of horizontal motion is an error, then tune it out.

“[This approach] mimics the vestibular system inside our ear, so you will get angular charges and acceleration, but it surely’s noisy and it drifts over time,” says Kilic. “What we do is get rid of that bias and noise. I’m not saying that our technique is best than VO. However our technique is nice at any time when VO isn’t out there.”

Source Link

What's Your Reaction?
In Love
Not Sure
View Comments (0)

Leave a Reply

Your email address will not be published.

2022 Blinking Robots.
WordPress by Doejo

Scroll To Top