08-06-2013 01:04 PM
08-06-2013 04:07 PM
class TrackerHandler : public MessageHandler {
public:
virtual void OnMessage(const Message& msg) {
const MessageBodyFrame & trackerMessage = *(MessageBodyFrame*) &msg;
const Vector3f & accel = trackerMessage.Acceleration;
cout << accel.x << " " << accel.y << " " << accel.z << " " << accel.Length() << endl;
}
virtual bool SupportsMessageType(MessageType type) const {
return Message_BodyFrame == type;
}
};
void main() {
System::Init();
Ptr<OVR::DeviceManager> pManager = *DeviceManager::Create();
Ptr<SensorDevice> pSensor = *pManager->EnumerateDevices<SensorDevice>().CreateDevice();
TrackerHandler handler;
example.pSensor->SetMessageHandler(&handler);
// Sleep and let the tracker handler receive messages, which will
// be processed in another thread
usleep(1000 * 1000 * 10);
System::Destroy();
}
08-07-2013 12:14 AM
"jherico" wrote:
Does the downward drift occur based on the time the rift has been active or the time i'ts been running in a given application? i.e. if you restart Tuscany, does the drift go away or does it persist?
"jherico" wrote:
You could try running a small test application that connects to the head tracker and reads out the raw acceleration data. This is the kind of code you need for the handler...
...
If the Rift is in it's normal orientation there should be a Y acceleration of about 9.8 and minimal values in the X and Z directions (these can actually shift wildly if you're holding it in your hands due to the reporting rate). If you're seeing bad raw values, you probably want to contact OVR support.
08-08-2013 02:37 PM
0.4949 2.6511 -9.5914 9.96334
0.531 2.6991 -9.5796 9.96674
0.5384 2.6247 -9.5514 9.92009
0.4493 2.6416 -9.584 9.95153
0.4733 2.6777 -9.5936 9.97152
0.5092 2.704 -9.5985 9.98509
0.4877 2.6487 -9.5866 9.95773
0.4621 2.5793 -9.4961 9.851
0.4807 2.5719 -9.5582 9.90984
0.4784 2.6729 -9.5508 9.9293
0.4688 2.6153 -9.5532 9.91581
0.4804 2.5909 -9.5963 9.95151
0.461 2.615 -9.6391 9.99815
0.5091 2.6991 -9.6081 9.99299
0.4468 2.6079 -9.6079 9.96557
0.4037 2.5696 -9.5792 9.92607
0.4417 2.7306 -9.6361 10.0253
0.4945 2.6581 -9.6487 10.0204
0.4564 2.6633 -9.6006 9.97361
0.4567 2.6321 -9.565 9.93105
0.4469 2.6392 -9.5793 9.94626
0.4685 2.6464 -9.5913 9.96072
0.471 2.6898 -9.5792 9.96082
0.4425 2.7164 -9.536 9.92522
0.3968 2.6636 -9.5454 9.91801
0.4063 2.5697 -9.5624 9.90999
0.4521 2.6298 -9.5364 9.90268
0.5095 2.5958 -9.5608 9.92001
0.5047 2.5958 -9.5726 9.93114
08-09-2013 09:48 AM
"tommo" wrote:
Keeping the rift on my face looking forward this is the stream:
0.4949 2.6511 -9.5914 9.96334
0.531 2.6991 -9.5796 9.96674
08-10-2013 07:08 PM
"tommo" wrote:
Hi,
I've tried a new Oculus VR on a bunch of computers and while at first it works well (usually at the first connection the Tuscany demo works as expected), after a while it invariabily "drifts" down in a matter of hours, so that "forward" becomes "down" and the axes of rotation become gimbal locked.
This makes it unusable and can't be fixed just by rotating it 90˚... so I was wondering if it's something I've been doing wrong and how to fix this 🙂
The magnetometer is calibrated, but I don't think it matters because is the pitch that drifts.
Any ideas?
08-11-2013 02:55 PM
"jherico" wrote:
*
02-18-2014 12:16 AM