psmoveservice / PSMoveService

A background service that communicates with the psmove and stores pose and button data.
Apache License 2.0
593 stars 148 forks source link

Some problems for PSMoveService #134

Closed vrxiaochouyu closed 8 years ago

vrxiaochouyu commented 8 years ago

1,there are no controller in steamvr!but i can see controller in “Test tracking”.(the ps camera is in right place in “Test tracking”) 2,the controller is always higher than HMD in steamvr,if i without HMD.such as i use riftcat and cardboard. 3,PS Move Controller is moving near and far, acording with PS Eye, not the HMD (RiftCat - Cardboard).I found the PS camera (virtual PSEye)and the coordinates in the same position from “Test tracking”. 4,i can set the aligning HMD tracking space using riftcat.i set steamvr Room Set > standing only>locat the floor,and set the height is 0. but if i set this it will be problem 1,if i don't set this ,it will be problem 2 or 3. 5,i have three controllers ,i want one of them to make HMD motion tracking .the others make controllers. what should i do?

toto5100 commented 8 years ago

It would be difficult to use PSMove Service without a position tracked HMD (such as Oculus dk2). It's normal if your hmd doesnt move in steam vr, as it is not position tracked. You say there is no controller in steamvr and then you say it is too high in steamvr, what do you mean ? Also, as far as i know, PSMove Service does not support yet position tracking for hmd.

HipsterSloth commented 8 years ago

If alignment between the HMD and the psmove controllers is off, it's possible to manually adjust the relationship between the steamvr tracking space and the psmove tracking space by editing the "HMDTrackingSpace" section of C:\Users\<username>\AppData\Roaming\PSMoveService\TrackerManagerConfig.json. See discussion in issue #113 for details about that.

As for tracking head position using a psmove that's best accomplished using an external library like FreePIE, whose strength is in remapping controller state. That was the conclusion we came to in issue #59.

@hawkinse actually made a FreePIE plugin for psmoveservice that does exactly this (see issue #44). "I've put together a simple client that passes position and rotation information to FreePIE, it's available here. I had some difficulty getting FreePIE to play nice with C++, so there's some redundancy in how it's used (C# talks to FreePIE through DLL, managed C++ wrapper acts as bridge to unmanaged C++ client). When that C# wrapper for Unity gets written it would probably be simpler to redo this all in C#.

I'm using this with VRidge and a third controller for head tracking, and location works fine in Steam VR. Rotation only works up to 180 degrees, I'm not entirely sure where the breakdown is. Could be in my freepie python script, could be a limitation of freetrack, or it could be a problem in VRidge's implementation of freetrack. Regardless, for now VRidge users can use rotation from their phones and deal with the constant need to reset orientation."

vrxiaochouyu commented 8 years ago

@toto5100 thank you for your answer!“You say there is no controller in steamvr and then you say it is too high in steamvr, what do you mean ?” i mean it's two case.if i set HMD tracking space there will be no controller,if i didn't set HMD tracking space there will be controller very high. the controller is very high in steamvr, i found the coordinate of HMD is on the floor from steamvr. but the virtual HMD is in the air from “Test tracking”.the different make i see the controller in higher place in steamvr. i hope you can understand what i say.my English is so bad.

@HipsterSloth thank you for your answer! can you gave me a link for the FreePIE plugin for psmoveservice. i only find a“OSVR plugin for FreePIE” in github.

thank you

hawkinse commented 8 years ago

@vrxiaochouyu you can find my freePIE bridge utility here: https://bitbucket.org/hawkinse/psmovefreepiebridge

vrxiaochouyu commented 8 years ago

@hawkinse thank you for your answer!it's a amazing project. what's mean ”make sure to set Tracking source to either "Phone orientation and FreeTrack position" or "FreeTrack orientation and position" in the desktop app's settings."? what should i do?

hawkinse commented 8 years ago

@vrxiaochouyu That would be in the RiftCat application itself. When your phone is connected, click on the wrench icon near the center bottom of the window, then in the new window that appears click on "Tracking options". A drop down menu will appear where you can change the tracking source so that RiftCat is listening for input from Freetrack.

Right now rotation from freetrack isn't working very well, so I'd recommend setting it to "Phone orientation and FreeTrack position".

xMindweaverx commented 8 years ago

@hawkinse - I was thinking about doing something like this with a strip of led lights on front of the HMD. What do you think? I would have to read up on scripting for Freetrack, but do you think it's do able? I'm only wondering because of the added weight of the PS Move controller.

Figuration commented 8 years ago

Can someone leave me a link to the freepie freetrack script?

hawkinse commented 8 years ago

@Figuration - It's the example script that should be included with the built releases. It's also available standalone here.

@xMindweaverx - I recall looking into it briefly and not seeing anyone getting it working beyond 180 degrees. For room scale VR that doesn't sound too useful.

xMindweaverx commented 8 years ago

@hawkinse - Hmm, so maybe add a couple leds to the rear as well? How about removing the grip housing on the PS Move to remove weight? I may order a couple more to take one apart. I plan to buy a Vive soon, but I still want to pursue this feature along with helping with this service.

hawkinse commented 8 years ago

@xMindweaverx As long as you only needed it for position, LEDs on the back would probably work.

xMindweaverx commented 8 years ago

@HipsterSloth - I'm using hawkinse's app with freepie for positional tracking and it works good, but both of my cameras still rotate fairly fast.. It's really weird. I'm still going to test, but does the ps move service tell SteamVR to update postion?

@hawkinse - It's working pretty good I have the controller laying straight forward on top of my head with the bubble resting on top of the hmd. I tried playing a game where I only have to use one controller (Fruit Ninja), but because I only have two controllers I had a sword on top of my head.. lol I'm guessing a 3rd controller will fix that issue. Either way good job!

HipsterSloth commented 8 years ago

@xMindweaverx I'm not sure what you mean by "both of my cameras still rotate fairly fast." Do you mean:

1) The location of the ps3eye cameras in steamvr are rotating 2) The point of view from your head is rotating faster then your actual head is rotating?

