Orientation with python

34 views
Skip to first unread message

flowerstrample

unread,
Jun 11, 2023, 3:36:19 AM6/11/23
to psmove
Hi. I searched the whole internet, it turns out that nothing but your psmoveapi - working normally with Python just doesn't exist.
With ctypes I get pretty much everything I need for my project with Blender, but not orientation. Studied the source code - there is no function to get the quaternion for the dll, maybe I'm wrong and someone can tell me how to do it. Maybe you can interpret the vectors you get (accelerometer/gyroscope and magnetometer) into a quaternion. It is also unclear where and how to create PS Move calibration configurations.
I use Python 3.10 and the latest version of the Windows 10 library.

Alexander Nitsch

unread,
Jun 16, 2023, 2:23:32 PM6/16/23
to psm...@googlegroups.com

> Studied the source code - there is no function to get the quaternion
> for the dll, maybe I'm wrong and someone can tell me how to do it.

Check out the header file include/psmove_fusion.h in the repository for
documentation of functions that allow you to determine the controller's
3D position and orientation.

flowerstrample

unread,
Jun 16, 2023, 2:31:47 PM6/16/23
to psmove
Solved the problem - but not directly.
Used PCMoveService -> PSMoveFreepieBridge -> FreePIE -> freepie_io_x64.dll. Of course I don't get quaternion directly - but I get Yaw, Pich, Roll.
Reply all
Reply to author
Forward
0 new messages