<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Problem is that apply_conf_file sets override to true by default
    while apply.conf sets it to false.<br>
    So in the second example trying to overwrite a property already set
    by a configuration with another name results in an error.<br>
    <br>
    If you do&nbsp; Orocos.conf.apply(imumodel, ['default', 'mti_xsens'],
    true) it should work.<br>
    <br>
    Felix<br>
    <br>
    <br>
    Am 14.03.2012 16:56, schrieb Javier Hidalgo Carri&oacute;:
    <blockquote cite="mid:4F60BFC7.5030403@dfki.de" type="cite">
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      When writing configuration files, we could do the following
      according with the rock documentation:<br>
      In the list of configuration names, later values will override
      newer ones. So, if hokuyo.yml contains
      <div class="CodeRay">
        <div class="code">
          <pre><span style="color: rgb(255, 136, 255); background: none repeat scroll 0% 0% rgb(85, 0, 85);"><span style="color: rgb(255, 68, 255);">---</span></span> <span style="color: rgb(255, 0, 0); background-color: rgb(255, 170, 170);">name:default</span>
<span style="color: rgb(102, 0, 102);">port</span>: <span style="background-color: rgba(255, 0, 0, 0.05);"><span style="color: rgb(221, 34, 0);">/dev/ttyS1</span></span>
<span style="color: rgb(102, 0, 102);">remission_values</span>: <span style="background-color: rgba(255, 0, 0, 0.05);"><span style="color: rgb(221, 34, 0);">false</span></span>
<span style="color: rgb(255, 136, 255); background: none repeat scroll 0% 0% rgb(85, 0, 85);"><span style="color: rgb(255, 68, 255);">---</span></span> <span style="color: rgb(255, 0, 0); background-color: rgb(255, 170, 170);">name:with_remission</span>
<span style="color: rgb(102, 0, 102);">remission_values</span>: <span style="background-color: rgba(255, 0, 0, 0.05);"><span style="color: rgb(221, 34, 0);">true</span></span>

</pre>
          <p>and doing this</p>
          <pre>task = <span style="color: rgb(0, 51, 102); font-weight: bold;">Orocos</span>::<span style="color: rgb(0, 51, 102); font-weight: bold;">TaskContext</span>.get <span style="background-color: rgba(255, 0, 0, 0.05);"><span style="color: rgb(119, 17, 0);">'</span><span style="color: rgb(221, 34, 0);">hokuyo</span><span style="color: rgb(119, 17, 0);">'</span></span>
<span style="color: rgb(0, 51, 102); font-weight: bold;">Orocos</span>.apply_conf_file(task, <span style="background-color: rgba(255, 0, 0, 0.05);"><span style="color: rgb(119, 17, 0);">'</span><span style="color: rgb(221, 34, 0);">hokuyo.yml</span><span style="color: rgb(119, 17, 0);">'</span></span>, [<span style="background-color: rgba(255, 0, 0, 0.05);"><span style="color: rgb(119, 17, 0);">'</span><span style="color: rgb(221, 34, 0);">default</span><span style="color: rgb(119, 17, 0);">'</span></span>, <span style="background-color: rgba(255, 0, 0, 0.05);"><span style="color: rgb(119, 17, 0);">'</span><span style="color: rgb(221, 34, 0);">with_remission</span><span style="color: rgb(119, 17, 0);">'</span></span>])

</pre>
          <p>Then the resulting configuration, above, will be </p>
          <div class="CodeRay">
            <div class="code">
              <pre><span style="color: rgb(102, 0, 102);">port</span>: <span style="background-color: rgba(255, 0, 0, 0.05);"><span style="color: rgb(221, 34, 0);">/dev/ttyS1</span></span>
<span style="color: rgb(102, 0, 102);">remission_values</span>: <span style="background-color: rgba(255, 0, 0, 0.05);"><span style="color: rgb(221, 34, 0);">true</span></span>


</pre>
              <p>I have the following configuration values in my file:<br>
                --- name:default<br>
                #rad/s/sqrt(s)<br>
                gyrorrw: <br>
                &nbsp; data: <br>
                &nbsp; - 2.65E-06<br>
                &nbsp; - 4.01E-06<br>
                &nbsp; - 5.19E-06<br>
              </p>
              <p>#rad/sqrt(s)<br>
                gyrorw: <br>
                &nbsp; data: <br>
                &nbsp; - 6.04E-05<br>
                &nbsp; - 6.94E-05<br>
                &nbsp; - 5.96E-05<br>
              </p>
              <p>--- name:mti_xsens<br>
                #rad/sqrt(s)<br>
                gyrorw: <br>
                &nbsp; data: <br>
                &nbsp; - 0.0006898864<br>
                &nbsp; - 0.0007219069<br>
                &nbsp; - 0.0005708627<br>
              </p>
              <p>doing this:<br>
              </p>
              <p>&nbsp;Orocos.conf.load_dir('configuration_file_path')<br>
                &nbsp;imumodel = p.task 'imumodel'<br>
                &nbsp;Orocos.conf.apply(imumodel, ['default', 'mti_xsens'])<br>
              </p>
              <p><br>
                and I get the following error:<br>
              </p>
              <p>/home/likewise-open/DFKI/jhidalgocarrio/iMoby/iMoby-dev/tools/orocos.rb/lib/orocos/configurations.rb:189:in

                `merge_conf_array': cannot merge configuration: conflict
                in [0] between v1=6.04e-05 and v2=0.0006898864
                (ArgumentError)<br>
              </p>
              <p><br>
              </p>
            </div>
          </div>
        </div>
      </div>
      What am I&nbsp; doing wrong?<br>
      <br>
      Many thanks,<br>
      <br>
      Javi.<br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Rock-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Rock-dev@dfki.de">Rock-dev@dfki.de</a>
<a class="moz-txt-link-freetext" href="http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev">http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev</a>
</pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 

 Felix Rehrmann 
 Researcher
 
 DFKI Bremen
 Robotics Innovation Center 
 Robert-Hooke-Stra&szlig;e 5
 28359 Bremen, Germany
 
 Phone: +49 (0)421 178 45-4129
 Fax:   +49 (0)421 218-64150
 E-Mail: <a class="moz-txt-link-abbreviated" href="mailto:felix.rehrmann@dfki.de">felix.rehrmann@dfki.de</a>
 
 Weitere Informationen: <a class="moz-txt-link-freetext" href="http://www.dfki.de/robotik">http://www.dfki.de/robotik</a>
 -----------------------------------------------------------------------
 Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
 Firmensitz: Trippstadter Stra&szlig;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 
 -----------------------------------------------------------------------
</pre>
  </body>
</html>