Re: LISP in robotics application
David McClain <dbm@refined-audiometrics.com> writes:
> I do indeed do this sort of thing quite often. There are any number of
> approaches that can be used. I constructed the Reppy Channel paradigm,
> following John Reppy’s Concurrent ML philosophy, as near as possible
> using only Lisp. But that is a higher order protocol than may be
> required for so simple a task as has been outlined with the servo
> motors. Reppy Channels attempt to encapsulate the notion of
> communicating threads as first class objects with functions that can
> operate on collections of them. But I strongly encourage anyone
> contemplating this approach to become familiar with the philosophy
> outlined by John in his textbook on Concurrent ML.
>
> The core Lispworks includes SMP threading already, and provides
> mailbox communications. From the sounds of things, this may be all
> that is required. Just be aware that SMP implies that things can
> change beneath you while you are running in a thread. Multiple threads
> may truly be running concurrently. And Martin has provided a wonderful
> collection of primitives to ensure fault-free memory sharing and
> communications.
>
> I also urge anyone embarking in this kind of programming to become
> aware of the work done by Pascal Bourguignon and his team in Europe.
You must be confusing me with somebody else, but I can't pinpoint
exactly who.
> I have also abstracted the Butterfly system of process control and
> communications to something I call the BlueBird library, which unifies
> everything from simple function dispatch, to LW mailboxes, to Reppy
> Channels, to Butterfly processes (think distributed Erlang here), and
> more.
>
> In general, depending on your performance requirements, I have found
> that instantiating a stable of worker threads, to be dispatched on a
> (PAR form1 form2 form3 …) for parallel execution is superior. Why kill
> the horses after they have run the track?
>
> [G-d, I hate these email systems — auto-assigning the wrong return address all the time… ]
On such a project, I would worry early about the real-time constraints
in driving a robot servo-motors from lisp. I'm not saying that it
wouldn't be possible or very interesting to write the high level
thinking and even motor system of the robot in lisp. But I've got the
impression that you might still need dedicated micro-controller to
drive the servo-controler precisely and reactively, for precise and safe
movement of the robot effectors. Notably you probably will want to
implement safety reflexes at the level of the microcontrolers, near the
servos and sensors. (The higher level lisp system can then re-evaluate
the situation and decide how to proceed).
On the other hand, it's quite possible that the layers below lisp could
be as much or even more of a problem than lisp itself (garbage
collector, and multi-threading scheduling in lisp, process and memory
(swap!?) management in linux; I don't know if the real-time options of
linux allow for strong enough constraints to be able to drive several
robot servo-motor with the required constraints for safety).
In any case, my point here is that I would advise to run some benchmarks
and tests to validate the feasibility.
--
__Pascal Bourguignon__ http://www.informatimago.com/
“The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.” -- Carl Bass CEO Autodesk
_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html