<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
</head><body style="">
<div>
Hello,
</div>
<div>
 
</div>
<div>
I am working with the master branch just updated.
</div>
<div>
 
</div>
<div>
Running this script:
</div>
<div>
 
</div>
<div>
"""
</div>
<div>
require 'vizkit'
<br/>
<br/>Orocos::CORBA.name_service.ip = "seekurjr"
<br/>Orocos.initialize
<br/>
<br/># load GUI created with the Qt Designer
<br/>widget = Vizkit.load "gui/heading.ui"
<br/>widget.show
<br/>
<br/>
</div>
<div>
# connect the widget with the task "simple_task"
<br/>widget.connect_to_task "seekurjr/seekur_odometry" do |task|
<br/>
<br/>
<br/>    task.port("odometry_samples").connect_to do |data,port_name|
<br/>        widget.orientationView.update(data,port_name)
<br/>    end
<br/>
<br/>end
<br/>
<br/>
</div>
<div>
widget.connect_to_task "seekurjr/seekur_corridor_servoing" do |task|
<br/>
<br/>    # generate a new sample each time the button is clicked
<br/>    # and show a message box if there is a connection error
<br/>    g = lambda{widget.headingSpinBox.value}
<br/>    c = lambda{|msg| Qt::MessageBox.warning(widget,"ComErr",msg) if msg != "OK"}
<br/>    headingSendButton.connect SIGNAL(:clicked), PORT(:heading),:getter => g,:callback => c
<br/>
<br/>    # disable the GUI until the task is reachable
<br/>    task.on_reachable {widget.setEnabled(true)}
<br/>    task.on_unreachable {widget.setEnabled(false)}
<br/>end
<br/>
<br/>#run qt main loop
<br/>Vizkit.exec
<br/>"""
</div>
<div>
 
</div>
<div>
Gives the following error when clicking the headingSendButton:
</div>
<div>
 
</div>
<div>
 
</div>
<div>
"""
</div>
<div>
/home/virgo/virgo_rock/tools/orocos.rb/lib/orocos/async/ports.rb:374:in `connect_to': wrong number of arguments (0 for 2) (ArgumentError)
<br/>        from /home/virgo/virgo_rock/tools/orocos.rb/lib/orocos/async/ports.rb:374:in `call'
<br/>        from /home/virgo/virgo_rock/tools/orocos.rb/lib/orocos/async/ports.rb:374:in `write'
<br/>        from /home/virgo/virgo_rock/tools/utilrb/lib/utilrb/event_loop.rb:313:in `call'
<br/>        from /home/virgo/virgo_rock/tools/utilrb/lib/utilrb/event_loop.rb:313:in `defer'
<br/>        from /home/virgo/virgo_rock/tools/utilrb/lib/utilrb/event_loop.rb:161:in `call'
<br/>        from /home/virgo/virgo_rock/tools/utilrb/lib/utilrb/event_loop.rb:161:in `call'
<br/>        from /home/virgo/virgo_rock/tools/utilrb/lib/utilrb/event_loop.rb:612:in `step'
<br/>        from /home/virgo/virgo_rock/tools/utilrb/lib/utilrb/event_loop.rb:700:in `call'
<br/>        from /home/virgo/virgo_rock/tools/utilrb/lib/utilrb/event_loop.rb:700:in `handle_errors'
<br/>        from /home/virgo/virgo_rock/tools/utilrb/lib/utilrb/event_loop.rb:612:in `step'
<br/>        from /home/virgo/virgo_rock/gui/vizkit/ruby/lib/vizkit/vizkit.rb:125:in `exec'
<br/>        from /usr/lib/ruby/1.8/Qt/qtruby4.rb:2427:in `call'
<br/>        from /usr/lib/ruby/1.8/Qt/qtruby4.rb:2427:in `invoke'
<br/>        from /usr/lib/ruby/1.8/Qt/qtruby4.rb:469:in `qt_metacall'
<br/>        from /usr/lib/ruby/1.8/Qt/qtruby4.rb:469:in `method_missing'
<br/>        from /usr/lib/ruby/1.8/Qt/qtruby4.rb:469:in `exec'
<br/>        from /home/virgo/virgo_rock/gui/vizkit/ruby/lib/vizkit/vizkit.rb:129:in `exec'
<br/>        from heading_viz.rb:36
<br/>        from /home/virgo/virgo_rock/tools/utilrb/lib/utilrb/event_loop.rb:619:in `step'
<br/>        from /home/virgo/virgo_rock/gui/vizkit/ruby/lib/vizkit/vizkit.rb:125:in `exec'
<br/>        from /usr/lib/ruby/1.8/Qt/qtruby4.rb:2427:in `call'
<br/>        from /usr/lib/ruby/1.8/Qt/qtruby4.rb:2427:in `invoke'
<br/>        from /usr/lib/ruby/1.8/Qt/qtruby4.rb:469:in `qt_metacall'
<br/>        from /usr/lib/ruby/1.8/Qt/qtruby4.rb:469:in `method_missing'
<br/>        from /usr/lib/ruby/1.8/Qt/qtruby4.rb:469:in `exec'
<br/>        from /home/virgo/virgo_rock/gui/vizkit/ruby/lib/vizkit/vizkit.rb:129:in `exec'
<br/>        from heading_viz.rb:36
</div>
<div>
"""
</div>
<div>
 
</div>
<div>
 
</div>
<div>
Thanks,
</div>
<div>
Raúl
</div>
</body></html>