Dear all,
I am a developer new to orocos and I wanted to use unsigned char data type
as a property of a component. Because it is a system type I added it as
RTT::types::Types()->addType( new
RTT::types::TemplateTypeInfo<__u8,true>("uchar"));
I was able to see the property values in Taskbrowser but I cant write it
to XML cpf file. Should I implement a decomposeTypeImpl() in a new
ucharTypeInfo class?
Thanks for the help!
Cramen
Property can not be written to xml
On Sat, Jan 21, 2012 at 1:37 AM, Cramen Aytonma <cramenay [..] ...> wrote:
> Dear all,
>
> I am a developer new to orocos and I wanted to use unsigned char data type
> as a property of a component. Because it is a system type I added it as
>
>
> RTT::types::Types()->addType( new RTT::types::TemplateTypeInfo<__u8,true>("uchar"));
>
>
> I was able to see the property values in Taskbrowser but I cant write it
> to XML cpf file. Should I implement a decomposeTypeImpl() in a new
> ucharTypeInfo class?
>
Ok, so you started the hard way right away :-) Some of us use the ros
packages for Orocos which contain the uchar type when you import the
rtt_rosnode package.
If you don't want to use ros, nor rock, then use the
'StdTypeInfo<__u8>("uchar")' instead of TemplateTypeInfo.
http://www.orocos.org/stable/documentation/rtt/v2.x/api/html/structRTT_1...
That will normally work out for serializing to/from XML.
Peter
Property can not be written to xml
On Mon, Jan 23, 2012 at 5:19 PM, Peter Soetens <peter [..] ...>wrote:
> On Sat, Jan 21, 2012 at 1:37 AM, Cramen Aytonma <cramenay [..] ...>wrote:
>
>> Dear all,
>>
>> I am a developer new to orocos and I wanted to use unsigned char data
>> type as a property of a component. Because it is a system type I added it as
>>
>>
>> RTT::types::Types()->addType( new RTT::types::TemplateTypeInfo<__u8,true>("uchar"));
>>
>>
>> I was able to see the property values in Taskbrowser but I cant write it
>> to XML cpf file. Should I implement a decomposeTypeImpl() in a new
>> ucharTypeInfo class?
>>
>
> Ok, so you started the hard way right away :-) Some of us use the ros
> packages for Orocos which contain the uchar type when you import the
> rtt_rosnode package.
>
> If you don't want to use ros, nor rock, then use the
> 'StdTypeInfo<__u8>("uchar")' instead of TemplateTypeInfo.
>
I use plain orocos so I took your suggestion and I replaced the above with
#include <rtt/typekit/StdTypeInfo.hp
...
...
RTT::types::Types()->addType( new
RTT::types::StdTypeInfo<__u8>("uchar"));
But still I cant get to write the xml file. Rather I get the following
warning log.
3.530 [ Warning][PropertyLoader::store] Don't know type uchar of
x_val and could not convert or decompose it. Dropping it.
>
>
> http://www.orocos.org/stable/documentation/rtt/v2.x/api/html/structRTT_1...
>
> That will normally work out for serializing to/from XML.
>
> Peter
>
> Cramen
Property can not be written to xml
On Tue, Jan 24, 2012 at 11:06 AM, Cramen Aytonma <cramenay [..] ...> wrote:
>
>
>
> On Mon, Jan 23, 2012 at 5:19 PM, Peter Soetens <peter [..] ...> wrote:
>>
>> On Sat, Jan 21, 2012 at 1:37 AM, Cramen Aytonma <cramenay [..] ...> wrote:
>>>
>>> Dear all,
>>>
>>> I am a developer new to orocos and I wanted to use unsigned char data type as a property of a component. Because it is a system type I added it as
>>>
>>>
>>> RTT::types::Types()->addType( new RTT::types::TemplateTypeInfo<__u8,true>("uchar"));
>>>
>>>
>>> I was able to see the property values in Taskbrowser but I cant write it to XML cpf file. Should I implement a decomposeTypeImpl() in a new ucharTypeInfo class?
>>
>>
>> Ok, so you started the hard way right away :-) Some of us use the ros packages for Orocos which contain the uchar type when you import the rtt_rosnode package.
>>
>> If you don't want to use ros, nor rock, then use the 'StdTypeInfo<__u8>("uchar")' instead of TemplateTypeInfo.
>
>
> I use plain orocos so I took your suggestion and I replaced the above with
>
> #include <rtt/typekit/StdTypeInfo.hp
>
> ...
>
> ...
>
> RTT::types::Types()->addType( new RTT::types::StdTypeInfo<__u8>("uchar"));
>
> But still I cant get to write the xml file. Rather I get the following warning log.
>
> 3.530 [ Warning][PropertyLoader::store] Don't know type uchar of x_val and could not convert or decompose it. Dropping it.
>>
>>
>> http://www.orocos.org/stable/documentation/rtt/v2.x/api/html/structRTT_1...
>>
>> That will normally work out for serializing to/from XML.
>>
>> Peter
>>
> Cramen
The property writing system did not support unsigned char or float
types, by accident. If have prepared a binary-compatible patch which
fixes this.
You can apply it by going into the rtt directory, type: patch -p1 <
0001-properties-fix-the-introspection-such-that-no-proper.patch
and then rebuild rtt. You don't need to rebuild your application.
I tested it with uchars and floats (reading/writing).
Peter
Property can not be written to xml
On Jan 25, 2012, at 10:38 PM, Peter Soetens wrote:
> On Tue, Jan 24, 2012 at 11:06 AM, Cramen Aytonma <cramenay [..] ...> wrote:
>>
>>
>>
>> On Mon, Jan 23, 2012 at 5:19 PM, Peter Soetens <peter [..] ...> wrote:
>>>
>>> On Sat, Jan 21, 2012 at 1:37 AM, Cramen Aytonma <cramenay [..] ...> wrote:
>>>>
>>>> Dear all,
>>>>
>>>> I am a developer new to orocos and I wanted to use unsigned char data type as a property of a component. Because it is a system type I added it as
>>>>
>>>>
>>>> RTT::types::Types()->addType( new RTT::types::TemplateTypeInfo<__u8,true>("uchar"));
>>>>
>>>>
>>>> I was able to see the property values in Taskbrowser but I cant write it to XML cpf file. Should I implement a decomposeTypeImpl() in a new ucharTypeInfo class?
>>>
>>>
>>> Ok, so you started the hard way right away :-) Some of us use the ros packages for Orocos which contain the uchar type when you import the rtt_rosnode package.
>>>
>>> If you don't want to use ros, nor rock, then use the 'StdTypeInfo<__u8>("uchar")' instead of TemplateTypeInfo.
>>
>>
>> I use plain orocos so I took your suggestion and I replaced the above with
>>
>> #include <rtt/typekit/StdTypeInfo.hp
>>
>> ...
>>
>> ...
>>
>> RTT::types::Types()->addType( new RTT::types::StdTypeInfo<__u8>("uchar"));
>>
>> But still I cant get to write the xml file. Rather I get the following warning log.
>>
>> 3.530 [ Warning][PropertyLoader::store] Don't know type uchar of x_val and could not convert or decompose it. Dropping it.
>>>
>>>
>>> http://www.orocos.org/stable/documentation/rtt/v2.x/api/html/structRTT_1...
>>>
>>> That will normally work out for serializing to/from XML.
>>>
>>> Peter
>>>
>> Cramen
>
> The property writing system did not support unsigned char or float
> types, by accident. If have prepared a binary-compatible patch which
> fixes this.
>
> You can apply it by going into the rtt directory, type: patch -p1 <
> 0001-properties-fix-the-introspection-such-that-no-proper.patch
> and then rebuild rtt. You don't need to rebuild your application.
>
> I tested it with uchars and floats (reading/writing).
>
> Peter
Hi Peter,
Can I use the patch in ros package of orocos because it doesn't work their either?
Tadele
Property can not be written to xml
On Tue, Apr 3, 2012 at 6:11 PM, Tadele Shiferaw Tadele
<t [dot] s [dot] tadele [..] ...> wrote:
>
> On Jan 25, 2012, at 10:38 PM, Peter Soetens wrote:
>
>> On Tue, Jan 24, 2012 at 11:06 AM, Cramen Aytonma <cramenay [..] ...> wrote:
>>>
>>>
>>>
>>> On Mon, Jan 23, 2012 at 5:19 PM, Peter Soetens <peter [..] ...> wrote:
>>>>
>>>> On Sat, Jan 21, 2012 at 1:37 AM, Cramen Aytonma <cramenay [..] ...> wrote:
>>>>>
>>>>> Dear all,
>>>>>
>>>>> I am a developer new to orocos and I wanted to use unsigned char data type as a property of a component. Because it is a system type I added it as
>>>>>
>>>>>
>>>>> RTT::types::Types()->addType( new RTT::types::TemplateTypeInfo<__u8,true>("uchar"));
>>>>>
>>>>>
>>>>> I was able to see the property values in Taskbrowser but I cant write it to XML cpf file. Should I implement a decomposeTypeImpl() in a new ucharTypeInfo class?
>>>>
>>>>
>>>> Ok, so you started the hard way right away :-) Some of us use the ros packages for Orocos which contain the uchar type when you import the rtt_rosnode package.
>>>>
>>>> If you don't want to use ros, nor rock, then use the 'StdTypeInfo<__u8>("uchar")' instead of TemplateTypeInfo.
>>>
>>>
>>> I use plain orocos so I took your suggestion and I replaced the above with
>>>
>>> #include <rtt/typekit/StdTypeInfo.hp
>>>
>>> ...
>>>
>>> ...
>>>
>>> RTT::types::Types()->addType( new RTT::types::StdTypeInfo<__u8>("uchar"));
>>>
>>> But still I cant get to write the xml file. Rather I get the following warning log.
>>>
>>> 3.530 [ Warning][PropertyLoader::store] Don't know type uchar of x_val and could not convert or decompose it. Dropping it.
>>>>
>>>>
>>>> http://www.orocos.org/stable/documentation/rtt/v2.x/api/html/structRTT_1...
>>>>
>>>> That will normally work out for serializing to/from XML.
>>>>
>>>> Peter
>>>>
>>> Cramen
>>
>> The property writing system did not support unsigned char or float
>> types, by accident. If have prepared a binary-compatible patch which
>> fixes this.
>>
>> You can apply it by going into the rtt directory, type: patch -p1 <
>> 0001-properties-fix-the-introspection-such-that-no-proper.patch
>> and then rebuild rtt. You don't need to rebuild your application.
>>
>> I tested it with uchars and floats (reading/writing).
>>
>> Peter
> Hi Peter,
>
> Can I use the patch in ros package of orocos because it doesn't work their either?
Yes. The patch will be present in the next ROS Debian release too, so
from then on, you no longer need this patch.
Peter
Property can not be written to xml
On Jan 25, 2012, at 16:38 , Peter Soetens wrote:
> On Tue, Jan 24, 2012 at 11:06 AM, Cramen Aytonma <cramenay [..] ...> wrote:
>>
>>
>>
>> On Mon, Jan 23, 2012 at 5:19 PM, Peter Soetens <peter [..] ...> wrote:
>>>
>>> On Sat, Jan 21, 2012 at 1:37 AM, Cramen Aytonma <cramenay [..] ...> wrote:
>>>>
>>>> Dear all,
>>>>
>>>> I am a developer new to orocos and I wanted to use unsigned char data type as a property of a component. Because it is a system type I added it as
>>>>
>>>>
>>>> RTT::types::Types()->addType( new RTT::types::TemplateTypeInfo<__u8,true>("uchar"));
>>>>
>>>>
>>>> I was able to see the property values in Taskbrowser but I cant write it to XML cpf file. Should I implement a decomposeTypeImpl() in a new ucharTypeInfo class?
>>>
>>>
>>> Ok, so you started the hard way right away :-) Some of us use the ros packages for Orocos which contain the uchar type when you import the rtt_rosnode package.
>>>
>>> If you don't want to use ros, nor rock, then use the 'StdTypeInfo<__u8>("uchar")' instead of TemplateTypeInfo.
>>
>>
>> I use plain orocos so I took your suggestion and I replaced the above with
>>
>> #include <rtt/typekit/StdTypeInfo.hp
>>
>> ...
>>
>> ...
>>
>> RTT::types::Types()->addType( new RTT::types::StdTypeInfo<__u8>("uchar"));
>>
>> But still I cant get to write the xml file. Rather I get the following warning log.
>>
>> 3.530 [ Warning][PropertyLoader::store] Don't know type uchar of x_val and could not convert or decompose it. Dropping it.
>>>
>>>
>>> http://www.orocos.org/stable/documentation/rtt/v2.x/api/html/structRTT_1...
>>>
>>> That will normally work out for serializing to/from XML.
>>>
>>> Peter
>>>
>> Cramen
>
> The property writing system did not support unsigned char or float
> types, by accident. If have prepared a binary-compatible patch which
> fixes this.
How did this problem manifest itself? This might be one of the major issues I submitted months ago, that affects Mac OS X from passing all the tests.
> You can apply it by going into the rtt directory, type: patch -p1 <
> 0001-properties-fix-the-introspection-such-that-no-proper.patch
> and then rebuild rtt. You don't need to rebuild your application.
>
> I tested it with uchars and floats (reading/writing).
I'll try it when I get a chance.
S
Property can not be written to xml
On Thu, Jan 26, 2012 at 1:21 PM, S Roderick <kiwi [dot] net [..] ...> wrote:
> On Jan 25, 2012, at 16:38 , Peter Soetens wrote:
>
>> On Tue, Jan 24, 2012 at 11:06 AM, Cramen Aytonma <cramenay [..] ...> wrote:
>>>
>>>
>>>
>>> On Mon, Jan 23, 2012 at 5:19 PM, Peter Soetens <peter [..] ...> wrote:
>>>>
>>>> On Sat, Jan 21, 2012 at 1:37 AM, Cramen Aytonma <cramenay [..] ...> wrote:
>>>>>
>>>>> Dear all,
>>>>>
>>>>> I am a developer new to orocos and I wanted to use unsigned char data type as a property of a component. Because it is a system type I added it as
>>>>>
>>>>>
>>>>> RTT::types::Types()->addType( new RTT::types::TemplateTypeInfo<__u8,true>("uchar"));
>>>>>
>>>>>
>>>>> I was able to see the property values in Taskbrowser but I cant write it to XML cpf file. Should I implement a decomposeTypeImpl() in a new ucharTypeInfo class?
>>>>
>>>>
>>>> Ok, so you started the hard way right away :-) Some of us use the ros packages for Orocos which contain the uchar type when you import the rtt_rosnode package.
>>>>
>>>> If you don't want to use ros, nor rock, then use the 'StdTypeInfo<__u8>("uchar")' instead of TemplateTypeInfo.
>>>
>>>
>>> I use plain orocos so I took your suggestion and I replaced the above with
>>>
>>> #include <rtt/typekit/StdTypeInfo.hp
>>>
>>> ...
>>>
>>> ...
>>>
>>> RTT::types::Types()->addType( new RTT::types::StdTypeInfo<__u8>("uchar"));
>>>
>>> But still I cant get to write the xml file. Rather I get the following warning log.
>>>
>>> 3.530 [ Warning][PropertyLoader::store] Don't know type uchar of x_val and could not convert or decompose it. Dropping it.
>>>>
>>>>
>>>> http://www.orocos.org/stable/documentation/rtt/v2.x/api/html/structRTT_1...
>>>>
>>>> That will normally work out for serializing to/from XML.
>>>>
>>>> Peter
>>>>
>>> Cramen
>>
>> The property writing system did not support unsigned char or float
>> types, by accident. If have prepared a binary-compatible patch which
>> fixes this.
>
> How did this problem manifest itself? This might be one of the major issues I submitted months ago, that affects Mac OS X from passing all the tests.
The property was left out of the file, and a warning was printed. This
fix was 2.x specific, although the bug exists in 1.x too.
The origin of the problem is that in the old days, we tried to write
the marshallers without using dynamic casts (or other tricks), which
led to a 'visitor' pattern. The visitor did not support float or
unsigned char, hence, the marshaller could not write them out. The
current xml marshaller is the only piece of code in RTT which still
uses this visitor pattern, and was as such the only class subject to
this limitation.
It can be easily rewritten such that the visitor pattern is no longer
used and a bunch of deprecated code could be removed from the
properties API.
Peter