[Rock-dev] Problem with connect to
"Raúl Domínguez"
raul.dominguez at dfki.de
Tue Apr 30 10:42:42 CEST 2013
I think that the problem is comming from the line
"headingSendButton.connect SIGNAL(:clicked), PORT(:heading),:getter =>
g,:callback => c".
The widget loads correctly and I get the data from the task running on the robot
(before too), but when I press the send button in the widget, the widget crashes
with the same error as before.
I corrected some parts of the script but I still get the same error. Here is the
current state of the script once changed the connect_to for on_data.
"""
require 'vizkit'
Orocos::CORBA.name_service.ip = "seekurjr"
Orocos.initialize
# load GUI created with the Qt Designer
widget = Vizkit.load "gui/heading.ui"
widget.show
# connect the widget with the task "simple_task"
widget.connect_to_task "seekur_odometry" do |task|
task.port("odometry_samples").on_data do |data|
widget.orientationView.update(data,"odometry_samples")
end
end
widget.connect_to_task "seekur_corridor_servoing" do |task|
# generate a new sample each time the button is clicked
# and show a message box if there is a connection error
g = lambda{widget.headingSpinBox.value}
c = lambda{|msg| Qt::MessageBox.warning(widget,"ComErr",msg) if msg != "OK"}
headingSendButton.connect SIGNAL(:clicked), PORT(:heading),:getter =>
g,:callback => c
# disable the GUI until the task is reachable
task.on_reachable {widget.setEnabled(true)}
task.on_unreachable {widget.setEnabled(false)}
end
#run qt main loop
Vizkit.exec
"""
Have a nice day,
Raúl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.dfki.de/pipermail/rock-dev/attachments/20130430/c7ad4db1/attachment.htm
More information about the Rock-dev
mailing list