I suspect you mean case 1.

@hawkinse Does the orientation of the head come from VRidge or from the PSMoveController you have attached to your head?

hawkinse commented 8 years ago

@HipsterSloth depends on the setting used in VRidge. If the Tracking Source option is set to "Phone orientation and FreeTrack position", VRidge will use the phone sensors for orientation. If it's set to "FreeTrack orientation and position", it uses the PS Move controller orientation.

Either way, it still goes through VRidge.

HipsterSloth commented 8 years ago

@xMindweaverx I presume you are using the "Phone orientation and FreeTrack position" setting? I'm wondering if you are getting yaw drift from your phone's orientation.

@hawkinse Ah sorry I just noticed you said as much earlier with this comment: "Right now rotation from freetrack isn't working very well, so I'd recommend setting it to 'Phone orientation and FreeTrack position'." We might be able to fix the yaw drift by blending the phones orientation with the magnetometer sensor data from the psmove controller on the head. There is a controller stream flag you can set to get the calibrated sensor data from the controller. The magnetometer vector just points toward magnetic north (sorry if I'm telling you something you already know). Once I'm past this dualshock4/ps4 camera work in a few weeks I can provide more support for this.

hawkinse commented 8 years ago

@xMindweaverx have you tried experimenting with the tracking mode options on the phone app? The default setting does not use the magnetometer over latency concerns, so it could very well be yaw drift. Results will vary by phone, but I find on my Nexus 4 that the "magnetometer (responsiveness)" setting is far less drifty while still being smooth enough to actually use.

zelmon64 commented 8 years ago

@HipsterSloth Some of the options in VRidge are already supposed to use the phones magnetometer. It is my belief (unconfirmed hunch) that the FreeTrack orientation does not work because VRidge is not interpreting it correctly.

@hawkinse I seem to get varying results from "magnetometer (responsiveness)". Once in a while it will work fine but usually I get a small drift after moving like it doesn't know that I've stopped (Note 4). EDIT: I had another go at it to check and while indeed it was bad to begin with, after a minute or two the drifting completely stopped. I suppose VRidge must re-calibrate every so often like the Steam Controller. I had previously searched for a way to calibrate it but only found some obscure way to do it in the phone's debug menu which didn't seem to do much.

xMindweaverx commented 8 years ago

@HipsterSloth - When I said fairly fast I might have over stated it. I can't notice it moving with just my eyes, but for example in a minute the cameras rotate about 5 degrees. It's just seems to be yaw drift. It shouldn't be that big of a deal once you guys add the rest yaw button. I tested more last night and I played a few rounds of Audio shield and everything seems to be ok for 1 complete round, but going into the next round it's off so much I have to recalibrate. It's possible it's the game. I need to try a few more games. Once the button is in place to re-center then It should work a lot better.

Oh and @hawkinse and @zelmon64 I'm using a OR dk1. I've tried using my Freefly and galaxy s5 with VRidge and it's no where near as accurate. The lag pretty much kills it for me and I'm using a 2600k @4ghz 8gb ram, SSD, and MSi Gaming GTX970 overclocked and using native USB3 on my S5... and it's still bad. I really don't like my Freefly HMD. I like my IAMCARDBOARD Google Cardboard v2.0 better. The dk1 rotational sensors should be much better than the S5's. People don't give the dk1 enough credit because of it's short comings, but I've braided around all my wires and added a usb extension and audio cables to the hmd. The cable is around 13' in length with usb extensions and longer HDMI cable. I hope to hand it off to my nephews and let them play around with it. It's probably a pipe dream, but either way good job guys!

Bungpiece commented 8 years ago

@xMindweaverx What sort of length hdmi and usb extensions did you use? I've been thinking of adding 3-5 feet to mine but was unsure if it would cause latency. Great to hear it works.

cboulay commented 8 years ago

As this issue doesn't seem to have much to do with PSMoveService code base, please move the discussion to the google group.