ros-visualization / oculus_rviz_plugins Goto Github PK
View Code? Open in Web Editor NEWOculus plugins for RViz
Oculus plugins for RViz
The license allows code redistributuion, so we should have a package for that.
Loading the Oculus Display in a custom Qt UI that uses librviz segfaults.
I posted a question yesterday with further explanation on answers.ros.org:
http://answers.ros.org/question/173445/oculus-rift-plugin-with-librviz-segfaults/
I can provide more information as requested, including log files and/or test code, but the issue seems to be with creation/startup of the OVR::DeviceManager thread.
.../oculus_rviz_plugins/src/oculus_display.cpp:222:27: error: no matching function for call to ‘Ogre::RenderWindow::swapBuffers(bool)’
window->swapBuffers(true);
^
It seems that swapBuffers(bool)
in 1.8 became swapBuffers(void)
in 1.9. There may be other Ogre 1.9 errors, I don't really have the time to check this right now.
Need to minimize rendering latency as much possible to enhance immersion and avoid motion sickness.
Right now, the Ogre resource names in OgreOculus are not unique, resulting in a crash if you add more than one Oculus Display. There might be more issues preventing that as well, e.g. selecting the device if more than one Oculus is present.
When using a FixedFrame
view, and then clicking Zero
, I get a segmentation fault.
/opt/ros/hydro/lib/rviz/rviz: symbol lookup error: /opt/ros/hydro/lib//liboculus_rviz_plugins.so: undefined symbol: _ZN4rviz14ViewController5resetEv
If we demangle:
$ c++filt _ZN4rviz14ViewController5resetEv
rviz::ViewController::reset()
This was tested with rviz 1.10.11, oculus_rviz_plugins 0.0.8 on Arch Linux.
I am trying to to put it to work with DK2 too, and I have OculusSDK 0.3 on my home folder, but I get the following error:
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~ traversing 1 packages in topological order:
-- ~~ - oculus_rviz_plugins
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'oculus_rviz_plugins'
-- ==> add_subdirectory(oculus_rviz_plugins)
CMake Error at oculus_rviz_plugins/CMakeLists.txt:17 (FIND_PACKAGE):
Could not find module FindOculusSDK.cmake or a configuration file for
package OculusSDK.
Adjust CMAKE_MODULE_PATH to find FindOculusSDK.cmake or set OculusSDK_DIR
to the directory containing a CMake configuration file for OculusSDK. The
file will have one of the following names:
OculusSDKConfig.cmake
oculussdk-config.cmake
CMake Error at /opt/ros/groovy/share/catkin/cmake/catkin_package.cmake:156 (message):
catkin_package() DEPENDS on 'OculusSDK' which must be find_package()-ed
before. If it is a catkin package it can be declared as CATKIN_DEPENDS
instead without find_package()-ing it.
Call Stack (most recent call first):
/opt/ros/groovy/share/catkin/cmake/catkin_package.cmake:98 (_catkin_package)
oculus_rviz_plugins/CMakeLists.txt:23 (catkin_package)
-- Configuring incomplete, errors occurred!
Invoking "cmake" failed
Required for release into Indigo, as mentioned in other issue, Dgossow would like to relinquish ownership
Add options to customize stereo rendering:
DK2 is not supported so far, but it certainly would be a welcome addition. If anybody is working on this, please report here.
Add a display to render a mono/stereo camera image to the Oculus.
Right now, the display assumes that the second screen is the Oculus. Add an option to select the screen number to render to.
I am getting an assertion as soon as I load the plugin.
tfoote@BigFoote:~$ rosrun rviz rviz
[ INFO] [1376453261.707260191]: rviz version 1.10.2
[ INFO] [1376453261.707312262]: compiled against OGRE version 1.7.4 (Cthugha)
[ INFO] [1376453262.268772864]: OpenGl version: 4.3 (GLSL 4.3).
OVR::DeviceManagerThread - running (ThreadId=0x7f86ac027700).
OVR::DeviceManager - initialized.
OVR::Linux::HIDDevice - Opened '/dev/hidraw4'
Manufacturer:'Oculus VR, Inc.' Product:'Tracker DK' Serial#:'KGGAI30GEN3B'
OVR::SensorDevice initialized.
rviz: /usr/include/OGRE/OgreSharedPtr.h:160: T* Ogre::SharedPtr<T>::operator->() const [with T = Ogre::Material]: Assertion `pRep' failed.
Aborted (core dumped)
I'm currently using the debs. I'll try to reproduce using source:
tfoote@BigFoote:~$ dpkg -l ros-hydro-oculus-rviz-plugins
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii ros-hydro-ocul 0.0.5-0precise RViz plugins for the Oculus Rift.
Thx !
Capture mouse / keyboard in fullscreen mode, enable moving the camera & selecting things.
I get this when the usb but not the dvi cable is plugged in:
Program received signal SIGSEGV, Segmentation fault.
0x00007fffad2a0e0c in rviz_oculus::OculusDisplay::onFullScreenChanged (this=0xfe0ef0) at /wg/stor5/dgossow/wsoculus/src/rviz_oculus/src/oculus_display.cpp:200
200 oculus_->getHMDDevice()->GetDeviceInfo( &info );
(gdb) bt
#0 0x00007fffad2a0e0c in rviz_oculus::OculusDisplay::onFullScreenChanged (this=0xfe0ef0) at /wg/stor5/dgossow/wsoculus/src/rviz_oculus/src/oculus_display.cpp:200
#1 0x00007fffad2a06a6 in rviz_oculus::OculusDisplay::onInitialize (this=0xfe0ef0) at /wg/stor5/dgossow/wsoculus/src/rviz_oculus/src/oculus_display.cpp:139
#2 0x00007ffff7aa234a in rviz::Display::initialize (this=0xfe0ef0, context=<optimized out>) at /u/dgossow/wsrviz/src/rviz/src/rviz/display.cpp:94
#3 0x00007ffff7ab3107 in rviz::DisplayGroup::load (this=0xaad720, config=...) at /u/dgossow/wsrviz/src/rviz/src/rviz/display_group.cpp:106
#4 0x00007ffff7b581ee in rviz::VisualizationManager::load (this=0x945cf0, config=...) at /u/dgossow/wsrviz/src/rviz/src/rviz/visualization_manager.cpp:446
#5 0x00007ffff7b52341 in rviz::VisualizationFrame::load (this=0x84a7e0, config=...) at /u/dgossow/wsrviz/src/rviz/src/rviz/visualization_frame.cpp:729
#6 0x00007ffff7b53c0a in rviz::VisualizationFrame::loadDisplayConfig (this=0x84a7e0, qpath=...) at /u/dgossow/wsrviz/src/rviz/src/rviz/visualization_frame.cpp:650
#7 0x00007ffff7b55445 in rviz::VisualizationFrame::initialize (this=0x84a7e0, display_config_file=...) at /u/dgossow/wsrviz/src/rviz/src/rviz/visualization_frame.cpp:317
#8 0x00007ffff7b5db62 in rviz::VisualizerApp::init (this=0x7fffffffdfe0, argc=1, argv=<optimized out>) at /u/dgossow/wsrviz/src/rviz/src/rviz/visualizer_app.cpp:239
#9 0x0000000000400abe in main (argc=1, argv=0x7fffffffe118) at /u/dgossow/wsrviz/src/rviz/src/rviz/main.cpp:39
In setPrediction, if the USB is not connected it segfaults trying to access m_sensorFusion, which is null.
It probably just needs a check if not null, else skip the method.
(gdb) l
292 return m_cameraNode;
293 }
294
295 void Oculus::setPredictionDt(float dt)
296 {
297 m_sensorFusion->SetPrediction( dt, dt > 0.0f );
298 }
299
300 Ogre::Quaternion Oculus::getOrientation() const
301 {
(gdb) p this
$6 = (rviz_oculus::Oculus * const) 0x12e4bc0
(gdb) p *this
$7 = {m_deviceManager = 0x13a6940, m_hmd = 0x7fb354005e70, m_stereoConfig = 0x13ad810,
m_sensor = 0x0, m_sensorFusion = 0x0, m_oculusReady = false, m_ogreReady = false,
m_sceneManager = 0x0, m_window = 0x0, m_cameraNode = 0x0, m_orientation = {
static ms_fEpsilon = 0.00100000005, static ZERO = {static ms_fEpsilon = 0.00100000005,
static ZERO = <same as static member of an already seen type>, static IDENTITY = {
static ms_fEpsilon = 0.00100000005,
static ZERO = <same as static member of an already seen type>,
static IDENTITY = <same as static member of an already seen type>, w = 1, x = 0, y = 0,
z = 0}, w = 0, x = 0, y = 0, z = 0},
static IDENTITY = <same as static member of an already seen type>, w = 1, x = 0, y = 0,
z = 0}, m_centreOffset = 0.151976421, m_cameras = {0x0, 0x0}, m_viewports = {0x0, 0x0},
m_compositors = {0x0, 0x0}}
Would be nice to be able to attach the Oculus View to a tf frame instead of the main camera.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.