Open osrf-migration opened 10 years ago
Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).
It would also be nice to disable the Oculus window when Window->Oculus Rift
is pressed a second time (uncheck it). This should work whether the window was initially triggered by the GUI or if it was started by autolaunch=1
on gui.ini
.
Original comment by Martin Pecka (Bitbucket: peci1).
I tried Oculus rift DK2 in Gazebo 8/Ubuntu 14.04 now, and the result is a bit unsatisfactory. In the Oculus window, the view (for each eye!) is dissected into 4 parts, each of which showing a slightly different view (but these views almost correctly match in left and right eye). But head tracking works (moving around with all these 4 views). I've closely followed the tutorial at http://gazebosim.org/tutorials?tut=oculus .
The only thing I did differently is that I run the Oculus daemon from https://github.com/OSUrobotics/ros_ovr_sdk , because the one attached to the OSRF version crashes after a few frames (though the problem seems to be the same in the few rendered frames I got from the SDK from tutorial).
~/.gazebo/gui.ini
:
#!ini
[oculus]
x=1920
y=0
visual=camera::link::visual
autolaunch=0
Launched using gazebo --verbose worlds/camera.world
, here's gazebo log:
[Msg] Oculus Rift found.
[Msg] Type: 6
[Msg] Product Name: Oculus Rift DK2
[Msg] Product ID: 33
[Msg] Firmware: 2.12
[Msg] Resolution: 1920x1080
[Msg] Position tracking: 64
[Wrn] [OculusCamera.cc:268] Oculus: No head tracking.
If you do not see a following message about 'Head tracking enabled', then try rebooting while leaving the Oculus turned on.
[Wrn] [GuiIface.cc:113] QWidget::paintEngine: Should no longer be called(virtual QPaintEngine* QWidget::paintEngine() const)
[Wrn] [GuiIface.cc:113] QWidget::paintEngine: Should no longer be called(virtual QPaintEngine* QWidget::paintEngine() const)
[Wrn] [GuiIface.cc:113] QWidget::paintEngine: Should no longer be called(virtual QPaintEngine* QWidget::paintEngine() const)
[Wrn] [GuiIface.cc:113] QWidget::paintEngine: Should no longer be called(virtual QPaintEngine* QWidget::paintEngine() const)
[Wrn] [GuiIface.cc:113] QWidget::paintEngine: Should no longer be called(virtual QPaintEngine* QWidget::paintEngine() const)
[Wrn] [GuiIface.cc:113] QWidget::paintEngine: Should no longer be called(virtual QPaintEngine* QWidget::paintEngine() const)
[Wrn] [GuiIface.cc:113] QWidget::paintEngine: Should no longer be called(virtual QPaintEngine* QWidget::paintEngine() const)
[From Service] Lost 7 IMU samples: 8989 2 9
[From Service] [ExternalCamera] Skipped 10 frames
[Msg] Oculus: Head tracking enabled.
[From Service] [TrackedHMD] cameraToHMDoffset: 40461, was 0
[From Service]
Camera Aligned with Gravity: change 3.4 deg, 16 mm, conf 0.0628
[From Service] Camera Position (-6.3, 14.1, -4.3)
[From Service] Up in Camera Frame (0.050, 0.998, 0.032)
[From Service] [TrackedHMD] Initial camera latency: 0.87 frames
[From Service]
Camera Aligned with Gravity: change 1.7 deg, 14 mm, conf 0.67
[From Service] Camera Position (-12.9, -14.5, -11.5)
[From Service] Up in Camera Frame (0.000, 1.000, -0.021)
[From Service] [TrackedHMD] TrackPose failed
[From Service] [TrackedHMD] TrackPose failed
[From Service] [TrackedHMD] TrackPose failed
[From Service] [TrackedHMD] GetVisionPrediction failed: Capture time 1489687957.7758
[Wrn] [GuiIface.cc:113] QWidget::paintEngine: Should no longer be called(virtual QPaintEngine* QWidget::paintEngine() const)
[Wrn] [GuiIface.cc:113] QWidget::paintEngine: Should no longer be called(virtual QPaintEngine* QWidget::paintEngine() const)
[Wrn] [GuiIface.cc:113] QWidget::paintEngine: Should no longer be called(virtual QPaintEngine* QWidget::paintEngine() const)
[Wrn] [GuiIface.cc:113] QWidget::paintEngine: Should no longer be called(virtual QPaintEngine* QWidget::paintEngine() const)
[Wrn] [GuiIface.cc:113] QWidget::paintEngine: Should no longer be called(virtual QPaintEngine* QWidget::paintEngine() const)
[Wrn] [GuiIface.cc:113] QWidget::paintEngine: Should no longer be called(virtual QPaintEngine* QWidget::paintEngine() const)
[Wrn] [GuiIface.cc:113] QWidget::paintEngine: Should no longer be called(virtual QPaintEngine* QWidget::paintEngine() const)
[Wrn] [GuiIface.cc:113] QWidget::paintEngine: Should no longer be called(virtual QPaintEngine* QWidget::paintEngine() const)
Original report (archived issue) by Carlos Agüero (Bitbucket: caguero, GitHub: caguero).
Pull request #1074 adds basic Oculus support into Gazebo. The Oculus camera needs to be attached to a visual link. For now, we use a configuration file (gui.ini) to specify the visual link, as well as the initial position of the Oculus window.
It would be nice to open a dialog window when the user press Window->Oculus Rift, that let you select the visual link to attach the Oculus camera, as well as position and orientation offsets.