[Rock-dev] How to explicit assign task ports to service ports?

Matthias Goldhoorn matthias.goldhoorn at dfki.de
Tue Sep 3 15:26:15 CEST 2013


i assume this is a mistake within the attribute_missing implementation 
of composition...

try to add (.to_s) to syskit/lib/syskit/composition.rb line 256

256                         port_name = $1.to_s

and re-run your application. There should also no need to call 
.to_orocos_port

Please attach if this does not solve your problem the whole backtrace..

Matthias




On 03.09.2013 14:57, Christian Rauch wrote:
> Hello,
>
> I assigned a service to a task:
> {{{
> provides Trigger::PredictorSrv,
>           'prediction' =>  'prediction_value',
>           :as =>  'predictor'
> }}}
>
> whose service port "prediction" is later on accessed by
> "gyro_prediction_child.as(PredictorSrv).prediction_port.to_orocos_port".
>
> Doing this results in this error:
> {{{
> |
> /home/seekurjr/virgo_next/tools/orocos.rb/lib/orocos/ports_searchable.rb:68:in
> `find_port': /wrappers/VectorX</double>  is provided by multiple ports
> prediction_value: dbg_prediction_valueN, prediction_value (ArgumentError)
> }}}
>
> I assume here, that the task port name "prediction_value" that I gave
> explicitly in the definition is used as a search term (two ports of the
> task match that substring and have same type) instead as the port I want.
>
> Is this the desired behaviour? Can I deactivate this behaviour and have
> syskit use that port, that I explicitly gave in my service assignment?
>
> Regards,
> Christian
>
>


-- 
  Dipl.-Inf. Matthias Goldhoorn
  Space and Underwater Robotic

  Universität Bremen
  FB 3 - Mathematik und Informatik
  AG Robotik
  Robert-Hooke-Straße 5
  28359 Bremen, Germany

  Tel.:     +49 421 178 45-4193
  Zentrale: +49 421 178 45-6550
  Fax:      +49 421 178 45-4150
  E-Mail:   matthias.goldhoorn at uni-bremen.de

  Weitere Informationen: http://www.informatik.uni-bremen.de/robotik



More information about the Rock-dev mailing list