ANNOUNCE: Lua RTT plugin beta1 released

Dear All,

I'm pleased to announce a first beta of the Lua RTT bindings. This
code allows to use the powerful Lua scripting language to interact
with the RTT.

The main features are:

- usable as standalone interpreter (scriptable taskbrowser), Lua
Component or Lua service.

- implements a large part of the RTT API. The following entities are
supported: TaskContext, InputPort, OutputPort, Property, Service,
RTT Types (incl. user defined ones and Operators), Operation,
SendHandle, Logger. See the Manual for more information.

- No dependencies on external binding libraries

- Real-time: Lua comes with a real-time garbage collector. It can
also be used in hard-real settings taking some
precautions. Documentation on this will follow soon.

The API currently offers more or less what I needed myself and what
was easy to do. It is not set in stone (its a beta after all!) If
something is missing or should be different, let me know.

My main usecase is to build domain specific languages for different
purposes, mainly a new Coordination State Machine model which will be
released in the near future.

Working quite stable here but there will be bugs without doubt...

Peter, please consider merging into OCL. It is non-intrusive, generic,
small and disabled by default :-)

Code+docs are here:

http://gitorious.org/~markusk/orocos-toolchain/ocl-mk/commits/lua

Pull request follows.

Best regards
Markus

The following changes since commit da6e2fb82f80e8717c91b2674adf482772311882:

Merging fixes of 2.0.2 release. (2010-09-30 23:14:10 +0200)

are available in the git repository at:

git://gitorious.org/~markusk/orocos-toolchain/ocl-mk.git lua

Markus Klotzbuecher (75):
Lua: initial rev
Lua: add newindex metamethod for Variables
Lua: convert void type to lua-nil
add colors to rttlib
Lua: add send/collect support
Lua: some code cleanups
Lua: readd unit tests and some minor fixes.
add more testinfrastructure
Lua: add test to pinpoint multicall problem
lua: rename var:update to var:assign
lua: hackish fix for multicall issue
Lua: testing cleanups
lua: automatic conversion for basic types in TaskContext.call
lua: automatic conversion for basic types in TaskContext.send
lua: add basic tests for conversion and send
lua: some port improvements
lua: optional third argument to Port.new
lua: in/out port read/write lua types support
lua: TaskContext.addPort takes multiple args
lua: addEventPort and addProperty take multiple arguments
lua: make Variable.assign work with lua types
lua: extend Property.set to take lua values
lua: add support for ~/.rttlua init file
lua: cleanup wild west macros
lua: introduce gen_push_bxptr macro
lua: Variable.__newindex support for lua types
lua: create module-local environment
lua: failed attempt to fix the port/property issue.
lua: remove opDot
lua: small rttlib updates
lua: basic service support (incl. Operation type)
lua: add Operation.send()
lua: add service pretty printer
lua: added fist plugin code
Change FindRTT to look for 2.0.0
lua: fixes to lua plugin
lua: change 'plugin' to 'plugins'
lua: 'services', 'types' and 'typekits' bindings
lua: remove dead code
lua: started writing docs
lua: plugin: setglobal TC
lua: add documentation stylesheat
lua: doc updates
lua: commit html docs
Lua: use getService instead of provides()
lua: remove loglevel setting
lua: add loglevel
lua: add service requester
lua: add ServiceRequester_disconnect
add custom formatter support + docs updates
lua: catch exceptions in send and call
lua: remove unused deployment.lua module
lua: add variable fromtab func
lua: doc updates
documentation updates
lua: doc updates
lua: replace global TC with getTC() function
lua: doc improvements
lua: add license headers
lua: add simple producer-consumer example
renamed doc/README -> doc/MANUAL
lua: add port and property removal and destruction functions
lua: more doc updates
lua: make properties indexable and assignable
lua: cleanup cmake options and document
lua: cleanup setting context TC
lua: add trivial service unit test
lua: minor doc update
lua: add cleanup to prod/cons example. bugfix
lua: docs, finish quickstart example
lua: more doc updates
lua: add utils.lua
lua: doc updates
lua: disable Lua RTT by default
lua: final doc updates

