[Plugin] PSMove input - OSX and Windows x64

If that does what I think it does during packaging, you’re my hero :slight_smile:

Totally normal. libusb is trying to open things that aren’t actually the camera (e.g., the microphone) and it can’t. I normally get 2 errors, not 3, but if it works it works.

I’m happy that you got the controller connected too.

Someone else is working on the generic Motion Controller implementation. He thinks it’ll be done Friday. I’ll be sure to post here when that’s done, and people can actually start using this as a drop-in replacement for the Vive / Touch until those are more available.

Thanks very much. I’ll be sure to try it out.

The line before the quoted block defines PhysXBinariesDir as:


string PhysXBinariesDir = String.Format("$(EngineDir)/Binaries/ThirdParty/PhysX/{0}/Win64/VS{1}/", PhysXVersion, WindowsPlatform.GetVisualStudioCompilerVersionName());

Do you happen to know what other aliases exist besides $(EngineDir)? Maybe $(GamePluginsDir)? Is there a list somewhere or can we assume anything available to FPaths works?

Thanks for the update Im currently working on a vr game but my only input is leap motion which leaves a lot to be desired on the tracking so Ive been trying to find a motion controller solution for some time now glad to see you guys making strides in this.

One thing I noticed when I tried to set up the psmove in project was that I cant find a “Set Reset Pose Request” bool was this changed or am I terrible at finding things? :smiley:

The plugin is sorta ready for a wider audience.

Please see the sample project here.

I got Motion Controller (MC) support to work in my Hydra plugin (experimental commit for now), the key class to copy ideas from is SteamVRController which I used as a reference to change my plugin module in FHydraPlugin.

The gist of it is to have your plugin module implement IInputDevice, *IMotionController *interfaces, then when your overwritten

bool GetControllerOrientationAndPosition(const int32 ControllerIndex, const EControllerHand DeviceHand, FRotator& OutOrientation, FVector& OutPosition) const

function gets called, you set the OutOrientation and OutPosition to update the orientation/position of the controller for DeviceHand (Left/Right, possibly more enums in the future)

and then during Tick(float DeltaTime) or SendControllerEvents overwritten function calls you copy all the data you need from your module and emit input mapping events (for Motion Controller FKeys e.g. FGamepadKeyNames::MotionController_Left_FaceButton1)

If you have some force feedback mechanism available you can use
void SetChannelValue(int32 UnrealControllerId, FForceFeedbackChannelType ChannelType, float Value) override and
void SetChannelValues(int32 UnrealControllerId, const FForceFeedbackValues& Values) override
to set those.

Hope this helps with your MC bind :slight_smile:

Hey I had trouble opening your simplePsmove project. When I open it says the map was created with a newer version of the engine but I downloaded release and master and still didnt open up.
I used your blueprint pics to test it out in another project and that worked but the move blueprint appeared way behind the oculus view when in game and now the ps move light only becomes solid in regular PIE when I try to preview in VR the light blinks continuously and does not connect. Have you experienced these issues?

There was a bad version of the map that went up a few days ago. I fixed it ~ 1.5 days ago. You can try deleting the entire folder and re-cloning: git clone --recursive https://.com//SimpleUE4PSMove.git

Did you do the coregister_dk2 step first?

Whether or not the light blinks continuously doesn’t have much to do with whether you are running in VR or not. It has more to do with whether or not the camera is returning good frames and the tracker algorithm is able to find the sphere. The blinking is a colour calibration step. Sometimes this breaks. I’m not sure why, but I find if I delete the C:\Users<username>\AppData\Roaming.psmoveapi\colormapping.dat file then it works on the next try. I’ve been meaning to make it so that my plugin does not write this file to disk, but I haven’t had the chance yet.

I did coregister the move by holding it up with the headset and took samples. What is happening in this step?

This is great plugin, good work. Thank you very much !

Hi everyone,

I too am trying to get this to work and seem to be stuck now at the ‘psmovepair’ stage.
Been trying over and over loads of times but the result is always just that I can get the light flashing with the usb cable in, I then remove cable to try to get the solid led.
It stops flashing, then if I am lucky and press the wand PS button to start the flashing again, I get one or two goes maybe. Then I can’t get it to flash any more.
So I have to put the cable in and start over.

I have the BT400 with latest drivers and Win8.1

Does anyone know of any tricks or other things that I could check. Batteries should be good I got a power data report of ‘D0’ which if correct should meant that it is happy?

Any ideas much appreciated.

Cheers

