I am attempting to get my InMoov head connected to the oculus, but the documentation is pretty old. I followed kwatters' tutorial, but have not been able to get it working.

Do I need the oculus sdk or runtime installed on my computer for the MRL service to work? If so, do I need to download an old version or will the latest version work? 

I initially tried just running the service from the runtime menu, but that didn't work. I then downloaded the  jovr-0.3.2.4.jar and OVR_C.dll files, saved them in the correct directory as stated in the tutorial, and started mrl via cmd but I was still getting an error saying LibOVRRT64_0_7.dll could not be found. 

I am using mrl v1412, 64 bit java, 64 bit os, and using kwatters' python example script in the tutorial. 

I'm excited to get this working, as I have a fully functional, completed Inmoov just waiting! Any information is greatly appreciated. 

kwatters

7 years 6 months ago

It sounds like you're using a considerably older version of MRL and following some documentation that's no longer correct.

What type of Oculus do you have ? CV1 ?  DK2 ?  Do you have the oculus runtime installed and running?  If so what version?  (I use 0.8 currently with the DK2 on Windows 10, though it was a pain to get the oculus runtime to work on windows 10.)

You shouldn't need to manually copy those files around, if that's the case there's an issue with some of the dependencies in the repo.

What operating system ar you on?

I assume you want to stream the video from a webcam to the oculus?  What type of webcams do you have?  Do they work with OpenCV as you expect in MRL?

There is an issue with running more than 1 OpenCV service at the moment because of the VideoStreamer service.  Parts of the OculusRift service are expecting your hardware to be setup.

 

Ever program Java?  For this stuff, I'd recommend checking out the source code of MRL, there are somethings that are hard-coded that you might want to change.  (or at least start working through some of the code to get an understanding of what is going on.)

 

Good luck!

I have the DK2 and the CV1 to work with. I can easily get the CV1 working by using the latest oculus software, but I've been trying half the day to get .7 or .8 working on windows 10 with the DK2 and no luck. I assume I need one of the beta verions (<.8) to get the oculus service working?

I am using the Microsoft LifeCam HD-3000 cameras in both eyes, and opencv is working fine.

I'm not super familiar with Java, but given enough time I can work my way through it :)

bharned

7 years 6 months ago

I was finally able to get the DK2 working on oculus runtime 0.8! 

Whenever I try to start the oculus service (through runtime or python) I get an error:

java.lang.NoSuchMethodError: java.lang.NoSuchMethodError: com.oculusvr.capi.Hmd.create()Lcom/oculusvr/capi/Hmd;

Any idea how to solve this?

Thanks

kwatters

7 years 6 months ago

In reply to by bharned

Awesome!  ok.. so you're making great progress.  When I got 0.8 working locally, there were major issues with windows 10.  Basically i eneded up having to run the oculus runtime in windows compatability mode.  

Microsoft did no one any favors with windows 10.  In many ways I am slightly regretting the choice to upgrade.  Anyway..  That being said..

You can get the oculus runtime working for the DK2 in Windows 10 with the compatability mode...  

So...  now the question is regarding this "method not found" sort of error that you're having.   I would first ask that 1. you download the latest release  1.0.1723  (from the official download link on this page) install the services...

And try to launch it.  If this still don't work. after you've reproduced the error ,  send a  "no worky"

This will send us the "myrobotlab.log" file.  From your error message, it looks like you're mixing and matching versions of the API.  you should NOT have to manually copy any jar/dll files...  So , do NOT do that...  otherwise you might be messing up the class path and causing strange error messages like this.

Typically speaking the "NoSuchMethod" error means that you've got the wrong jar files in your java classpath or that some library is mismatched for the version.  

 

Also, are you using a python script to launch your services?  Those are also useful to help reproduce issues.

 

Best,

  -Kevin

 

Okay, so after downloading 1.0.1723, I am able to get the script to run. In the java application's rift tab, I can't see any video, just placeholder images. In the rift tab in the webgui, it says "servicegui not found". It seems like it's not attaching at all to the rift service, as I get no debug output from the "headTracking" function in the python script.

Going back to OpenCV, I just tried to run a test by trying to stream both webcams at once through two different OpenCV instances. This did not work (although not sure if this is the way it is setup in the rift service). Is there something special I need to do on the webcam side of things?

I was also unable to send the "no worky" file, but here is it uploaded manually:  /sites/default/files/users/user1766files/myrobotlab.txt

For the python script, I was just using the one listed on the OculusRift service mainpage here.

 

Edit: just got both camera streams to work, and then tried just starting a new instance of the OculusRift service and got this error: "[gui] [ERROR] did not find method - getState(OculusRift)" I'm wondering if this is because I'm running 0.8.0 oculus runtime with only jovr at 0.7.0? is there a jovr 0.8.0?

bharned

7 years 6 months ago

In reply to by bharned

After digging through the java, I found the initialize that was missing in the ancient example python script. That was still throwing some errors, so I downgraded from runtime 0.8 to 0.7, and it works! The lifecam 3000's are mounted horizontally, which really reduces the oculus frame of view, so I'm going to try mounting them vertically to get better resolution/frame of view.

Thanks so much for the help kwatters!

kwatters

7 years 6 months ago

In reply to by bharned

Ahoy bharned!

  You are absolutely right, the initContext() method does set things up ..   I checked in a small change the other day to avoid an issue where the Oculus was calling Hmc.create() 2x and getting a null pointer error on it.

Ok.. so the mounting of the cameras and the orientation can be controlled with the "Affine" OpenCV transformer.  This allows you to rotate and translate the camera images.  It's also very useful to calibrate the distance between the cameras to make sure you get stereo convergence when you're looking through the rift..

Ok, so now for some more fun stuff..   you can actually move the image around in the oculus display by using the keys 

A (for moving left)

D (for moving right)

W (for moving up)

S (for moving down)

and you can zoom in / out with the "P" and "L"  keys.  

 

I have my cameras mounted vertically in my InMoov(s) because the aspect ratio of 2 cameras mounted vertically match the oculus resolution.

I was able to get it working with 0.8 runtime using the jovr 0.7 libraries on windows 10 using compatability mode, but the key for me was to update my video card device drivers (from the nvidia site.. the microsoft drivers were not up to date enough)  and I also needed to run the oculus runtime in compatability mode.

 

Ok,  I'm just rambling now.. but it sounds like you were able to get it to display an image in the Rift!  So.. WOOOOOOO HHOOOOOO!!  Nice Job!

 

Let's continue to collaborate on this!  Reality is the code to get the Oculus to work is not so simple. so I'm very excited that you've been able to read some of the code and make progress !  Great Job!