problem declaring plain vector in orogen [ ERROR ][TypeInfoName] Can not build Property of unknown_t.

Dear Sir,

I need using a matrix of double with fixed dimensions.
Declaring it I got an error saying that CORBA can not handle multidimensional array,
so I tried to declare a struct with 4 rows of monodimensional vector.

Here below is the code of mattest.orogen and mattype.h and the code I wrote to have the properties
marshalled on a file.

MATTYPE.H

using namespace std;

namespace mattest {

struct mattype

{

double row1[4];

double row2[4];

double row3[4];

double row4[4];

};

}

MATTEST.OROGEN

name 'mattest'
version '0.1'

import_types_from "mattype.h"

task_context "matTask" do
#output ports
output_port("outMat", "/mattest/mattype").
doc("row of matrix")
# properties
property("myMat","/mattest/mattype").
doc('data representing the used injuries model')
end

deployment "mattest1" do
m1 = task("mat1", "matTask").
start
end

STARTHOOK with marshalling

bool matTask::startHook()
{
bool result;
int i;

if (! matTaskBase::startHook())
return false;

mattype mat;
for(i=0; i < 4 ; i++)
{
mat.row1[i]=i;
mat.row2[i]=i;
mat.row3[i]=i;
mat.row4[i]=i;

}
_myMat.set(mat);
// writing configuration information to file

boost::shared_ptr<Marshalling> Marshalling = this->getProvider<RTT::Marshalling>("marshalling");

if (Marshalling)
{
// write on a file a template usefull to set property values
result = Marshalling->writeProperties("matTest.cpf");
}

if(result==true)
{
return true;
}
else
{
return false;
}

}

I compiled and linked without errors but when I run it i got the following runtime errors:

2.507 [ ERROR ][TypeInfoName] Can not build Property of unknown_t.
2.507 [ ERROR ][PropertyLoader::save] Decomposition failed because Part 'row1' is not known to type system.
2.507 [ ERROR ][TypeInfoName] Can not build Property of unknown_t.
2.507 [ ERROR ][PropertyLoader::save] Decomposition failed because Part 'row2' is not known to type system.
2.507 [ ERROR ][TypeInfoName] Can not build Property of unknown_t.
2.507 [ ERROR ][PropertyLoader::save] Decomposition failed because Part 'row3' is not known to type system.
2.507 [ ERROR ][TypeInfoName] Can not build Property of unknown_t.
2.507 [ ERROR ][PropertyLoader::save] Decomposition failed because Part 'row4' is not known to type system.
2.508 [ ERROR ][TypeInfoName] Can not build Property of unknown_t.
2.508 [ ERROR ][PropertyLoader::save] Decomposition failed because Part 'row1' is not known to type system.
2.508 [ ERROR ][TypeInfoName] Can not build Property of unknown_t.
2.508 [ ERROR ][PropertyLoader::save] Decomposition failed because Part 'row2' is not known to type system.
2.508 [ ERROR ][TypeInfoName] Can not build Property of unknown_t.
2.508 [ ERROR ][PropertyLoader::save] Decomposition failed because Part 'row3' is not known to type system.
2.509 [ ERROR ][TypeInfoName] Can not build Property of unknown_t.
2.509 [ ERROR ][PropertyLoader::save] Decomposition failed because Part 'row4' is not known to type system.
2.509 [ Warning][PropertyLoader::save] Don't know type /mattest/mattype of myMat and could not convert or decompose it. Dropping it.

I am wrong but I can't understand where.
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?

Thank you in advance for your kind support.

problem declaring plain vector in orogen [ ERROR ][TypeInfoName]

Rock. Please tell me if I am wrong.

Long explanation
-----------------
The problem came from a type export policy change I recently did on oroGen.

Registering a type in the RTT type system is pretty costly in terms of
compilation time. Since people that use Rock-only (i.e. the Ruby tools)
don't need to register all types, I changed the default in oroGen to
export only types that are used in task interfaces. typegen-generated
typekits would export all types (obviously).

However, for the XML marshalling to work, all types *also* need to be
registered in RTT.

So:
* the default is back to export all types in oroGen. Rock autoproj
configuration changes that to export only used types for rock users
* a new configuration option in Rock's autoproj configuration allows
to require OCL compatibility, in which case all types are exported.

So, if you answer 'yes' to OCL compatibility, it should work as expected.
--
Sylvain Joyeux (Dr.Ing.)
Space & Security Robotics

!!! Achtung, neue Telefonnummer!!!

Standort Bremen:
DFKI GmbH
Robotics Innovation Center
Robert-Hooke-Straße 5
28359 Bremen, Germany

Phone: +49 (0)421 178-454136
Fax: +49 (0)421 218-454150
E-Mail: robotik [..] ...

Weitere Informationen: http://www.dfki.de/robotik
-----------------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
(Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.: DE 148646973
Steuernummer: 19/673/0060/3
-----------------------------------------------------------------------
--
Orocos-Users mailing list
Orocos-Users [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users

problem declaring plain vector in orogen [ ERROR ][TypeInfoName]

Am 02.01.2011 um 18:52 schrieb gprizzi [..] ...:

> 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

problem declaring plain vector in orogen [ ERROR ][TypeInfoName]

On 01/02/2011 06:52 PM, gprizzi [..] ... wrote:
> I compiled and linked without errors but when I run it i got the
> following runtime errors:
>
> 2.507 [ ERROR ][TypeInfoName] Can not build Property of unknown_t.
> 2.507 [ ERROR ][PropertyLoader::save] Decomposition failed because Part
> 'row1' is not known to type system.
> 2.507 [ ERROR ][TypeInfoName] Can not build Property of unknown_t.
> 2.507 [ ERROR ][PropertyLoader::save] Decomposition failed because Part
> 'row2' is not known to type system.
> 2.507 [ ERROR ][TypeInfoName] Can not build Property of unknown_t.
> 2.507 [ ERROR ][PropertyLoader::save] Decomposition failed because Part
> 'row3' is not known to type system.
> 2.507 [ ERROR ][TypeInfoName] Can not build Property of unknown_t.
> 2.507 [ ERROR ][PropertyLoader::save] Decomposition failed because Part
> 'row4' is not known to type system.
> 2.508 [ ERROR ][TypeInfoName] Can not build Property of unknown_t.
> 2.508 [ ERROR ][PropertyLoader::save] Decomposition failed because Part
> 'row1' is not known to type system.
> 2.508 [ ERROR ][TypeInfoName] Can not build Property of unknown_t.
> 2.508 [ ERROR ][PropertyLoader::save] Decomposition failed because Part
> 'row2' is not known to type system.
> 2.508 [ ERROR ][TypeInfoName] Can not build Property of unknown_t.
> 2.508 [ ERROR ][PropertyLoader::save] Decomposition failed because Part
> 'row3' is not known to type system.
> 2.509 [ ERROR ][TypeInfoName] Can not build Property of unknown_t.
> 2.509 [ ERROR ][PropertyLoader::save] Decomposition failed because Part
> 'row4' is not known to type system.
> 2.509 [ Warning][PropertyLoader::save] Don't know type /mattest/mattype
> of myMat and could not convert or decompose it. Dropping it.
>
> I am wrong but I can't understand where.
> 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?

It seems that there is a problem with the property decomposition code
generated by oroGen. I'll have a look with the Orocos developers. This
part of the RTT is a very black magick-y thing.

If you still have it around, could you send me the tarball of that
component ?

Sylvain