Ps3 move controller in OF?

Hello all,

using the ps3 motion controller, I would like to read data from it and use this inside openframeworks. In the end my purpose is to send the data by OSC to Puredata, to generate sound, but maybe also to create video from inside OF.

After some searching I am still a bit lost as to where to start and how to persue this goal. I am quite a beginner when it concerns:

  1. connecting and communicating with something external, like bluetooth, on a lower level than via a GUI, and
  2. implementing and using an api inside my own program

So far:
There is an API (http://thp.io/2010/psmove/) which uses C++, but seems to depend on Qt. I am quite unfamiliar with Qt, would it be possible to use the api inside OF?
Also (using Ubuntu 11.04 64bit) I have trouble connecting the device to my pc in the first place. Following this guide (http://www.ehow.com/how-7729420-use-ps3-controller-ubuntu.html) and changing the #define PRODUCT to the product ID for the move controller (0x03d5) I get some response, but also some errors:

  
P5K:~/Downloads$ sudo ./sixpair  
USB_REQ_GET_CONFIGURATION: Broken pipe  
Current Bluetooth master: Setting master bd_addr to 00:09:dd:50:85:30  
USB_REQ_SET_CONFIGURATION: Broken pipe  
  

I read elsewhere (https://help.ubuntu.com/community/Sixaxis) that maybe this sixpair tool is obsolete cause of new bluetooth stack versions. I am now quite at odds with how to find and connect with the controller…

Maybe this is not exactly the right place to ask about this. I am just looking for some pointers on how to persue my goal of importing data from the controller into my application, and thought this could be a start…

Anyone have an idea or some experience in this direction?

In case anyone is interested in this: I have (after seeking advice from the author of the psmoveapi) successfully connected a ps3 move controller to my pc (Ubuntu 12.04 64 bits). Using the psmoveapi (see link in previous post) I can now retrieve data from the controller and set the light for the LED bulb from inside an Openframeworks app. It seems to work fine an has low latency so far.

I plan on writing a small class as a wrapper around the psmoveapi for use inside an OF application. So you can have a psmove object inside an OF application. Also I will write a blog post about how I got this to work on Linux. It will probably take a while though. Anyone with a more urgent interest feel free to ask.

I took a quick look at the code/github and it looks like Qt is just used to show how to use it in C++. Hopefully you can find OF equivalents if you are going for an addon. Good luck!

Hey can u plz guide me the detailed step for using somny
motion controller in ubuntu 11.04

Hello mennowo, I am in urgent interest of using psmove inside an openframeworks app, I see there is an ofxPSMove addon, but seems to be incomplete, and without much activity lately. I just begun so I haven’t tried any of the options yet, I am going to try ofxPSMove anyway, but psmoveapi seems to be more robust. Do you have any advice on using psmoveapi or ofxPSMove? thanks!

I managed to get psmove working in an openframeworks app. I used PSMoveService to pair the controllers, then I had to recompile a few dependency libraries, because PSMoveService was runtime library was /MT and Openframeworks is /MD.
Then I added dependencies and libraries to the openframeworks app, based on how the test_psmove_controller project was, some unresolved external libraries errors came out, so I ended up copy/pasting the cpp files from that project to the openframeworks app. (I know this is horrible, but given the deadline, it works for me).

Hi Jonathan,
good to hear you got it working. I only saw this post this week, sorry for not replying. It is a long long time back that I was building this, I think I could have been of little help… I found the ps3move api was quite orderly and easy to work with. Hope your project worked out nicely!
Menno