[Rock-dev] [Orocos-users] problem declaring plain vector in orogen [ ERROR ][TypeInfoName] Can not build Property of unknown_t.
Jakob Schwendner
jakob.schwendner at dfki.de
Mon Jan 3 09:05:04 CET 2011
On 01/02/2011 11:09 PM, Alexander Duda wrote:
> Am 02.01.2011 um 18:52 schrieb gprizzi at tin.it:
>
>> Can you suggest me the best way, if it is available to have a fixed size bidimensional array type
>> declared and used as a property of a task?
>
> I would not use the RTT::Marshalling for saving and loading task properties. If you are using
> a rb start script (see below) instead your code should work.
>
> require 'orocos'
> Orocos.initialize
>
> Orocos.run 'mattest1' do
> mat = Orocos::TaskContext.get 'mat1'
>
> #setting prop
> val = mat.myMat
> val.row1[0]= 123
> val.row1[1]= 123
> val.row1[2]= 123
> mat.myMat = val
>
> mat.start # you must remove the .start statement from the deployment !
>
> while true
> sleep 0.01
> end
> end
>
> Alex
It appears you want to set a homogeneous matrix as a parameter. Rock
mostly uses the Eigen2 library to represent matrices since it has a very
nice API. Have a look in the base types. You can use base::Matrix4d for
your purpose. If you want to control your module from ruby, there are
ruby wrappers for the Eigen types as well. This is in addition to Alex's
comment.
cheers,
Jakob
More information about the Rock-dev
mailing list