can't set the size of JntArray from lua

Hi Markus,
while executing the following piece of code:
*****************************************************
depl:loadComponent("jointtrajec","motion_control::polyTrajGenerator")
depl:setActivity("jointtrajec",0.02, 1, rtt.globals.ORO_SCHED_OTHER)
jointtrajec=depl:getPeer("jointtrajec")
depl:loadService("jointtrajec","marshalling")

final_pose_values={1.57, 1.256, 0.0, 0.0, 0.0}
number_of_axes=jointtrajec:getProperty("number_of_axes")

number_of_axes:set(number_of_joints)
interpolation_degree=jointtrajec:getProperty("polynomial_degree")
interpolation_degree:set(4)
final_des_pose=jointtrajec:getProperty("joint_final_pose_des")
final_des_pose:get():resize(number_of_joints)
final_des_pose:fromtab(final_pose_values)                                                   --line 85
************************************************************
I get the following error:

**********************************************************
ros-electric/orocos_toolchain/ocl/bin/rttlua-gnulinux: ...electric/orocos_toolchain/ocl/lua/modules/rttlib.lua:207: Variable.getMember: indexing failed, no member size
stack traceback:
        [C]: ?
        ...electric/orocos_toolchain/ocl/lua/modules/rttlib.lua:207: in function <...electric/orocos_toolchain/ocl/lua/modules/rttlib.lua:201>
        (tail call): ?
        ...ardware/youbot_kindyn/test/test_rnever_impedance.lua:85: in main chunk
        [C]: ?
TLSF bytes allocated=524288 overhead=3248 max-used=3248 currently-used=3248 still-allocated=0
***************************************************************************************
property is of JntArray type. The error appears on Debian 7.2. Should the type have explicit size() method?
The type is visible to lua deployer. The same code works on ubuntu 12.04, though. Both systems use rtt-2.6 

Thanks in advance.
Sincerely
Azamat

can't set the size of JntArray from lua

On Mi, Dez 18, 2013 at 04:11:20 -0800, Azamat Shakhimardanov wrote:
>Hi Markus,
>while executing the following piece of code:
>*****************************************************
>depl:loadComponent("jointtrajec","motion_control::polyTrajGenerator")
>depl:setActivity("jointtrajec",0.02, 1, rtt.globals.ORO_SCHED_OTHER)
>jointtrajec=depl:getPeer("jointtrajec")
>depl:loadService("jointtrajec","marshalling")
>final_pose_values={1.57, 1.256, 0.0, 0.0, 0.0}
>number_of_axes=jointtrajec:getProperty("number_of_axes")
>number_of_axes:set(number_of_joints)
>interpolation_degree=jointtrajec:getProperty("polynomial_degree")
>interpolation_degree:set(4)
>final_des_pose=jointtrajec:getProperty("joint_final_pose_des")
>final_des_pose:get():resize(number_of_joints)
>final_des_pose:fromtab(final_pose_values)
> --line 85
>************************************************************
>I get the following error:
>**********************************************************
>ros-electric/orocos_toolchain/ocl/bin/rttlua-gnulinux:
>...electric/orocos_toolchain/ocl/lua/modules/rttlib.lua:207: Variable.getMember:
>indexing failed, no member size
>stack traceback:
> [C]: ?
> ...electric/orocos_toolchain/ocl/lua/modules/rttlib.lua:207: in function
><...electric/orocos_toolchain/ocl/lua/modules/rttlib.lua:201>
> (tail call): ?
> ...ardware/youbot_kindyn/test/test_rnever_impedance.lua:85: in main
>chunk
> [C]: ?
>TLSF bytes allocated=524288 overhead=3248 max-used=3248 currently-used=3248
>still-allocated=0
>***************************************************************************************
>property is of JntArray type. The error appears on Debian 7.2. Should the type
>have explicit size() method?

If you want to use fromtab, yes. It needs to figure out if it needs to
resize the array (if it is an array at all), and for that it checks for
a size field.

>The type is visible to lua deployer. The same code works on ubuntu 12.04,
>though. Both systems use rtt-2.6

Are you saying it is a regression?

Markus

can't set the size of JntArray from lua

[...]

>>property is of JntArray type. The error appears on Debian 7.2. Should the type
>>have explicit size() method?

>If you want to use fromtab, yes. It needs to figure out if it needs to
>resize the
array (if it is an array at all), and for that it checks for
>a size field.

>>The type is visible to lua deployer. The same code works on ubuntu 12.04,
>>though. Both systems use rtt-2.6

>Are you saying it is a regression?
no, not really. It is just strange that it is almost exactly the same setup (except for OS) and it only complains when running on debian. The ubuntu machine is interfacing robot, so the script was tested there first. Both machines use JntArray type which does not have public size() method or attribute.

Markus

can't set the size of JntArray from lua

On Mi, Dez 18, 2013 at 06:06:41 -0800, Azamat Shakhimardanov wrote:
>[...]
>>>property is of JntArray type. The error appears on Debian 7.2. Should the type
>>>have explicit size() method?
>
>>If you want to use fromtab, yes. It needs to figure out if it needs to
>>resize the array (if it is an array at all), and for that it checks for
>>a size field.
>
>>>The type is visible to lua deployer. The same code works on ubuntu 12.04,
>>>though. Both systems use rtt-2.6
>
>>Are you saying it is a regression?
>no, not really. It is just strange that it is almost exactly the same setup
>(except for OS) and it only complains when running on debian. The ubuntu machine
>is interfacing robot, so the script was tested there first. Both machines use
>JntArray type which does not have public size() method or attribute.

Strange, can you give 2.7 a shot and see if it disappears?

Markus