From 42e92d58a5db356f9d98fe895e18268d90fbdea5 Mon Sep 17 00:00:00 2001 From: Malte Wirkus Date: Tue, 19 Oct 2021 10:20:12 +0200 Subject: [PATCH] automatically reset camera on startup --- bin/rock-roboviz | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/rock-roboviz b/bin/rock-roboviz index 6ad1229..d8a80a8 100644 --- a/bin/rock-roboviz +++ b/bin/rock-roboviz @@ -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) } } @@ -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 @@ -263,5 +267,3 @@ end main.show Vizkit.exec - -