r57zone / OpenVR-ArduinoHMD

OpenVR driver for Arduino DIY HMD / OpenVR самодельного Arduino шлема

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Help...: Head Tracking by USB HID or COM_PORT (MOD FOV HMD 90º @ 135º FOV)

AnonymousVR-VR opened this issue · comments

Hello r57zone, I want to thank you for all the content you have about OpenVR, I am using your drivers to be able to use my modified viewer @ 135ºFOV, you can see the MOD from this website.

https://www.realovirtual.com/foro/topic/51245/mod-visor-vr-los-90o-fov-135o-fov-anonymous-vr

I had the challenge of rotating the screens in SteamVR, after doing the MOD my tilted screens projected the crossed images, "as if cross-eyed".

I have used its controller and with the "GetProjectionRaw" function, I have managed to modify the images of the screens independently for each eye.

The viewer that I am using has a 3DOF IMU per USB HID port, it sends up to 32 data in 8 bits with values ​​from 0 to 255.

I don't have enough knowledge to create a USB HID connection with your controller, maybe you can help me on this, you have programming experience.

I'm also thinking of using its COM_PORT connection to the Arduino and sending the data from the USB HID.

How are you sending the data from the Arduino through the COM_PORT?

Can you give me an example of the data and its order of sending to the driver? I understand that you send 3 data from the IMU, I have up to 32 to send, but really many are for the accelerometers, but if I have up to 10 different data that I can use for head movements, some data is in degrees and other data is raw, the IMU controller, it gives different data for the same movement.

Capturadata

Thanks for your attention.

Maybe it would be easier for you to use a config file to change GetProjectRaw angle? What code are you using?

Maybe it would be easier for you to use a config file to change GetProjectRaw angle? What code are you using?

Are you saying from the original viewer driver, from the default.vrsetings file?
Is that possible?

virtual void GetProjectionRaw( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom )
if (eEye == Eye_Left) {} else {}}

You only have to add the functions for each eye and not in a general way.
Captura

The problem with the tilted images is solved for now, now I have problems to be able to use the Tracking for the head as I have commented in the post.

The function of reading data from the Arduino, you can add an additional field to the Arduino, add a couple of cells to the float array. Then you can read it here.
https://github.com/r57zone/OpenVR-ArduinoHMD/blob/master/OpenVR/samples/driver_arduinohmd/driver_arduinohmd.cpp#L152-L183

To send data to the Arduino you need to use the WriteFile function and use the same arguments as ReadFile.

COM read and write.zip

Hello, I am not going to use an Arduino, I want to use the USB HID connection of the viewer that sends the 32 8-bit data from its IMU, which I have shown you in the example of the post, to communicate with your OpenVR-ArduinoHMD controller.

I was wondering if you know how to make a USB HID connection in your ArduinoHMD controller?

What about the configuration file to change the angle of GetProjectRaw? The example of the GetProjectRaw function is in the post.

It is possible that I do not explain myself well, I am translating from Spanish to English with google.

How is the data sent format, can it be like this?

012 234 205

or

012
234
205

How is the order and what is its format, is it in degrees from 0 to 180 in degrees?

thanks for your attention

USB read - https://github.com/r57zone/DSAdvance/blob/master/Source/DSAdvance/DSAdvance.cpp#L185-L213
USB write - https://github.com/r57zone/DSAdvance/blob/master/Source/DSAdvance/DSAdvance.cpp#L52-L70

GetProjectRaw maybe in the future I will add.

I don’t know why to make USB, it’s quite difficult to imitate a USB device and it’s unlikely that someone will do it.

Transmission is in degrees yes, 3 float values, in binary format, from 180 to -180.

I don’t know why to make USB, it’s quite difficult to imitate a USB device and it’s unlikely that someone will do it.

Transmission is in degrees yes, 3 float values, in binary format, from 180 to -180.

My viewer has 2 cables, 1 is HDMI and the other is USB where it delivers the head tracking data, I have to use the USB or create a program and send the data through the COM port to your controller.

Binary data like this 1111011?

USB_HID.zip

I have created this USB HID connection, to use it you must add the VID and PID of your device.

handle = hid_open(0x2833, 0x0001, NULL);

0x2833, 0x0001 These are the data for my communication with the head tracking.

Captura

These data are Hex

Binary data is not a text format, it is a set of 16 arithmetic numbers like B3A2C5F0, only the program can read it, in my driver binary reading of 3 float values ​​from the com port sent by Arduino is done.

If you want to make support vrtek in the driver, you first need to read this data from the tracker, probably there is a quaternion, 4 float or 4 double values, read a buffer of 4 such values ​​and output to the program, then convert the euler angles to an angle and use. You can also use the OpenVR-OpenTrack driver and just send the euler angles over UDP.

I would be happy to help you, but blindly and without such a tracker, I can not do anything.

I would be happy to help you, but blindly and without such a tracker, I can not do anything.

Thank you very much for your attention and help.

I am requesting help for this other topic, maybe you can help.

Modify GetProjectionRaw from a console application

a greeting