<font size=2 face="sans-serif">Problem solved.</font>
<br>
<br><font size=2 face="sans-serif">A coma AND a space are required to clearly
separate the different values of a vector in a config .yml file. i.e: </font>
<br>
<br><font size=2 face="sans-serif">in .orogen:</font>
<br><font size=2 face="sans-serif">property "property_name",
"std::vector<int>"</font>
<br>
<br><font size=2 face="sans-serif">in .yml:</font>
<br><font size=2 face="sans-serif">property_name: [1,2,3,4] </font><font size=2 color=red face="sans-serif"> ->
does not work</font>
<br><font size=2 face="sans-serif">property_name: [1, 2, 3, 4]</font><font size=2 color=#00a000 face="sans-serif">
-> this works</font>
<br>
<br><font size=2 face="sans-serif">Vector can be of any type (numeric,
string, boolean)</font>
<p><font size=2 color=#001fe2 face="Verdana">Martin Azkarate</font>
<p><font size=1 color=#8f8f8f face="Verdana"><b>ESA - European Space Agency</b><br>
Spanish Trainee, TEC-MMA - Automation and Robotics Section </font>
<p><font size=1 color=#8f8f8f face="Verdana"><b>ESTEC - European Space
research and TEchnology Centre</b><br>
Keplerlaan 1, PO Box 299 <br>
NL-2200 AG Noordwijk, The Netherlands <br>
Martin.Azkarate@esa.int | </font><a href=www.esa.int><font size=1 color=#8f8f8f face="Verdana">www.esa.int</font></a><font size=1 color=#8f8f8f face="Verdana">
<br>
Tel +31 71 565 3480 | Mob +31 650 625 564 </font>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">From:
</font><font size=1 face="sans-serif">Martin.Azkarate@esa.int</font>
<br><font size=1 color=#5f5f5f face="sans-serif">To:
</font><font size=1 face="sans-serif">rock-dev@dfki.de</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Date:
</font><font size=1 face="sans-serif">25/07/2013 16:40</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Subject:
</font><font size=1 face="sans-serif">Re: [Rock-dev]
configuration of dynamic properties</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Sent by:
</font><font size=1 face="sans-serif">rock-dev-bounces@dfki.de</font>
<br>
<hr noshade>
<br>
<br>
<br><font size=2 face="sans-serif">Hello,</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
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. </font><font size=3><br>
</font><font size=2 face="sans-serif"><br>
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]</font><font size=3>
is interpreted as </font><font size=2 face="sans-serif">"WHEEL_DRIVE_FL,WHEEL_DRIVE_FR,WHEEL_DRIVE_CL"</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
Any ideas why these is happening?</font><font size=3> </font>
<p><font size=2 color=#001fe2 face="Verdana">Martin Azkarate</font><font size=3>
</font>
<p><font size=1 color=#8f8f8f face="Verdana"><b>ESA - European Space Agency</b><br>
Spanish Trainee, TEC-MMA - Automation and Robotics Section </font>
<p><font size=1 color=#8f8f8f face="Verdana"><b>ESTEC - European Space
research and TEchnology Centre</b><br>
Keplerlaan 1, PO Box 299 <br>
NL-2200 AG Noordwijk, The Netherlands <br>
Martin.Azkarate@esa.int | </font><a href=www.esa.int><font size=1 color=#8f8f8f face="Verdana"><u>www.esa.int</u></font></a><font size=1 color=#8f8f8f face="Verdana">
<br>
Tel +31 71 565 3480 | Mob +31 650 625 564 </font><font size=3><br>
<br>
<br>
</font><font size=1 color=#5f5f5f face="sans-serif"><br>
From: </font><font size=1 face="sans-serif">Javier
Hidalgo Carrió <javier.hidalgo_carrio@dfki.de></font><font size=3>
</font><font size=1 color=#5f5f5f face="sans-serif"><br>
To: </font><font size=1 face="sans-serif">Martin.Azkarate@esa.int</font><font size=3>
</font><font size=1 color=#5f5f5f face="sans-serif"><br>
Cc: </font><font size=1 face="sans-serif">rock-dev@dfki.de</font><font size=3>
</font><font size=1 color=#5f5f5f face="sans-serif"><br>
Date: </font><font size=1 face="sans-serif">24/07/2013
09:51</font><font size=3> </font><font size=1 color=#5f5f5f face="sans-serif"><br>
Subject: </font><font size=1 face="sans-serif">Re:
[Rock-dev] configuration of dynamic properties</font><font size=3> </font><font size=1 color=#5f5f5f face="sans-serif"><br>
Sent by: </font><font size=1 face="sans-serif">rock-dev-bounces@dfki.de</font><font size=3>
<br>
</font>
<hr noshade><font size=3><br>
<br>
<br>
Hello Martin,<br>
<br>
Did you try to remove the quotes?<br>
I have this in the orogen:<br>
<br>
<br>
# A configuration property (here, a std::string). Its value can be retrieved<br>
# in the C++ code with # _config_value.get() and _config_value.set(new_value).<br>
property "config_value", "/std/string", "Hola"<br>
property "config_vector", "std::vector<std::string>"<br>
<br>
And then the yml file is:<br>
<br>
--- name:default<br>
# A configuration property (here, a std::string). Its value can be retrieved<br>
# in the C++ code with # _config_value.get() and _config_value.set(new_value).<br>
config_value: Hola<br>
# no documentation available for this property<br>
config_vector: [Hola, Adios, Buenas]<br>
<br>
It worked for me. Have a look to the attached screenshot.<br>
<br>
Regards,<br>
<br>
Javier.<br>
<br>
<br>
On 07/23/2013 06:51 PM, </font><a href=mailto:Martin.Azkarate@esa.int><font size=3 color=blue><u>Martin.Azkarate@esa.int</u></font></a><font size=3>
wrote: </font><font size=2 face="sans-serif"><br>
Dear all,</font><font size=3> </font><font size=2 face="sans-serif"><br>
<br>
I have a property in a component of the following defined structure:</font><font size=3>
</font><font size=2 face="sans-serif"><br>
<br>
struct CanParams</font><font size=3> </font><font size=2 face="sans-serif"><br>
{</font><font size=3> </font><font size=2 face="sans-serif"><br>
std::vector<int> CanId;</font><font size=3>
</font><font size=2 face="sans-serif"><br>
std::vector<std::string> Name;</font><font size=3>
</font><font size=2 face="sans-serif"><br>
std::vector<MotorType> Type;</font><font size=3>
</font><font size=2 face="sans-serif"><br>
}</font><font size=3> </font><font size=2 face="sans-serif"><br>
<br>
with</font><font size=3> </font><font size=2 face="sans-serif"><br>
<br>
enum MotorType</font><font size=3> </font><font size=2 face="sans-serif"><br>
{</font><font size=3> </font><font size=2 face="sans-serif"><br>
WHEEL_DRIVE,</font><font size=3> </font><font size=2 face="sans-serif"><br>
WHEEL_STEER,</font><font size=3> </font><font size=2 face="sans-serif"><br>
WHEEL_WALK,</font><font size=3> </font><font size=2 face="sans-serif"><br>
etc.</font><font size=3> </font><font size=2 face="sans-serif"><br>
}</font><font size=3> </font><font size=2 face="sans-serif"><br>
<br>
In the .yml configuration file I set the values for CanParams structure
as follows:</font><font size=3> </font><font size=2 face="sans-serif"><br>
<br>
--- name:default</font><font size=3> </font><font size=2 face="sans-serif"><br>
can_parameters:</font><font size=3> </font><font size=2 face="sans-serif"><br>
CanId: [1,10,11,12, etc. ]</font><font size=3> </font><font size=2 face="sans-serif"><br>
Name: ["WHEEL_DRIVE_FL","WHEEL_DRIVE_FR","WHEEL_DRIVE_CL",
etc. ]</font><font size=3> </font><font size=2 face="sans-serif"><br>
Type: [WHEEL_DRIVE,WHEEL_DRIVE,WHEEL_DRIVE, etc.
]</font><font size=3> </font><font size=2 face="sans-serif"><br>
num_nodes: 19</font><font size=3> </font><font size=2 face="sans-serif"><br>
etc.</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
<br>
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.</font><font size=3>
<br>
<br>
Regards, </font>
<p><font size=2 color=#001fe2 face="Verdana">Martin Azkarate</font><font size=3>
</font>
<p><font size=1 color=#8f8f8f face="Verdana"><b>ESA - European Space Agency</b><br>
Spanish Trainee, TEC-MMA - Automation and Robotics Section </font>
<p><font size=1 color=#8f8f8f face="Verdana"><b>ESTEC - European Space
research and TEchnology Centre</b><br>
Keplerlaan 1, PO Box 299 <br>
NL-2200 AG Noordwijk, The Netherlands </font><font size=3 color=blue><u><br>
</u></font><a href=mailto:Martin.Azkarate@esa.int><font size=1 color=blue face="Verdana"><u>Martin.Azkarate@esa.int</u></font></a><font size=1 color=#8f8f8f face="Verdana">
| </font><a href=www.esa.int><font size=1 color=#8f8f8f face="Verdana"><u>www.esa.int</u></font></a><font size=1 color=#8f8f8f face="Verdana">
<br>
Tel +31 71 565 3480 | Mob +31 650 625 564 </font>
<p><tt><font size=3>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.<br>
<br>
Please consider the environment before printing this email.</font></tt><font size=3><br>
<br>
<br>
</font><tt><font size=3><br>
_______________________________________________<br>
Rock-dev mailing list</font></tt><font size=3 color=blue><u><br>
</u></font><a href="mailto:Rock-dev@dfki.de"><tt><font size=3 color=blue><u>Rock-dev@dfki.de</u></font></tt></a><font size=3 color=blue><u><br>
</u></font><a href="http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev"><tt><font size=3 color=blue><u>http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev</u></font></tt></a><font size=3><br>
<br>
<br>
</font><tt><font size=3><br>
-- <br>
Javier Hidalgo Carrió<br>
ESA - NPI Programme<br>
Researcher<br>
<br>
DFKI Bremen<br>
Robotics Innovation Center<br>
Robert-Hooke-Straße 5<br>
28359 Bremen, Germany</font></tt><font size=3 color=blue><u><br>
</u></font><a href="http://robotik.dfki-bremen.de/"><tt><font size=3 color=blue><u>http://robotik.dfki-bremen.de</u></font></tt></a><tt><font size=3><br>
<br>
Phone:+49(0)421 17845 6661<br>
Fax: +49(0)421 17845 4150<br>
<br>
[attachment "Screenshot from 2013-07-24 09:45:21.png" deleted
by Martin Azkarate/estec/ESA] </font></tt><tt><font size=2>_______________________________________________<br>
Rock-dev mailing list<br>
Rock-dev@dfki.de</font></tt><font size=3 color=blue><u><br>
</u></font><a href="http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev"><tt><font size=2 color=blue><u>http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev</u></font></tt></a><font size=3><br>
</font>
<br><tt><font size=3>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.<br>
<br>
Please consider the environment before printing this email.<br>
</font></tt><tt><font size=2>_______________________________________________<br>
Rock-dev mailing list<br>
Rock-dev@dfki.de<br>
</font></tt><a href="http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev"><tt><font size=2>http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev</font></tt></a><tt><font size=2><br>
</font></tt>
<br><PRE>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.
</PRE>