Forum Discussion
bullale
10 years agoHonored Guest
Working PS Move plugin for UE4; need help coreg with DK2
Update:
The plugin is not done but it's ready for public testing. I made a new thread here.
The plugin is not done but it's ready for public testing. I made a new thread here.
Hello all,
I recently made a PSMove plugin for UE4 that works in both Windows and OSX. It should work in Linux too with a simple compile of the psmoveapi binaries. The changes I had to make to the psmoveapi and PS3EYEDriver should also help anyone that wants to use the PSMove controllers in Windows or OSX (it's always worked in Linux) outside of UE4.
I need help co-registering the coordinates I get from the psmove (in cm from the camera) with the DK2's coordinate space.
For orientation, the roll and pitch are easy. The PSMove has a magnetometer so it's possible to get its true yaw but to make that useful in game I would also need access the DK2's magnetometer (I've read mixed reports that it even has one). Does anyone have any ideas here? Does it truly have a magnetometer? If so, does anyone know how to access it from within UE4?
If it does not then I'll need to somehow coregister the orientations by relying on the user to somehow point the controller in a specific orientation and pressing a button. I'm not too excited about that option.
For position, I would love it if I could access the DK2's camera's image feed. I could have the users run a quick calibration app that asked them to draw in the air then for each frame I would estimate the PSMove controller's position in 3D space relative to each camera, then create a transformation matrix from PS3Eye coordinates -> DK2 camera coordinates. This matrix could be stored in a data file somewhere (or registry entry) and as long as the cameras don't move relative to each other then it should stay the same. Any ideas on accessing the DK2's images, even outside of a game engine or the SDK?
If I can't access the DK2's camera feed then I'll probably need to touch the PSMove at specific locations on the surface of the DK2 and sample >=4 fiducial locations. I would need accurate dimensions of the DK2 body relative to whatever origin
it uses. Anyone have any experience with this?
Accuracy is important to me. We've all read that accuracy goes a long way to helping with immersion, so I hope that it's important to you too, but it's especially important to me because I'm using the data for research. So I can't really accept calibration methods that simply ask the user to put the controller near where they think it should be in the world and press a button.
180 Replies
- bullaleHonored GuestThere has been some great discussion in reddit. I will continue to monitor both places.
- FredzExplorerI didn't manage to compile your tree yet, maybe because I'm on Windows 7. Should I compile from a different branch than master ?
I got OpenCV compiled though, I had to make a modification related to the version of Windows but I can't remember what it was, something about a _WIN32_IE define I think. Maybe something similar has to be done to compile the psmoveapi ? - KarlorExplorerI don't know how any of this works or how to help you. I just wanted to say that it's great to have people working on getting the Move stuff working better! I've been trying to drum up support by making little tutorials on getting Move stuff working on PC, but that's as much as I can provide.
But you guys are on it :) Keep it up, I can't wait to see the results. The Move is the best option(cheap,easy to get, well made) for VR users at the moment.
Keep rockin and thanks again!
If you looking for an easy way to attach your Move controller to your Navigation controller so you have a more fluid control experience check this out:
viewtopic.php?f=25&t=20502 - bullaleHonored Guest
"Fredz" wrote:
I didn't manage to compile your tree yet, maybe because I'm on Windows 7. Should I compile from a different branch than master ?
Hmm... the version of Windows really shouldn't matter for building. The compiler and SDK matters. Are you using MSVC 2013 Community and following the directions here? I don't know precisely which versions of the SDK are necessary.
It is also necessary to use the specified CMake options. I haven't tested it with any other options set.
You can build with MinGW64 if you don't plan to link against the dlls from a MSVC program. UE4 requires MSVC 2013, so I went with that. - FredzExplorerNope I was using MinGW-64, I'll try with VS, less hassle I guess.
- bullaleHonored Guest
"Fredz" wrote:
Nope I was using MinGW-64, I'll try with VS, less hassle I guess.
OK thanks for letting me know. I had the MinGW builds working flawlessly at one point, but I hadn't checked them since I made the changes to support MSVC. It's possible I introduced a regression somewhere. I'll take a look ASAP.
Another problem is the PS3EYEDriver submodule. It also has to be updated for this to work. If you use my master branch then it should work because it points to a specific commit of my submodule. If you use any of the other branches it is unlikely to work because those branches are meant only to encapsulate pull requests, and therefore do not change the submodule reference. - FredzExplorerOk, thanks for the info. I was using the master branch already but good to know that I need to keep using it.
- FredzExplorerI've compiled everything with Visual Studio Express 2013 and I can run example.exe, the PS Move does rumble, the LED is flashing and the sensor values are displayed. I've added the registry key but test_tracker.exe doesn't work.
With the CL Eye driver installed I got the usual message about the missing calibration but it didn't go farther and the PS Move LED didn't light up.
I removed the CL Eye driver but then I got this message :### Found 1 controllers.
Trying to init PSMoveTracker...Could not init PSMoveTracker.
Any idea ? - bullaleHonored GuestI wrote a long post earlier today that seems to have disappeared.
I made some changes this morning. My psmoveapi master should now compile with MinGW and MSVC2013. I did it with a fresh `git clone --recursive <url>`, then adding and building opencv (copying the folder over should work), and adding libusb (copying should work).
You'll have to reclone my master because I did a hard reset to upstream before merging my changes. It had gotten too messy for me to identify where the regression occurred."Fredz" wrote:
I removed the CL Eye driver but then I got this message :### Found 1 controllers.
Trying to init PSMoveTracker...Could not init PSMoveTracker.
Any idea ?
The controller was found, so that's a good start. I have some ideas about the tracker failing to init.
Does the red LED come on, or just the blue?
Open a command prompt, enter `set`, and look in the response for an environment variable called PSMOVE_CAMERA_SOMETHING_OR_OTHER . If you have that environment variable, get rid of it. I needed it for an old version of the tracker. I removed it, but then it came back on its own, which makes me think it's getting set somewhere in code or by CMake. I'd be happy to know where it came from.
I tried different libusb drivers today. Both WinUSB and libusb0 worked well for me. The camera only worked on some of my USB ports though. That was pretty surprising. Another libusb device I have also didn't work on the same ports. Maybe try that?
Try to build the up-up-stream PS3EYEDriver SDL example using MinGW64. If that works then it'll help narrow down the problem considerably.
If you do manage to fix it on your own, please take note of what you changed and post here. - FredzExplorerThanks for the follow-up, I've restarted from scratch but it still doesn't work unfortunately.
"bullale" wrote:
Does the red LED come on, or just the blue?
Only the small red LED comes on which indicates it's connected, the orb doesn't light up with test_tracker.exe, only with example.exe."bullale" wrote:
Open a command prompt, enter `set`
I didn't have the environment variable set."bullale" wrote:
I tried different libusb drivers today. Both WinUSB and libusb0 worked well for me.
Do I need to install one of these drivers or does the psmoveapi take care of that ?"bullale" wrote:
The camera only worked on some of my USB ports though.
I tried on different ports but with the same result."bullale" wrote:
Try to build the up-up-stream PS3EYEDriver SDL example using MinGW64. If that works then it'll help narrow down the problem considerably.
I'll try that, thanks."bullale" wrote:
If you do manage to fix it on your own, please take note of what you changed and post here.
I'll do.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 2 days ago