[Rock-dev] Problem with connect to
Alexander Duda
Alexander.Duda at dfki.de
Tue Apr 30 11:31:19 CEST 2013
I pushed a fix to orocos.rb master. The problem is the different
behaviour of ruby1.8 and ruby1.9 in the case of code blocks.
In any case I strongly recommend using ruby1.9 for any gui and syskit
related work.
Alex
On 04/30/2013 10:42 AM, "Raúl Domínguez" wrote:
> 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
--
Dipl.-Ing. Alexander Duda
Unterwasserrobotik
DFKI Bremen
Robotics Innovation Center
Robert-Hooke-Straße 5
28359 Bremen, Germany
Phone: +49 (0)421 178-456620
Fax: +49 (0)421 178-454150
E-Mail: alexander.duda at dfki.de
Weitere Informationen: http://www.dfki.de/robotik
-----------------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
(Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.: DE 148646973
Steuernummer: 19/673/0060/3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.dfki.de/pipermail/rock-dev/attachments/20130430/8305e5ea/attachment.htm
More information about the Rock-dev
mailing list