Subject:
|
Re: Two motors at the same time... It is possible?
|
Newsgroups:
|
lugnet.robotics.nxt
|
Date:
|
Mon, 19 Feb 2007 10:52:42 GMT
|
Viewed:
|
13584 times
|
| |
| |
Johan Strandberg wrote:
> _very_ difficult. Essentially it prevents the use of _any_ library
> functions in threaded code! (Unless you _know_ it is safe... sigh...
> scratch that... that level of flow analysis in realtime code is beyond
> amateur programmers and probably most professional ones as well. At
> least without heavy duty tools to assist.)
Hi Johan,
While you're dealing with very practical questions here, I thought I'd
throw a paper into the mix:
http://www.hpl.hp.com/techreports/2004/HPL-2004-209.pdf
This was presented in the ACM conference on Programming Language Design
and Implementation (PLDI) in 2005. It's a nice paper exploring the
dangers of multi-threading, and why (no matter what you do), it will
always be unsafe for the programmer---novice or expert---if threading is
not something that is 1) part of the language, and 2) dealt with by the
compiler. So the question of where you can make calls to functions from
(eg. one thread or another) seems a bit odd, and an artificial
limitation that will do nothing to protect the programmer from themselves.
This is part of the motivation for our work using occam-pi on little
robots[1,2], and why we're revising our RCX runtime and porting our VM
to the NXT. If you look at [1], you can see some of our thoughts on why
we think a concurrency-first approach to robotics is necessary.
We'll announce here when our RCX port is finished undergoing revision.
That won't be long... so I suppose this is a bit of shameless promotion...
Cheers,
Matt
[1] In this paper, we discuss our philosophy behind and experiences
teaching with a concurrent programming language on the RCX.
http://www.transterpreter.org/papers/jacobsen-jadud-sigcse-2005.pdf
[2] This paper, written by a second-year undergrad at Kent, explores how
you can map Brooks' subsumption architecture directly into your
programming language if you have a natural representation of "modules"
and "wires" between them.
http://www.transterpreter.org/papers/simpson-jacobsen-jadud-cpa-2006.pdf
|
|
Message has 1 Reply:
Message is in Reply To:
| | Re: Two motors at the same time... It is possible?
|
| (...) I understand his confusion. Not allowing separate threads to call the same subroutine is certainly unexpected. The concept of "thread" conventionally involves separate stacks for local variables (and a shared global state -- unlike separate (...) (18 years ago, 19-Feb-07, to lugnet.robotics.nxt)
|
5 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|