[Rock-dev] roby shell

Chris Müller ruunhb at googlemail.com
Mon Jan 9 14:49:00 CET 2012


Here are some additional information. Sorry for posting a huge block of 
text, but i guess its maybe important to post the lists, where the order 
can be significant for determining the task model without the remote name.

I wrote the output for @interface.task_models to stdout from the 
RemoteInterface and compared it with the list i get from the supervision 
side.

RemoteInterface (Shell):
Here #<dRoby:Model Orocos::RobyPlugin::EkfSlam::Task
Here #<dRoby:Model
Here #<dRoby:Model 
Orocos::RobyPlugin::Deployments::OrogenDefaultStateEstimator__Task
Here #<dRoby:Model Orocos::RobyPlugin::StateEstimator::Task
Here #<dRoby:Model Orocos::RobyPlugin::Deployments::Buoydetector
Here #<dRoby:Model Orocos::RobyPlugin::Deployments::PipelineFollower
Here #<dRoby:Model Orocos::RobyPlugin::Deployments::AvalonSimulation
Here #<dRoby:Model Orocos::RobyPlugin::Deployments::AvalonControlSimulation
Here #<dRoby:Model DataAcquisition
Here #<dRoby:Model SaucE::QualifWall
Here #<dRoby:Model SaucE::ASVFromWall
Here #<dRoby:Model SaucE::Wall
Here #<dRoby:Model SaucE::LookForBuoy

Supervision:
   #<Orocos::RobyPlugin::EkfSlam::Task services: >
   # Class:0x7f4a2c5303b8>
   Orocos::RobyPlugin::Deployments::OrogenDefaultStateEstimator__Task

Thats probably the class, which misses a remote name. But that also 
doesn't really help.
Therefore i looked where the task models are actually generated in the 
task.rb:

  def self.inherited(klass)
       puts "#{klass}"
       Task.all_models << klass
  end

And i get an error. Maybe this is a hint for that. It seems to relate to 
that issue on the first view.

....
SaucE::Mission
SaucE::PipelineAndGates
SaucE::BuoyAndWall
SaucE::CoolBuoyAndWall
SaucE::LookForBuoy
SaucE::Wall
SaucE::ASVFromWall
SaucE::QualifWall
DataAcquisition
Roby::Tasks::Simple
0.987 [ ERROR  ][TypekitRepository::Import] A protocol with id 2 was 
already added for type /std/vector</double>
#< services: >
#<Class:0x7f046b64f480>
#< services: >
#<Class:0x7f046b63b638>
#< services: >
#<Class:0x7f046b8f5e00>
#<Class:0x7f046b8f5248>
#< < Composition>
#< < Compositions::ControlLoop < Composition>
#< < Compositions::ControlLoop < Composition>
#< services: >
#<Class:0x7f046b76e410>
#<Class:0x7f046b76d678>
#< < Compositions::ControlLoop < Composition>
#< < Composition>
Roby::Tasks::Timeout

= undefined method `short_name' for nil:NilClass (NoMethodError)
|   
/home/chris/repos/avalon_next/tools/orocos.rb/lib/orocos/roby/compositions.rb:212:in 
`name',
|   
/home/chris/repos/avalon_next/tools/orocos.rb/lib/orocos/roby/compositions.rb:212:in 
`name',
|   
/home/chris/repos/avalon_next/tools/orocos.rb/lib/orocos/roby/compositions.rb:212:in 
`name',
|   /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in 
`to_proc',
|   
/home/chris/repos/avalon_next/tools/orocos.rb/lib/orocos/roby/base.rb:92:in 
`map',
|   
/home/chris/repos/avalon_next/tools/orocos.rb/lib/orocos/roby/base.rb:92:in 
`to_s',
|   /home/chris/repos/avalon_next/tools/roby/lib/roby/task.rb:917:in 
`inherited',
|   
/home/chris/repos/avalon_next/tools/orocos.rb/lib/orocos/roby/base.rb:103:in 
`initialize',
|   
/home/chris/repos/avalon_next/tools/orocos.rb/lib/orocos/roby/base.rb:103:in 
`new',
|   
/home/chris/repos/avalon_next/tools/orocos.rb/lib/orocos/roby/base.rb:103:in 
`new_submodel',
|   
/home/chris/repos/avalon_next/tools/orocos.rb/lib/orocos/roby/compositions.rb:268:in 
`new_submodel',
|   
/home/chris/repos/avalon_next/tools/orocos.rb/lib/orocos/roby/compositions.rb:824:in 
`add_specialization',
|   
/home/chris/repos/avalon_next/tools/orocos.rb/lib/orocos/roby/compositions.rb:800:in 
`create_specializations',
|   
/home/chris/repos/avalon_next/tools/orocos.rb/lib/orocos/roby/compositions.rb:768:in 
`each',
|   
/home/chris/repos/avalon_next/tools/orocos.rb/lib/orocos/roby/compositions.rb:768:in 
`create_specializations',
|   
/home/chris/repos/avalon_next/tools/orocos.rb/lib/orocos/roby/compositions.rb:749:in 
`specialize',
|   tasks/orogen/hbridge.rb:57,
|   
/home/chris/repos/avalon_next/install/share/orogen/avalonControl.orogen:12,
|   tasks/compositions/avalon.rb:1,
|   ./scripts/run:7


tasks/orogen/hbridge.rb:57
----------------------------------------------------------------------------------------------- 

Compositions::ControlLoop.specialize 'actuators' => Hbridge::Task do
     add Hbridge::Task, :as => 'actuators',
         :consider_in_pending => false,
         :failure => [:read_only.not_followed_by(:read_write), :stop]

     on :start do |ev|
         hbridge = child_from_role 'actuators'

         # When we start the control composition, disable error handling 
for the
         # hbridge for 10 seconds in order to wait for it to do its 
calibration
         # and/or simply the read_only to read_write switch
         timeout = Roby::Tasks::Timeout.new(:delay => 10)
         timeout.on(:start) { |ev| Robot.info "delaying read_only errors 
by #{timeout.delay} seconds" }
         timeout.on(:timed_out)  { |ev| Robot.info "timed out on 
read_only to read_write switch, resuming handling of hbridge errors" }
         hbridge.read_only_event.handle_with(timeout)
         timeout.start!

Hope it helps ...



On 09.01.2012 10:48, Sylvain Joyeux wrote:
> On 01/08/2012 12:48 AM, Chris Müller wrote:
>> it seems there is a klass, that have no remote_name (empty string). This
>> results in a nil for the mod.define_or_reuse method
>> and then it crashes. If you add the if clause, you can work around this
>> problem and you can use the shell again.
>>
>> I could commit this fix, but i guess the final question is rather where
>> this object/klass is coming from within the sources.
>> I also don't know if this error rises if we have all libs on MASTER.
>> (This is tested with NEXT completely).
> master and next are more or less in sync
>
> The real question is what class is generating an empty remote_name. 
> Could you try to track that down ?
>
> Sylvain



More information about the Rock-dev mailing list