rttlua and rtt types

Hi,

I have defined a TypeInfo for my custom type, and added it, and a
constructor, to my typekit.

Although I can create an object of this type in rttlua using rtt.Variable,
I have not found how to use my contructor to initialize the value of my
type.

Is it possible to call RTT type constructors from Lua?

Charles.

rttlua and rtt types

Hi Charles,

On Tue, Apr 03, 2012 at 05:56:55PM +0200, Charles Lesire-Cabaniols wrote:

> I have defined a TypeInfo for my custom type, and added it, and a constructor,
> to my typekit.
>
> Although I can create an object of this type in rttlua using rtt.Variable, I
> have not found how to use my contructor to initialize the value of my type.
>
> Is it possible to call RTT type constructors from Lua?

No, currently not.

I suppose it wouldn't be too hard to add though, patches welcome :-)

Markus

rttlua and rtt types

2012/4/4 Markus Klotzbuecher <markus [dot] klotzbuecher [..] ...>

> Hi Charles,
>
> On Tue, Apr 03, 2012 at 05:56:55PM +0200, Charles Lesire-Cabaniols wrote:
>
> > I have defined a TypeInfo for my custom type, and added it, and a
> constructor,
> > to my typekit.
> >
> > Although I can create an object of this type in rttlua using
> rtt.Variable, I
> > have not found how to use my contructor to initialize the value of my
> type.
> >
> > Is it possible to call RTT type constructors from Lua?
>
> No, currently not.
>
> I suppose it wouldn't be too hard to add though, patches welcome :-)
>

I am not against contributing, but I am very new to Lua, so I don't think I
will be very efficient in modifying rttlua...

Charles.

>
> Markus
>

rttlua and rtt types

On Wed, Apr 04, 2012 at 10:48:29AM +0200, Charles Lesire-Cabaniols wrote:
>
>
> 2012/4/4 Markus Klotzbuecher <markus [dot] klotzbuecher [..] ...>
>
> Hi Charles,
>
> On Tue, Apr 03, 2012 at 05:56:55PM +0200, Charles Lesire-Cabaniols wrote:
>
> > I have defined a TypeInfo for my custom type, and added it, and a
> constructor,
> > to my typekit.
> >
> > Although I can create an object of this type in rttlua using
> rtt.Variable, I
> > have not found how to use my contructor to initialize the value of my
> type.
> >
> > Is it possible to call RTT type constructors from Lua?
>
> No, currently not.
>
> I suppose it wouldn't be too hard to add though, patches welcome :-)
>
>
> I am not against contributing, but I am very new to Lua, so I don't think I
> will be very efficient in modifying rttlua...

I can't promise it soon. I also have been hesitating to add this
previously, because I tend to think that from a Component Model view
types are data and should not drag in (object oriented) behavior.

Can you initialize this type from the outside (ie. using fromtab), or
is this a showstopper for you (and why?)

Markus

rttlua and rtt types

2012/4/4 Markus Klotzbuecher <markus [dot] klotzbuecher [..] ...>

> On Wed, Apr 04, 2012 at 10:48:29AM +0200, Charles Lesire-Cabaniols wrote:
> >
> >
> > 2012/4/4 Markus Klotzbuecher <markus [dot] klotzbuecher [..] ...>
> >
> > Hi Charles,
> >
> > On Tue, Apr 03, 2012 at 05:56:55PM +0200, Charles Lesire-Cabaniols
> wrote:
> >
> > > I have defined a TypeInfo for my custom type, and added it, and a
> > constructor,
> > > to my typekit.
> > >
> > > Although I can create an object of this type in rttlua using
> > rtt.Variable, I
> > > have not found how to use my contructor to initialize the value of
> my
> > type.
> > >
> > > Is it possible to call RTT type constructors from Lua?
> >
> > No, currently not.
> >
> > I suppose it wouldn't be too hard to add though, patches welcome :-)
> >
> >
> > I am not against contributing, but I am very new to Lua, so I don't
> think I
> > will be very efficient in modifying rttlua...
>
> I can't promise it soon. I also have been hesitating to add this
> previously, because I tend to think that from a Component Model view
> types are data and should not drag in (object oriented) behavior.
>
> Can you initialize this type from the outside (ie. using fromtab), or
> is this a showstopper for you (and why?)
>

No, I can't use fromtab. My type is a quite complex class that inherits
3rd-part libs (for instance, I am using a ublas vector).
I have defined a constructor (added in the TypeInfoRepository) that takes a
file name, and then parses it to reconstruct my type.