After doing psmovepair once, did you also try psmove-pair-win.exe?

Yes it just reports “No Bluetooth devices found.”

It never changes? Let psmove-pair-win run for a while without pressing the PS button on the controller to get an idea of what it prints out to console when nothing is pressed. Then press the PS button on the controller. Does the console printout change? It should.

Approximately how many times & for how long does the PSMove controller’s LED flash after you press the PS button during the psmove-pair-win process? If it’s anything less than ~3 seconds then I think it might be a battery problem.

Ok so I got two different result on two consecutive tries.

This was the first one:


On the second go doing the same thing I got no change in output, just the same no device found messages.

Yes it is generally just flashing a second or two then stops. I had it plugged into my PC for half a day yesterday.
Should the light come on when it is charging? It doesn’t when plugged into my computer. Would it be better to plug straight into a wall socket converter?

The little LED is solid when connected via bluetooth, but it will flash slowly (~1 Hz) while charging, whether connected or not. It flashes quickly while attempting to connect.

Your screenshot looks normal. You need to keep looping through that process, pressing the PSMove button whenever you can (i.e., when it stops flashing quickly). Do not be connected to the PC via USB while attempting to connect. Eventually it’ll connect.

Ok. I never get the solid light. And I never get a slow steady 1Hz blink.
Just the faster 3-4Hz blink that stays for a short amount of time then stops.
I’ll continue trying…

Getting the solid light is a good feeling when it happens the first time, because after that it is trivial to connect. The fact that it doesn’t blink slowly when it’s plugged in tells me your USB port isn’t outputting enough power to charge it, or it’s dead. This isn’t too uncommon as people are often picking up used controllers that are ~4 years old.

It seems like I have now got at least the pairing and the tracker test programs to work! :slight_smile:

After some hours and between 50-60 runs of psmovepair.exe I was ready to give up. But then I thought why does my phone not show up on my PC’s bluetooth devices?
I decided to un-install the dongle drivers and also remove the ASUS USB-BT400 entry in the Device Manager. I then rebooted and attached the dongle, this time letting Windows try to install the drivers itself. (last time I did it with a download from ASUS’ website). I then managed to get my phone connected.
So after trying psmovepair again without getting a solid light, I moved on and tried ‘psmove-pair-win’ regardless. This seem to stay connected and I managed to also run the calibrator.
And after that the two test tracking programs worked too!

I have restarted my PC a few times since and it seems like the pairing is sticking. :slight_smile:

So tomorrow I will move on and do the test setups in Unreal! Very exciting!

Hi Again,

so I have now tried to set up some tests in UE4 with some varying success. The basic setup on your wiki seems to work as expected. so that’s great!
Some questions I still have regarding the basics,
Is lens calibration no longer a step? As there a warning messages commenting on the lack of such data.
The PSMove led still keeps on flashing rapidly, not static solid, but the tracking seems to work fine anyway. I also still dont get the 1Hz blink for re-charge. I’m putting it down to personality issues of my PSMove.
In UE the tracking is somewhat stuttery is that normal or is there anything I can do to improve (bar filtering)? No biggie it is still great to have this setup to use in place of Touch or Vive controllers that seem hard to get by for non VIPs.

So thanks a million for getting this out to the community! :slight_smile:

I also tried to set up a UE scene with the Polyarc calibration, but without success.
I downloaded this to add the CalibrationMap to the basic working scene, https://.com/PolyarcGames/psmove-ue4 ]

The first thing is that in my PSMove components there does not seem to be a variable for ‘Calibration Offset’. Is there some version of something I am missing?
Also, I get three different compile errors in the ‘PSMove_Blueprint’. Some bits seem to be missing?
When I play the level the HMD positional tracking is gone. When I go back to the basic setup level I created first the HMD positional is back so Im not sure if it has to do with the compile errors above.

Has anyone here got the Calibration step to work and have something I could download maybe? Or some pointers to how I can fix it?

EDIT: I recompiled the project with the above git branch and that added the Offset variable and the blueprint also now compiles fine.
It still does not work, the actual PSMove tracking does not start up and the HMD does not track correctly I think. It seems to do some kind of move but is far from normal behaviour.
I copied that CalibrationMap folder from the Plugins/…/Contents up to the game folders own ‘Contents’ folder. Is that right?

EDIT 2: Success!! I eventually took a suggestion from that maybe my problem was battery related and ordered a proper charging station. This immediately got me the nice steady charging light and then it connected straight away. Co-register program also works.

Cheers