[Rock-dev] [rock] #366: syskit: depends_on with role specification fails with Roby::Task
rock
noreply at opendfki.de
Wed Nov 6 18:12:12 CET 2013
#366: syskit: depends_on with role specification fails with Roby::Task
--------------------+-----------------------------------
Reporter: thro02 | Owner: rock-dev-mailing-list
Type: defect | Status: new
Priority: normal | Milestone:
Component: base | Keywords:
--------------------+-----------------------------------
Using the depends_on in an actionstate machine does not work, when wanting
to associate the child to the task.
Trying to use the child in the 'on :start' of the Ruby::Task fails with:
Spacebot::Tasks::MapGeneration:0x91bc390{}[] has no child with the role
'map_gen', actually, it has no child at all
/home/sbot/dev/spacebot/tools/roby/lib/roby/relations/dependency.rb:116:in
`child_from_role'
/home/sbot/dev/spacebot/tools/roby/lib/roby/relations/dependency.rb:484:in
`method_missing'
/home/sbot/dev/spacebot/tools/roby/lib/roby/task.rb:911:in
`method_missing'
./models/tasks/map_generation.rb:7:in `block in <class:MapGeneration>'
Definitions below:
action_state_machine 'navigate_to' do
navigation = task navigation_def :target_x => target_x, :target_y
=> target_y
traversability_map = task traversability_map_def
map_regen = task ::Spacebot::Tasks::MapGeneration.new
map_regen.depends_on(traversability_map, :role => 'map_gen')
end
class MapGeneration < Roby::Task
terminates
on :start do |event|
#tasks = Syskit.plan.find_task(GraphSlam::VelodyneSLAM)
if
map_gen_child.map_source_child.slam_child.orocos_task.generateMap
Robot.info "Spacebot::Tasks::MapGeneration: map
generation [succeeded]"
emit :success
else
Robot.warn "Spacebot::Tasks::MapGeneration: map
generation [failed]"
emit :failed
end
end
end
--
Ticket URL: <https://rock.opendfki.de/ticket/366>
rock <https://rock.opendfki.de>
rock: the robot construction kit
More information about the Rock-dev
mailing list