Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automatically reset camera on startup #24

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions bin/rock-roboviz
Original file line number Diff line number Diff line change
Expand Up @@ -229,13 +229,17 @@ else
end
end

view3d.setCameraManipulator("Trackball")
view3d.setCameraLookAt(0,0,0)
view3d.setCameraEye(4, 4, 3)

if live
if hostname
Orocos::CORBA.name_service.ip = hostname
end
Orocos.initialize

state_tasks.each do | task_name, port_name |
state_tasks.each do | task_name, port_name |
task = discover_and_connect_to_port task_name, port_name,
filter: ->(port) { port.is_a?(Orocos::OutputPort) and p.type == Types::Base::Samples::Joints },
handler: ->(port) { port.on_data { |sample| vis_gui.updateData(sample) } }
Expand All @@ -254,7 +258,7 @@ if live

elsif use_test_gui
ctrl_gui.enabled = true
ctrl_gui.connect(SIGNAL('sendSignal()')) do
ctrl_gui.connect(SIGNAL('sendSignal()')) do
sample = ctrl_gui.getJoints()
vis_gui.updateData(sample)
end
Expand All @@ -263,5 +267,3 @@ end

main.show
Vizkit.exec