[Rock-dev] Problem with connect to

"Raúl Domínguez" raul.dominguez at dfki.de
Mon Apr 29 17:13:50 CEST 2013


Hello,

I am working with the master branch just updated.

Running this script:

"""
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 "seekurjr/seekur_odometry" do |task|


    task.port("odometry_samples").connect_to do |data,port_name|
        widget.orientationView.update(data,port_name)
    end

end

widget.connect_to_task "seekurjr/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
"""

Gives the following error when clicking the headingSendButton:


"""
/home/virgo/virgo_rock/tools/orocos.rb/lib/orocos/async/ports.rb:374:in
`connect_to': wrong number of arguments (0 for 2) (ArgumentError)
        from
/home/virgo/virgo_rock/tools/orocos.rb/lib/orocos/async/ports.rb:374:in `call'
        from
/home/virgo/virgo_rock/tools/orocos.rb/lib/orocos/async/ports.rb:374:in `write'
        from /home/virgo/virgo_rock/tools/utilrb/lib/utilrb/event_loop.rb:313:in
`call'
        from /home/virgo/virgo_rock/tools/utilrb/lib/utilrb/event_loop.rb:313:in
`defer'
        from /home/virgo/virgo_rock/tools/utilrb/lib/utilrb/event_loop.rb:161:in
`call'
        from /home/virgo/virgo_rock/tools/utilrb/lib/utilrb/event_loop.rb:161:in
`call'
        from /home/virgo/virgo_rock/tools/utilrb/lib/utilrb/event_loop.rb:612:in
`step'
        from /home/virgo/virgo_rock/tools/utilrb/lib/utilrb/event_loop.rb:700:in
`call'
        from /home/virgo/virgo_rock/tools/utilrb/lib/utilrb/event_loop.rb:700:in
`handle_errors'
        from /home/virgo/virgo_rock/tools/utilrb/lib/utilrb/event_loop.rb:612:in
`step'
        from /home/virgo/virgo_rock/gui/vizkit/ruby/lib/vizkit/vizkit.rb:125:in
`exec'
        from /usr/lib/ruby/1.8/Qt/qtruby4.rb:2427:in `call'
        from /usr/lib/ruby/1.8/Qt/qtruby4.rb:2427:in `invoke'
        from /usr/lib/ruby/1.8/Qt/qtruby4.rb:469:in `qt_metacall'
        from /usr/lib/ruby/1.8/Qt/qtruby4.rb:469:in `method_missing'
        from /usr/lib/ruby/1.8/Qt/qtruby4.rb:469:in `exec'
        from /home/virgo/virgo_rock/gui/vizkit/ruby/lib/vizkit/vizkit.rb:129:in
`exec'
        from heading_viz.rb:36
        from /home/virgo/virgo_rock/tools/utilrb/lib/utilrb/event_loop.rb:619:in
`step'
        from /home/virgo/virgo_rock/gui/vizkit/ruby/lib/vizkit/vizkit.rb:125:in
`exec'
        from /usr/lib/ruby/1.8/Qt/qtruby4.rb:2427:in `call'
        from /usr/lib/ruby/1.8/Qt/qtruby4.rb:2427:in `invoke'
        from /usr/lib/ruby/1.8/Qt/qtruby4.rb:469:in `qt_metacall'
        from /usr/lib/ruby/1.8/Qt/qtruby4.rb:469:in `method_missing'
        from /usr/lib/ruby/1.8/Qt/qtruby4.rb:469:in `exec'
        from /home/virgo/virgo_rock/gui/vizkit/ruby/lib/vizkit/vizkit.rb:129:in
`exec'
        from heading_viz.rb:36
"""


Thanks,
Raúl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.dfki.de/pipermail/rock-dev/attachments/20130429/e3110723/attachment.htm 


More information about the Rock-dev mailing list