[Rock-dev] Configuration file error

Felix Rehrmann felix.rehrmann at dfki.de
Wed Mar 14 17:15:49 CET 2012


Problem is that apply_conf_file sets override to true by default while 
apply.conf sets it to false.
So in the second example trying to overwrite a property already set by a 
configuration with another name results in an error.

If you do  Orocos.conf.apply(imumodel, ['default', 'mti_xsens'], true) 
it should work.

Felix


Am 14.03.2012 16:56, schrieb Javier Hidalgo Carrió:
> When writing configuration files, we could do the following according 
> with the rock documentation:
> In the list of configuration names, later values will override newer 
> ones. So, if hokuyo.yml contains
> ---  name:default
> port:/dev/ttyS1
> remission_values:false
> ---  name:with_remission
> remission_values:true
>
> and doing this
>
> task =Orocos::TaskContext.get'hokuyo'
> Orocos.apply_conf_file(task,'hokuyo.yml', ['default','with_remission'])
>
>
> Then the resulting configuration, above, will be
>
> port:/dev/ttyS1
> remission_values:true
>
>
> I have the following configuration values in my file:
> --- name:default
> #rad/s/sqrt(s)
> gyrorrw:
>   data:
>   - 2.65E-06
>   - 4.01E-06
>   - 5.19E-06
>
> #rad/sqrt(s)
> gyrorw:
>   data:
>   - 6.04E-05
>   - 6.94E-05
>   - 5.96E-05
>
> --- name:mti_xsens
> #rad/sqrt(s)
> gyrorw:
>   data:
>   - 0.0006898864
>   - 0.0007219069
>   - 0.0005708627
>
> doing this:
>
>  Orocos.conf.load_dir('configuration_file_path')
>  imumodel = p.task 'imumodel'
>  Orocos.conf.apply(imumodel, ['default', 'mti_xsens'])
>
>
> and I get the following error:
>
> /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)
>
>
> What am I  doing wrong?
>
> Many thanks,
>
> Javi.
>
>
> _______________________________________________
> Rock-dev mailing list
> Rock-dev at dfki.de
> http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev


-- 

  Felix Rehrmann
  Researcher

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

  Phone: +49 (0)421 178 45-4129
  Fax:   +49 (0)421 218-64150
  E-Mail: felix.rehrmann at dfki.de

  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
  -----------------------------------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.dfki.de/pipermail/rock-dev/attachments/20120314/50d09a9e/attachment-0001.htm 


More information about the Rock-dev mailing list