[Rock-dev] [rock] #325: syskit: action library using defines from imported profile

rock noreply at opendfki.de
Mon Aug 26 12:19:54 CEST 2013


#325: syskit: action library using defines from imported profile
--------------------+-----------------------------------
 Reporter:  thro02  |      Owner:  rock-dev-mailing-list
     Type:  defect  |     Status:  new
 Priority:  normal  |  Milestone:
Component:  base    |   Keywords:
--------------------+-----------------------------------
 Reusing definition from a profile in the action interface leads to the
 error listed below:

 The current setup:
 module Spacebot
     module Profiles
         profile 'Simulation'

             ...
             define 'simulation', SpacebotSimulation::Task
         end
     end
 end

 class Main < Roby::Actions::Interface
     use_profile Spacebot::Profiles::Simulation

     describe("Start the simulated robot").
         returns(Spacebot::Tasks::Success)
     def start_robot(*arguments)
         task = Spacebot::Tasks::Success.new(*arguments)
         task.depends_on(simulation_def, :role => 'sim')
         task
     end
 end

 Leads to the following error:
 [1] start_robot! started to plan
 = planning start_robot failed with
 | [Roby::CodeError: user code raised an exception
 Roby::Actions::Task:0x65288b0
 |    owners: Roby::Distributed
 |    arguments: :action_interface_model => Main,
 |    :action_model => Action start_robot defined on Main
 |      Returns Spacebot::Tasks::Success
 |      No arguments.,
 |    :action_arguments => {}
 |
 /stuff/spacebot/tools/syskit/lib/syskit/actions/interface_model_extension.rb:53:in
 `block (2 levels) in use_profile': wrong number of arguments (0 for 1)
 (ArgumentError)
 |
 /stuff/spacebot/tools/syskit/lib/syskit/actions/interface_model_extension.rb:53:in
 `block (2 levels) in use_profile'
 |    ./models/actions/spacebot_simulation/main.rb:14:in `start_robot']

 = fatal exception 1: failed to plan Spacebot::Tasks::Success:0x652bad8
 |   owners: Roby::Distributed
 |   arguments:
 | Roby::Actions::Task:0x65288b0
 |   owners: Roby::Distributed
 |   arguments: :action_interface_model => Main,
 |   :action_model => Action start_robot defined on Main
 |     Returns Spacebot::Tasks::Success
 |     No arguments.,
 |   :action_arguments => {}
 |  failed with Roby::CodeError: user code raised an exception
 Roby::Actions::Task:0x65288b0
 |   owners: Roby::Distributed
 |   arguments: :action_interface_model => Main,
 |   :action_model => Action start_robot defined on Main
 |     Returns Spacebot::Tasks::Success
 |     No arguments.,
 |   :action_arguments => {}
 |
 /stuff/spacebot/tools/syskit/lib/syskit/actions/interface_model_extension.rb:53:in
 `block (2 levels) in use_profile': wrong number of arguments (0 for 1)
 (ArgumentError)
 |
 /stuff/spacebot/tools/syskit/lib/syskit/actions/interface_model_extension.rb:53:in
 `block (2 levels) in use_profile'
 |   ./models/actions/spacebot_simulation/main.rb:14:in `start_robot'
 | The following tasks have been killed:
 | Spacebot::Tasks::Success:0x652bad8

-- 
Ticket URL: <http://rock.opendfki.de/ticket/325>
rock <http://rock.opendfki.de>
rock: the robot construction kit


More information about the Rock-dev mailing list