Announcement

Collapse
No announcement yet.

[Plugin] PSMove input - OSX and Windows x64

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    [Plugin] PSMove input - OSX and Windows x64

    Edit:

    See the sample project here. I will try to keep the README up to date with all necessary instructions. The docs are still a little bare, but feel free to post here with questions and I'll try to update the docs as time allows.

    1. The plugin currently assumes you are using a PSEye with the PS3EYEDriver as this is the only driver that works with MSVC 64-bit, required by UE4 Editor. PS3EYEDriver is GPL'd, so you can't publish closed-source games using this driver. We will eventually get around this by turning the psmoveapi into a server/client model, where the server will be GPL'd and the client - the only part that needs to go in your project - will have a much more permissive license. In the meantime, you can build for 32-bit and use the non-free 32-bit drivers from CodeLaboratories. Your users would be required to purchase these $2 drivers too.

    2. Getting the PSMove paired to the computer can be quite tricky. It seems to depend on the bluetooth dongle and possibly what other USB devices are attached during pairing. The good news is that once it is paired, it connects very reliably in the future. If it doesn't, then you either have a defective controller (e.g., bad battery) or an incompatible bluetooth dongle. We don't have a list of 'good' bluetooth dongles, but the ASUS BT-400 has worked well for me and the other main plugin dev.

    3. It's pretty sensitive to lighting conditions. Sunlight or fluorescent light sources (& reflections) in the FOV of the tracking camera will cause lots of problems for you.

    4. Everytime you move the PSEye camera, or DK2 camera, you will have to redo a coregistration step. It only takes about 20 seconds and it should be good as long as the cameras don't move relative to each other.

    5. You have to recalibrate the PSMove magnetometer (and other sensors) definitely every time you change rooms, and it's probably a good idea to do it once per day.
    Last edited by bullale; 09-14-2015, 01:51 AM.

    #2
    This looks like a solid first release, nicely done !
    Plugins: Node.js - TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo - RealSense

    Comment


      #3
      Thank you for releasing the plugin, perhaps I could finally put the two PSMoves I have here to some use.
      Linux Support page (Wiki): https://wiki.unrealengine.com/Linux_Support
      Linux Demos page (Wiki): https://wiki.unrealengine.com/Linux_Demos
      My Unreal Engine 4 Linux repo: https://github.com/3dluvr/UnrealEngine/

      Comment


        #4
        Well, only 1 for now. Though it polls as many controllers as are available, there's only one instance each of Position and Rotator. I suppose if there are multiple controllers then you may end up with hybrid data in these variables. There's still a lot left to do but I have to move on with my research. I will make updates as I need them or if there's a lot of interest from the community, but I'm also more than open to contributions.

        amigo, this plugin should work in linux too because the psmoveapi works in linux. You'd have to build the psmoveapi binaries, put them in the correct directory, and edit PSMove.Build.cs. If you end up doing that then please PR it upstream.

        Comment


          #5
          Cool, thanks for the heads-up, so I don't wreck my head why two controllers won't work.

          As for Linux, I'll see what I can do - at the moment we are focusing on getting the 4.7.x polished up, in case people want to try it due to some (unforeseen?) GDC interest.
          Linux Support page (Wiki): https://wiki.unrealengine.com/Linux_Support
          Linux Demos page (Wiki): https://wiki.unrealengine.com/Linux_Demos
          My Unreal Engine 4 Linux repo: https://github.com/3dluvr/UnrealEngine/

          Comment


            #6
            This is great! I've got it kind of working - I need to have the controller plugged in and i'm only getting the positional data rather than the orientation data but it's very interesting.

            I eventually want to use this to track a real camera/head to make an off-axis projected envionment.

            I think there's some issue as well with the polling speed. I'm using the positional data to drive my camera location and it's a bit hesitant. It stops and starts rather than giving me smooth tracking. It's possibly something to do with my hardware setup though.



            Sometimes the light doesn't come on either - is there a way to switch it on manually with a function?

            I'll be watching this plugin with huge interest!

            Dan.

            Comment


              #7
              Yeah the plugin needs some work. And to be honest, its current implementation is probably not the right way to do it. I would much rather have a service running in the background that handles all of the psmove connectivity, then simply have UE4 poll the service for the latest data.

              Can you try changing the thread priority?
              https://github.com/cboulay/psmove-ue...Worker.cpp#L57

              Possible values here:
              https://docs.unrealengine.com/latest...ity/index.html

              As for lack of orientation, you may have to run the calibration first. If you built the psmoveapi yourself then it should have built the executable magnetometer_calibration. That writes some data to the psmove's memory (I think). I added the magnetometer_calibration Mac executable to the plugin. I won't be able to add the Windows one until Tuesday.

              If you want to build it yourself then you can do that. I'm trying to get my changes to the psmoveapi merged upstream but it's taking a while. An added complication is that it uses a submodule which is also a little slow to get my changes merged upstream. In the meantime, use my fork, the master branch is up to date.

              What platform are you using? Mac, Windows, Linux? I've found that the PS3EYEDriver performs fairly poorly in Mac, with many dropped frames. The same hardware running Windows is much smoother. I had some performance increase in Mac using gcc instead of clang. I'll test that out now.

              Comment


                #8
                Are you sure you were getting position and not orientation? When the tracker isn't working well (room is too bright, spotlight behind you, etc), the orientation still works but the tracker is just noise.

                Anyway, I made a bunch of updates today. And now it should support multiple controllers too. I don't have more than 1 with me to test so I'm not providing instructions yet.

                Comment


                  #9
                  I think the problem is actually with the camera driver (i'm on windows at the moment but i'm developing on both win and mac). I downloaded a camera driver which isn't the one you've specified. I've now got that one but i'm trying to work out how this mingw64 thing works. I'll let you know how it goes. - Also, I can't effectively get the move to pair with bluetooth - it keeps pairing and dropping - might be a windows 7 thing - the bluetooth stack is a but rubbish I think.

                  Cheers!

                  Dan.

                  Comment


                    #10
                    Don't use MinGW64. The libraries it produces can't / are very difficult to link in MSVC, which UE4 uses. I'll put windows binaries up shortly.

                    As for pairing, it should work better in Windows now. Once it is paired, however, connecting is a different story. In Windows 8.1, I have no disconnects anymore after I made a change to the registry. Maybe a similar change is necessary in Windows 7? I've also read the dongle makes a big difference. Some bluetooth dongles (I think Belkin) just work. I have an ASUS BT-400, but that's Win 8.1.

                    Comment


                      #11
                      Ah - ok, so how do I build the driver for the playstation eye? I've tried loading the source files into VS but i'm a bit of a VS rookie and i can't get them to compile. I think i'm trying to make a file called ps3eye_sdl.exe. I don't have a problem with the UE plugin (as far as I can tell) - It updates the position, but as I said, the responsiveness is intermittent (i've got a really high end machine). I wonder if it's not reporting the orientation because i'm running it over USB?

                      Thanks for all the help by the way!

                      Dan.

                      Comment


                        #12
                        In terms of win7 not being that good vs win8.1 - I'm not going to pay for it with windows 10 just around the corner. I've installed windows 10 on a partition (I've heard it runs UE4 really well and is mostly stable) but I think there's a problem with the video driver - i've got a GTX980 SLI setup and I don't think it likes it. I think there are some 'secret' windows 10 nvidia drivers which might solve the problem but I got no reply when I applied to join the directx12 'club'.

                        Comment


                          #13
                          Oh! I didn't even think it would be possible to run it over USB. Yes, that is why you are not getting orientation. Orientation is bluetooth only.

                          Right, don't buy win 8.1 now. I think that maybe there might be a similar registry key in Windows 7, and I wonder if changing that will help you too.

                          You don't need to build the PS3EYEDriver. It comes baked in to the psmoveapi_tracker if the PS3EYE option is specified at compile time.

                          PS3EYEDriver performance depends a lot on which libusb driver option you're using. Did you use Zadig to install libusb-1.0 as the driver for the PSEye camera? If so, which driver option did you use?

                          I'm working on rebuilding the binaries now. I've run into a problem related to the use of the PS3EYEDriver as a submodule in psmoveapi. git submodules are a huge PITA. I'll update here as soon as I have new binaries.

                          Comment


                            #14
                            It turned out that I still had an old environment variable set from when I had to work around a different problem that I've since fixed. The plugin repository now contains executable files to help you pair, calibrate, and test the tracker outside of the UE4 environment. Try to see if you can get the test_tracker to give you stable tracking before you use the UE4 plugin.

                            Comment


                              #15
                              Ah! That seems much better with the pairing - I think it's trolling me though with calibration stopped at 99%!

                              About to try the app - which usb driver would you say is best? Using zadig i've chosen libusbK - i'll cycle through them

                              Thanks again!

                              Comment

                              Working...
                              X