[Rock-dev] [urgent] Roby PlanRebuilder / DRb::DRbServerNotFound
Allan E. Conquest
allan.conquest at dfki.de
Thu Jul 12 17:18:50 CEST 2012
Hi guys,
one year ago on SAUC-E '11 we wrote a script to extract relevant
information (like timestamp, pose, task states) out of several log files
incl. the supervision events.0.log in order to store it in a CSV file.
This file was being provided to the competition judges to help them
understand what AVALON did in the mission run.
Now we would like to do this again but something in the framework
changed so that we cannot do it our old way and have currently no
suitable alternative at hand.
When we call
rebuilder.find_model(stream, model_name)
we get this error (see below for a code snippet):
/usr/lib/ruby/1.8/drb/drb.rb:1653:in `current_server':
DRb::DRbServerNotFound while serving added_transaction(#<dRoby:Plan
0x3055688 at single>, #<dRoby:Transaction 0x5acca60 at single>)
(DRb::DRbServerNotFound)
from
/home/allan/dev/avalon/next/tools/roby/lib/roby/distributed/base.rb:174:in
`from_object'
from
/home/allan/dev/avalon/next/tools/roby/lib/roby/distributed/base.rb:51:in `remote_id'
from
/home/allan/dev/avalon/next/tools/roby/lib/roby/basic_object.rb:90:in
`remote_siblings_defval'
from
/home/allan/dev/avalon/next/tools/utilrb/lib/utilrb/object/attribute.rb:61:in
`remote_siblings'
from
/home/allan/dev/avalon/next/tools/roby/lib/roby/distributed/proxy.rb:48:in
`update'
from
/home/allan/dev/avalon/next/tools/roby/lib/roby/distributed/proxy.rb:45:in
`each'
from
/home/allan/dev/avalon/next/tools/roby/lib/roby/distributed/proxy.rb:45:in
`update'
from
/home/allan/dev/avalon/next/tools/roby/lib/roby/distributed/proxy.rb:419:in
`update'
from
/home/allan/dev/avalon/next/tools/roby/lib/roby/distributed/peer.rb:305:in
`local_object'
from
/home/allan/dev/avalon/next/tools/roby/lib/roby/distributed/base.rb:331:in
`update'
from
/home/allan/dev/avalon/next/tools/roby/lib/roby/distributed/peer.rb:304:in
`local_object'
from
/home/allan/dev/avalon/next/tools/roby/lib/roby/log/plan_rebuilder.rb:209:in
`local_object'
from
/home/allan/dev/avalon/next/tools/roby/lib/roby/log/plan_rebuilder.rb:434:in
`local_object'
from
/home/allan/dev/avalon/next/tools/roby/lib/roby/log/plan_rebuilder.rb:515:in
`added_transaction'
from
/home/allan/dev/avalon/next/tools/roby/lib/roby/log/plan_rebuilder.rb:410:in
`send'
from
/home/allan/dev/avalon/next/tools/roby/lib/roby/log/plan_rebuilder.rb:410:in
`process'
from
/home/allan/dev/avalon/next/tools/roby/lib/roby/log/plan_rebuilder.rb:407:in
`catch'
from
/home/allan/dev/avalon/next/tools/roby/lib/roby/log/plan_rebuilder.rb:407:in
`process'
from
/home/allan/dev/avalon/next/tools/roby/lib/roby/log/file.rb:123:in
`each_slice'
from
/home/allan/dev/avalon/next/tools/roby/lib/roby/log/plan_rebuilder.rb:405:in
`each'
from
/home/allan/dev/avalon/next/tools/roby/lib/roby/log/plan_rebuilder.rb:405:in
`each_slice'
from
/home/allan/dev/avalon/next/tools/roby/lib/roby/log/plan_rebuilder.rb:405:in
`process'
from
/home/allan/dev/avalon/next/tools/roby/lib/roby/log/plan_rebuilder.rb:278:in
`analyze_stream'
from
/home/allan/dev/avalon/next/tools/roby/lib/roby/log/plan_rebuilder.rb:266:in
`find_model'
from ../../next/supervision/scripts/logs/log_converter.rb:132
from ../../next/supervision/scripts/logs/log_converter.rb:122:in `each'
from ../../next/supervision/scripts/logs/log_converter.rb:122
This is the relevant code:
require 'roby/standalone'
require 'roby/log/event_stream'
require 'roby/log/plan_rebuilder'
require 'pocolog'
desired_models = [
# 'Orocos::RobyPlugin::OffshorePipelineDetector::Task',
'Orocos::RobyPlugin::OrientationEstimator::Baseestimator'
# ...
]
orientation_logfile = Pocolog::Logfiles.open('orientation_estimator.0.log')
orientation_stream =
orientation_logfile.stream('orientation_estimator.attitude_b_g')
# Get tasks of all desired models
desired_models.each do |arg|
puts "*********** Working #{arg}"
stream = Roby::LogReplay::EventFileStream.open(input_logfile)
rebuilder = Roby::LogReplay::PlanRebuilder.new
model_name = arg
state = Hash.new
model = rebuilder.find_model(stream, /#{model_name}/i) ### <<<<< ERROR
all_tasks = ValueSet.new
rebuilder.analyze_stream(stream) do
tasks = rebuilder.plan.find_tasks(model).to_a
all_tasks.merge(tasks.to_value_set)
false
end
all_tasks.each do |p|
p.history.each do |ev|
all << ev
end
end
end
We are using the next flavor.
Any suggestion is highly appreciated!
Thank you in advance,
Allan
More information about the Rock-dev
mailing list