[Rock-dev] configuration of dynamic properties

Martin.Azkarate at esa.int Martin.Azkarate at esa.int
Thu Jul 25 18:00:49 CEST 2013


Problem solved.

A coma AND a space are required to clearly separate the different values 
of a vector in a config .yml file. i.e: 

in .orogen:
property "property_name", "std::vector<int>"

in .yml:
property_name: [1,2,3,4]  -> does not work
property_name: [1, 2, 3, 4] -> this works

Vector can be of any type (numeric, string, boolean)
Martin Azkarate
ESA - European Space Agency
Spanish Trainee, TEC-MMA - Automation and Robotics Section 
ESTEC - European Space research and TEchnology Centre
Keplerlaan 1, PO Box 299 
NL-2200 AG Noordwijk, The Netherlands 
Martin.Azkarate at esa.int | www.esa.int 
Tel +31 71 565 3480 | Mob +31 650 625 564 



From:   Martin.Azkarate at esa.int
To:     rock-dev at dfki.de
Date:   25/07/2013 16:40
Subject:        Re: [Rock-dev] configuration of dynamic properties
Sent by:        rock-dev-bounces at dfki.de



Hello, 

Yes I tried removing the quotes and then it accepts the whole vector as a 
single item, I mean the vector is size 1. And the same happens with the 
other two fields of the can_parameters structure (CanId and Type), where I 
put a lists of integer numbers and it treats them like a single number. 
The only case it works is when I put only one parameter per field (as if I 
had one single motor). But at the moment I put more than one item in the 
vectors the data does not make sense anymore. 

The config vector for CanId [1,10,11] will be understood as a single value 
[11011], and the same with Type and Name. In the case of Name it even 
takes the coma. The config vector for Name: 
[WHEEL_DRIVE_FL,WHEEL_DRIVE_FR,WHEEL_DRIVE_CL] is interpreted as 
"WHEEL_DRIVE_FL,WHEEL_DRIVE_FR,WHEEL_DRIVE_CL" 

Any ideas why these is happening? 
Martin Azkarate 
ESA - European Space Agency
Spanish Trainee, TEC-MMA - Automation and Robotics Section 
ESTEC - European Space research and TEchnology Centre
Keplerlaan 1, PO Box 299 
NL-2200 AG Noordwijk, The Netherlands 
Martin.Azkarate at esa.int | www.esa.int 
Tel +31 71 565 3480 | Mob +31 650 625 564 



From:        Javier Hidalgo Carrió <javier.hidalgo_carrio at dfki.de> 
To:        Martin.Azkarate at esa.int 
Cc:        rock-dev at dfki.de 
Date:        24/07/2013 09:51 
Subject:        Re: [Rock-dev] configuration of dynamic properties 
Sent by:        rock-dev-bounces at dfki.de 



Hello Martin,

Did you try to remove the quotes?
I have this in the orogen:


# A configuration property (here, a std::string). Its value can be 
retrieved
   # in the C++ code with # _config_value.get() and 
_config_value.set(new_value).
   property "config_value", "/std/string", "Hola"
   property "config_vector", "std::vector<std::string>"

And then the yml file is:

--- name:default
# A configuration property (here, a std::string). Its value can be 
retrieved
# in the C++ code with # _config_value.get() and 
_config_value.set(new_value).
config_value: Hola
# no documentation available for this property
config_vector: [Hola, Adios, Buenas]

It worked for me. Have a look to the attached screenshot.

Regards,

Javier.


On 07/23/2013 06:51 PM, Martin.Azkarate at esa.int wrote: 
Dear all, 

I have a property in a component of the following defined structure: 

struct CanParams 
{ 
       std::vector<int> CanId; 
       std::vector<std::string> Name; 
       std::vector<MotorType> Type; 
} 

with 

enum MotorType 
{ 
       WHEEL_DRIVE, 
       WHEEL_STEER, 
       WHEEL_WALK, 
       etc. 
} 

In the .yml configuration file I set the values for CanParams structure as 
follows: 

--- name:default 
can_parameters: 
       CanId: [1,10,11,12, etc. ] 
       Name: ["WHEEL_DRIVE_FL","WHEEL_DRIVE_FR","WHEEL_DRIVE_CL", etc. ] 
       Type: [WHEEL_DRIVE,WHEEL_DRIVE,WHEEL_DRIVE, etc. ] 
num_nodes: 19 
etc. 


When applying this conf file it shows an error loading the .yml file, 
precisely when loading the Name field. I don't know if the nomenclature I 
am using is the right one, I have tried with single quotes, semicolon, etc 
but nome seems to work. Attached an screenshot of the error. 

Regards, 
Martin Azkarate 
ESA - European Space Agency
Spanish Trainee, TEC-MMA - Automation and Robotics Section 
ESTEC - European Space research and TEchnology Centre
Keplerlaan 1, PO Box 299 
NL-2200 AG Noordwijk, The Netherlands 
Martin.Azkarate at esa.int | www.esa.int 
Tel +31 71 565 3480 | Mob +31 650 625 564 
This message and any attachments are intended for the use of the addressee 
or addressees only. The unauthorised disclosure, use, dissemination or 
copying (either in whole or in part) of its content is not permitted. If 
you received this message in error, please notify the sender and delete it 
from your system. Emails can be altered and their integrity cannot be 
guaranteed by the sender.

Please consider the environment before printing this email.



_______________________________________________
Rock-dev mailing list
Rock-dev at dfki.de
http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev



-- 
Javier Hidalgo Carrió
ESA - NPI Programme
Researcher

DFKI Bremen
Robotics Innovation Center
Robert-Hooke-Straße 5
28359 Bremen, Germany
http://robotik.dfki-bremen.de

Phone:+49(0)421 17845 6661
Fax: +49(0)421 17845 4150

[attachment "Screenshot from 2013-07-24 09:45:21.png" deleted by Martin 
Azkarate/estec/ESA] _______________________________________________
Rock-dev mailing list
Rock-dev at dfki.de
http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev

This message and any attachments are intended for the use of the addressee 
or addressees only. The unauthorised disclosure, use, dissemination or 
copying (either in whole or in part) of its content is not permitted. If 
you received this message in error, please notify the sender and delete it 
from your system. Emails can be altered and their integrity cannot be 
guaranteed by the sender.

Please consider the environment before printing this email.
_______________________________________________
Rock-dev mailing list
Rock-dev at dfki.de
http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev


This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by the sender.

Please consider the environment before printing this email.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.dfki.de/pipermail/rock-dev/attachments/20130725/bc4282ee/attachment.htm 


More information about the Rock-dev mailing list