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

gprizzi at tin.it gprizzi at tin.it
Sun Jan 2 18:52:13 CET 2011


 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.
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.dfki.de/mailman/cgi-bin/private/rock-dev/attachments/20110102/c1a67f1a/attachment.htm 


More information about the Rock-dev mailing list