[Rock-dev] runtime states in inherited task structures
Chris Mueller
christoph.mueller at dfki.de
Wed Mar 14 22:49:02 CET 2012
Hi,
we have found today a problem with catching events from the roby side
over an inherited task structure. Here is a simplified example:
task_context "Parent" do
runtime_states :HELLO
end
task_context "Child" do
subclasses "Parent"
property("bla", "double", 0.0)
end
If you create a composition in your supervision setup:
composition Whatever
event :hello
add_main Bla::Child, :role => 'role'
end
and start it via supervision e.g. with add_mission, it's no problem to
catch all events from the Child Task via roby-display.
But using the composition e.g. in a planning method results to:
method :whatever do
Cmp::Whatever.script do
poll do
puts role_child.hello? # returns always false
puts role_child.history # returns always a list with only
the start event.
end
end
end
----
We could solve this problem by moving the runtime_state definition from
the Parent to the Child Task in the orogen file.
I'm not sure if inheritance for runtime_states is currently known as
unsupported (or even deprecated). If so, a small notice on rock-robotics
would
be nice.
Otherwise this is a bug report. (By the way, can we write bug reports
directly on rock-robotics? Or is any autorization / registration necessary?)
Chris
More information about the Rock-dev
mailing list