Problem with marshalling - updateProperties()

Hi,

I am having the following problem when creating a LuaComponent. I add two
properties of type integer (lua "int" - cpf "long") and I want to
immediately update their values with updateProperties("file.cpf").
However, I get:

0.091 [ ERROR ][PropertyLoader:configure] Could not compose unknown type
'float64[]'.
0.091 [ ERROR ][PropertyLoader:configure] Could not compose unknown type
'float64[]'.
0.091 [ ERROR ][PropertyLoader:configure] Could not compose unknown type
'float64[]'.

UpdateProperties returns false and the two integers properties are not
updated.

The cpf file contains also three arrays ( lua "array" - cpf "float64[]").
The corresponding properties are created only later on and updating of
these properties, also later on, poses no problem. The latter proves(?)
that there is nothing wrong with the syntax of the cpf file.

UpdateProperties is only supposed to change what it can change, so why do I
get this error?

I am using 2.5 taken from the git server about 2 weeks ago.

Thanks,

Bert

Problem with marshalling - updateProperties()

On Mon, Dec 17, 2012 at 4:18 PM, Bert Willaert
<bert [dot] willaert [..] ...> wrote:
> Hi,
>
> I am having the following problem when creating a LuaComponent. I add two
> properties of type integer (lua "int" - cpf "long") and I want to
> immediately update their values with updateProperties("file.cpf"). However,
> I get:
>
> 0.091 [ ERROR ][PropertyLoader:configure] Could not compose unknown type
> 'float64[]'.
> 0.091 [ ERROR ][PropertyLoader:configure] Could not compose unknown type
> 'float64[]'.
> 0.091 [ ERROR ][PropertyLoader:configure] Could not compose unknown type
> 'float64[]'.
>
> UpdateProperties returns false and the two integers properties are not
> updated.
>
> The cpf file contains also three arrays ( lua "array" - cpf "float64[]").
> The corresponding properties are created only later on and updating of these
> properties, also later on, poses no problem. The latter proves(?) that there
> is nothing wrong with the syntax of the cpf file.

The error is not saying that the arrays are missing, the error is
saying that RTT
doesn't know the float64[] type, at that point of your deployment. Change your
.cpf data type to "array" as well.

>
> UpdateProperties is only supposed to change what it can change, so why do I
> get this error?

It does bail out because before updating the properties, it first recreates the
C++ structs out of the XML file ('composition'). Only after that, the
update step
is done. Another implementation could have made a different choice, that's true.
Your fix is to make sure that the float64[] type from ROS is known at
that moment,
or to edit your .cpf file.

>
> I am using 2.5 taken from the git server about 2 weeks ago.

This could also be solved in 2.6 since there we resolved all these
type name issues
and installed proper name aliasing. So RTT will recognise that
float64[] == array == /std/vector<double>.

Peter