CMakeLists.txt | 1 +
lua/CMakeLists.txt | 63 +
lua/LuaComponent.cpp | 191 +++
lua/README | 8 +
lua/deployer.cpp | 107 ++
lua/doc/MANUAL.html | 1185 +++++++++++++++
lua/doc/MANUAL.org | 540 +++++++
lua/doc/MANUAL.txt | 601 ++++++++
lua/doc/css/stylesheet.css | 67 +
lua/lua-repl.c | 399 +++++
lua/lua-repl.h | 392 +++++
lua/modules/rttlib.lua | 370 +++++
lua/modules/utils.lua | 220 +++
lua/modules/uunit.lua | 114 ++
lua/plugins/CMakeLists.txt | 3 +
lua/plugins/lua_plugin.cpp | 70 +
lua/rtt.cpp | 2185 ++++++++++++++++++++++++++++
lua/rtt.hpp | 53 +
lua/scripts/dot-rttlua | 5 +
lua/scripts/producer_consumer/README | 6 +
lua/scripts/producer_consumer/consumer.lua | 25 +
lua/scripts/producer_consumer/deploy.lua | 89 ++
lua/scripts/producer_consumer/producer.lua | 25 +
lua/scripts/rtt-test.lua | 182 +++
lua/testing/CMakeLists.txt | 11 +
lua/testing/test.lua | 218 +++
lua/testing/testcomp.cpp | 132 ++
27 files changed, 7262 insertions(+), 0 deletions(-)
create mode 100644 lua/CMakeLists.txt
create mode 100644 lua/LuaComponent.cpp
create mode 100644 lua/README
create mode 100644 lua/deployer.cpp
create mode 100644 lua/doc/MANUAL.html
create mode 100644 lua/doc/MANUAL.org
create mode 100644 lua/doc/MANUAL.txt
create mode 100644 lua/doc/css/stylesheet.css
create mode 100644 lua/lua-repl.c
create mode 100644 lua/lua-repl.h
create mode 100644 lua/modules/rttlib.lua
create mode 100644 lua/modules/utils.lua
create mode 100644 lua/modules/uunit.lua
create mode 100644 lua/plugins/CMakeLists.txt
create mode 100644 lua/plugins/lua_plugin.cpp
create mode 100644 lua/rtt.cpp
create mode 100644 lua/rtt.hpp
create mode 100644 lua/scripts/dot-rttlua
create mode 100644 lua/scripts/producer_consumer/README
create mode 100644 lua/scripts/producer_consumer/consumer.lua
create mode 100755 lua/scripts/producer_consumer/deploy.lua
create mode 100644 lua/scripts/producer_consumer/producer.lua
create mode 100644 lua/scripts/rtt-test.lua
create mode 100644 lua/testing/CMakeLists.txt
create mode 100755 lua/testing/test.lua
create mode 100644 lua/testing/testcomp.cpp

ANNOUNCE: Lua RTT plugin beta1 released

On Mon, 11 Oct 2010, Markus Klotzbuecher wrote:

> On Mon, Oct 11, 2010 at 11:23:54AM +0200, Sylvain Joyeux wrote:
>> Instead of making OCL a big thing again, would you consider releasing
>> it as a separate package ?
>
> That would be the alternative and in the end Ok for me too. It just
> means slightly more work :-) ..
>
>> IMO, this is way too big to be in an "integrated package" ...
>
> Hmm, its ~300k incl. docs?!
>

My prediction is that your efforts will be used _much more_ outside of
Orocos than inside! So, making it a stand-alone project, with nice RTT
integration is "the way to go", as far as I am concerned. After you have
proven the value of it with some Orocos applications, other frameworks such
as ROS will undoubtedly pick it up...

Herman

ANNOUNCE: Lua RTT plugin beta1 released

On Mon, Oct 11, 2010 at 12:49:25PM +0200, Herman Bruyninckx wrote:
> On Mon, 11 Oct 2010, Markus Klotzbuecher wrote:
>
> > On Mon, Oct 11, 2010 at 11:23:54AM +0200, Sylvain Joyeux wrote:
> >> Instead of making OCL a big thing again, would you consider releasing
> >> it as a separate package ?
> >
> > That would be the alternative and in the end Ok for me too. It just
> > means slightly more work :-) ..
> >
> >> IMO, this is way too big to be in an "integrated package" ...
> >
> > Hmm, its ~300k incl. docs?!
> >
>
> My prediction is that your efforts will be used _much more_ outside of
> Orocos than inside! So, making it a stand-alone project, with nice RTT
> integration is "the way to go", as far as I am concerned. After you have
> proven the value of it with some Orocos applications, other frameworks such
> as ROS will undoubtedly pick it up...

Agreed, yet the Lua plugin is specific to the RTT only. If the
majority prefers to make it a separate package I will do that...

Markus

Ruben Smits's picture

ANNOUNCE: Lua RTT plugin beta1 released

On Monday 11 October 2010 13:25:03 Markus Klotzbuecher wrote:
> On Mon, Oct 11, 2010 at 12:49:25PM +0200, Herman Bruyninckx wrote:
> > On Mon, 11 Oct 2010, Markus Klotzbuecher wrote:
> > > On Mon, Oct 11, 2010 at 11:23:54AM +0200, Sylvain Joyeux wrote:
> > >> Instead of making OCL a big thing again, would you consider
> > >> releasing
> > >>
> > >> it as a separate package ?
> > >
> > > That would be the alternative and in the end Ok for me too. It just
> > > means slightly more work :-) ..
> > >
> > >> IMO, this is way too big to be in an "integrated package" ...
> > >
> > > Hmm, its ~300k incl. docs?!
> >
> > My prediction is that your efforts will be used _much more_ outside of
> > Orocos than inside! So, making it a stand-alone project, with nice RTT
> > integration is "the way to go", as far as I am concerned. After you have
> > proven the value of it with some Orocos applications, other frameworks
> > such as ROS will undoubtedly pick it up...
>
> Agreed, yet the Lua plugin is specific to the RTT only. If the
> majority prefers to make it a separate package I will do that...

I would make the Lua plugin part of OCL, and keep the/your work wrt to Lua
FSM's etc outside, since it is not directly RTT related.

Ruben