The workaround I am investigating is adding this constructor to a Service,
and load this service in my Lua component.
But it ask me (my students actually, that take more time to develop Orocos
stuff than me ;)) to create a service, fill it with all my type
constructors, compile it, etc.

>
> Markus
>

rttlua and rtt types

On Wed, Apr 04, 2012 at 01:07:20PM +0200, Charles Lesire-Cabaniols wrote:
>
>
> 2012/4/4 Markus Klotzbuecher <markus [dot] klotzbuecher [..] ...>
>
> On Wed, Apr 04, 2012 at 10:48:29AM +0200, Charles Lesire-Cabaniols wrote:
> >
> >
> > 2012/4/4 Markus Klotzbuecher <markus [dot] klotzbuecher [..] ...>
> >
> > Hi Charles,
> >
> > On Tue, Apr 03, 2012 at 05:56:55PM +0200, Charles Lesire-Cabaniols
> wrote:
> >
> > > I have defined a TypeInfo for my custom type, and added it, and a
> > constructor,
> > > to my typekit.
> > >
> > > Although I can create an object of this type in rttlua using
> > rtt.Variable, I
> > > have not found how to use my contructor to initialize the value of
> my
> > type.
> > >
> > > Is it possible to call RTT type constructors from Lua?
> >
> > No, currently not.
> >
> > I suppose it wouldn't be too hard to add though, patches welcome :-)
> >
> >
> > I am not against contributing, but I am very new to Lua, so I don't think
> I
> > will be very efficient in modifying rttlua...
>
> I can't promise it soon. I also have been hesitating to add this
> previously, because I tend to think that from a Component Model view
> types are data and should not drag in (object oriented) behavior.
>
> Can you initialize this type from the outside (ie. using fromtab), or
> is this a showstopper for you (and why?)
>
>
> No, I can't use fromtab. My type is a quite complex class that inherits
> 3rd-part libs (for instance, I am using a ublas vector).
> I have defined a constructor (added in the TypeInfoRepository) that takes a
> file name, and then parses it to reconstruct my type.
>
> The workaround I am investigating is adding this constructor to a Service, and
> load this service in my Lua component.
> But it ask me (my students actually, that take more time to develop Orocos
> stuff than me ;)) to create a service, fill it with all my type constructors,
> compile it, etc.

Ok, I suppose that should work, but I'll promise to take a look at it
soon.

Markus

rttlua and rtt types

On 04/04/2012 11:55 AM, Markus Klotzbuecher wrote:
>> I am not against contributing, but I am very new to Lua, so I don't think I
>> will be very efficient in modifying rttlua...
>
> I can't promise it soon. I also have been hesitating to add this
> previously, because I tend to think that from a Component Model view
> types are data and should not drag in (object oriented) behavior.
Aaaaahh. One more very long discussion topic ?

Types are data, and data needs to be accessed, modified and analyzed.
rttlua is meant to allow the implementation of components which *are*
accessing, modifying and analyzing data ...

Sylvain

rttlua and rtt types

On Apr 4, 2012, at 06:19 , Sylvain Joyeux wrote:

> On 04/04/2012 11:55 AM, Markus Klotzbuecher wrote:
>>> I am not against contributing, but I am very new to Lua, so I don't think I
>>> will be very efficient in modifying rttlua...
>>
>> I can't promise it soon. I also have been hesitating to add this
>> previously, because I tend to think that from a Component Model view
>> types are data and should not drag in (object oriented) behavior.
> Aaaaahh. One more very long discussion topic ?
>
> Types are data, and data needs to be accessed, modified and analyzed.
> rttlua is meant to allow the implementation of components which *are*
> accessing, modifying and analyzing data ...

+1. It's all about the data … more work for Markus! ;-)
S

rttlua and rtt types

On Wed, Apr 04, 2012 at 12:19:33PM +0200, Sylvain Joyeux wrote:
> On 04/04/2012 11:55 AM, Markus Klotzbuecher wrote:
> >>I am not against contributing, but I am very new to Lua, so I don't think I
> >>will be very efficient in modifying rttlua...
> >
> >I can't promise it soon. I also have been hesitating to add this
> >previously, because I tend to think that from a Component Model view
> >types are data and should not drag in (object oriented) behavior.
> Aaaaahh. One more very long discussion topic ?

:-)

> Types are data, and data needs to be accessed, modified and
> analyzed. rttlua is meant to allow the implementation of components
> which *are* accessing, modifying and analyzing data ...

Good point :-) The other (real) reason is of course that this didn't
work out of the box and I didn't need it so far...

Markus