Skip to content

Commit

Permalink
did a copy of classical buoydetector in buoy::Detector
Browse files Browse the repository at this point in the history
  • Loading branch information
deshalb committed May 23, 2012
1 parent 22092dd commit 09fd889
Show file tree
Hide file tree
Showing 7 changed files with 664 additions and 33 deletions.
5 changes: 5 additions & 0 deletions manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,9 @@
<depend package="dummy-dependency-n-1" />
<depend package="dummy-dependency-n" />
-->
<depend package="avalon/visual_detectors"/>
<depend package="eigen3" />
<depend package="opencv" />

<tags>needs_opt</tags>
</package>
9 changes: 9 additions & 0 deletions scripts/force_cutting.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require 'orocos'
require 'vizkit'
include Orocos

Orocos::CORBA.name_service = "192.168.128.51"
Orocos.initialize

detector = Orocos::TaskContext.get "buoy_detector"
detector.force_cutting.writer.write(true)
30 changes: 30 additions & 0 deletions scripts/livetest.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
require 'orocos'
require 'vizkit'
include Orocos

Orocos::CORBA.name_service = "192.168.128.51"
Orocos.initialize

#Orocos.run "buoydetector" do
Orocos.run("buoydetector_test" => nil, :wait => 20) do
detector = Orocos::TaskContext.get "buoydetector_test"
camera = Orocos::TaskContext.get "front_camera"

#Vizkit.display detector.buoy
#Vizkit.display detector.relative_position

camera.frame.connect_to detector.frame
detector.configure
detector.start

Vizkit.display camera.frame

begin
puts "busy"
Vizkit.exec
rescue Interrupt => e
puts "Ende"
end
end


36 changes: 36 additions & 0 deletions scripts/livetest_simulation.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
require 'orocos'
require 'vizkit'
include Orocos

#Orocos::CORBA.name_service = "192.168.128.51"
Orocos::CORBA.name_service = "127.0.0.1"

Orocos.initialize

#Orocos.run "buoydetector" do
Orocos.run("buoydetector_test" => nil, :wait => 20) do
detector = TaskContext.get "buoydetector_test"
#camera = Orocos::TaskContext.get "front_camera"
camera = TaskContext.get 'front_camera_simulation'
# camera.start

buoy_monitor = Vizkit.display detector.buoy

Vizkit.display detector.relative_position

camera.frame.connect_to detector.frame
detector.configure
detector.start

# Vizkit.display camera.frame

begin
puts "busy"
Vizkit.exec
rescue Interrupt => e
puts "Ende"
end

end


35 changes: 35 additions & 0 deletions scripts/test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
require "vizkit"

Orocos::CORBA.name_service = "127.0.0.1"
Orocos::CORBA.max_message_size = 80000000
Orocos.initialize

if ARGV.size < 1
puts "No Log File in use"
exit 1
end

#Orocos.run do
Orocos.run("buoydetector_test", :wait => 20) do
log = Orocos::Log::Replay.open(ARGV[0], Typelib::Registry.new)

detector = Orocos::TaskContext.get "buoydetector_test"

log.front_camera.frame.connect_to detector.frame

#Vizkit.display detector.buoy
#Vizkit.display detector.relative_position

detector.configure

detector.start

begin
Vizkit.control log
Vizkit.exec
rescue Interrupt => e
puts "Ende"
end
end


Loading

0 comments on commit 09fd889

Please sign in to comment.