Jump to content

hotas-vr-controller v1.0.0


Copprhead

Recommended Posts

An OpenVR driver that allows the hands-free use of your regular VR controllers, so that you can keep your Hands On Throttle And Stick (HOTAS).

Your hands are the most intuitive way to interact with a virtual clickable cockpit in VR. A regular VR controller is a good way to click buttons, flick switches or rotate a knob. But when it comes to flight controls the use of a physical joystick and throttle are vital for precise flying. But it's tedious to constantly switch your hands between the VR controllers and the physical joystick or throttle as you can't hold them at the same time. True hand tracking would be the solution, but unfortunately, this is in most cases not (yet) reliable and for most of us also not an obtainable solution.

hotas-vr-controller is an OpenVR driver that allows modifying the position and the orientation of your regular VR controllers. This makes it possible to strap the regular VR controllers to the back of your hands or your lower arm, while the virtual hands still appear in the correct position and orientation. In this position, it is not possible to use the normal buttons of the VR controllers. Instead, hotas-vr-controller captures mouse clicks to emulate the grip and the trigger inputs of the VR controllers. "Finger mouse" devices (small mouse devices typically used for presentations) can be worn on the index fingers of both hands to trigger these actions.

hotas-vr-controller.png

This configuration enables a fluid transition of your hands between a physical joystick or throttle and the hand interactions with the virtual clickable cockpit.

Screen_210228_213952.jpg

So far it's only tested with a HP Reverb G2, but it should work with any OpenVR compatible tracked device associated with the left hand or right hand and with a grip and trigger input.

Visit https://github.com/Copprhead/hotas-vr-controller to download the latest release!


Edited by Copprhead
Link to comment
Share on other sites

It might not be better but it's a new option to have for sure. Great work!

Win11 Pro 64-bit, Ryzen 5800X3D, Corsair H115i, Gigabyte X570S UD, EVGA 3080Ti XC3 Ultra 12GB, 64 GB DDR4 G.Skill 3600. Monitors: LG 27GL850-B27 2560x1440 + Samsung SyncMaster 2443 1920x1200, HOTAS: Warthog with Virpil WarBRD base, MFG Crosswind combat pedals, TrackIR4, Rift-S.

Personal Wish List: A6 Intruder, Vietnam theater, decent ATC module, better VR performance!

Link to comment
Share on other sites

6 hours ago, TimberWolf said:

Not sure how this is any better than PointCTRL?

I mean... it might be obtainable?

SYS : RYZEN 9 5950X + Crosshair VIII Hero + RTX 3090 FE 32GB + TridentZ NEO 32GB 3600MHz + FireCuda 520 1TB

VR Pimax 8KX : DCS 1.0, VR, Steam 100% (3148x3160), FOV 120 degrees || Quest2 || Index || Reverb G2

SIM : DCS || Star Wars Squadrons || Rise of Flight || IL2 Battle of Stalingrad || Elite Dangerous || Star Citizen

DCS: Textures & Terrain High, Water & Vis Medium, Heat Blur Low, Shadows Medium, MSAA 2x, DoF OFF, Lens Flare Only, Motion Blur Off, SSAA & SSLR Off, Clutter 170, Trees 66%, Smoke 0, Anisotropic 2x, Terrain Shadows Flat, Cockpit Global Illumination On

PIT : VKB Gunfighter base + VKB F14 grip || VKB Kosima grip + Virpl TC50 CM3 throttle + Logitch G pedals + Pimax Leap Motion hand tracking + SimShaker feedback

Link to comment
Share on other sites

5 hours ago, TimberWolf said:

Not sure how this is any better than PointCTRL?

 

I don't have PointCTRL so I can't really answer that.

 

The virtual VR controllers interacts with the cockpit just like your physical controllers does when you grab it to flip a switch. It just gets rid of the grabbing part. 

  • With the VR controller you're not pointing with your hand, instead the actual position of your hands are tracked in 3d space including the pitch, roll, yaw orientation. 
  • You see the hands moving in the cockpit.
  • Tracking is done by your VR system, so if your system uses base stations you don't have to look in the direction of your hand to use it. 
  • The only additional hardware you need is something that allows you to initiate the "trigger and "grip" action. You could use voiceattack or some buttons on throttle/stick that you can press with the opposite hand.
  • You can use both hands at the same time (maybe useful for RIOs?)

However the use of VR controllers has some drawbacks:

  • You need to have enough space around you to actually move your hand to reach all switches in the cockpit. You can't just put your throttle and stick on a table in front of you as your hand would constantly bumps into the table. Ideally your throttle and stick are located were they are in the aircraft you're flying, so they don't block your hand. 
  • In my opinion the DCS implementation of controller interaction could be improved, mainly regarding the grip and click action for two-way switches. The mouse implementation seems to be more flawless in that regard.

 

Link to comment
Share on other sites

Very interesting project! Thanks for sharing!

 

9 hours ago, Copprhead said:

... needs to be make it configurable to support different controller arrangements (adjustable offset, assignable buttons for trigger/grip).

 

Do I get this right? The offset must/should be adjusted every time you "mount" the controller on your hand/arm because you might wear it a little different every time?

 

I never use my controllers in VR (o.k. I tried them once or twice), but I have to give them a try next time and try how to wear them with some comfort 😉

Link to comment
Share on other sites

6 minutes ago, Kansti said:

Do I get this right? The offset must/should be adjusted every time you "mount" the controller on your hand/arm because you might wear it a little different every time?

 

It obviously depends on the strapping solution you use whether the controllers are more or less in the same place. Offset depends on the physical controller, a Index controller needs a different offset than a WMR controller. You might want to use the right physical controller on your left hand or mount it upside down. Whatever is more comfortable to wear.

 

Maybe some 3d printer parts could help there, but for the proof of concept I just used what I had available. 

 

Also having a correct offset is more like a bonus than a necessity. Your brain can quickly compensate small errors in the offset, especially as you see the 3d hand models.

It took me some days to solve the math behind the offset calculation, so at first I used it without any offset and now I have a hardcoded offset with more or less correct position but still a somewhat incorrect rotation. 

Finding the correct offset is also a bit try-and-error as you don't not the neutral position of your controllers. Some "calibration" procedure should be possible to automatically detect the correct offset.

Link to comment
Share on other sites

This is a clever solution to problem we have. But I see this is a solution as well that would have very much benefitted from the tracking systems where manufacturers would have allowed to make a custom trackers and program them to work as we think. Like make a ring system where you have three IR leds, one in finger tip, one as ring and then at the knuckle, and use this three points to create the finger direction and distance. Or have just two IR leds with index finger and thumbnail position to just track two fingers tips and support "pinching" as well.

 

Interesting that it is possible to generate a false controller off-set by using real controller as tracker, but it is impossible to tap in the cameras feed and receive from there the IR leds positions. As even just a one IR LED in index finger nail would be enough to move the mouse cursor around.

 

https://www.researchgate.net/publication/228420821_Inverse_kinematic_infrared_optical_finger_tracking

 

If we get a visual indicator of the virtual off-set position, it is already a lot.

i7-8700k, 32GB 2666Mhz DDR4, 2x 2080S SLI 8GB, Oculus Rift S.

i7-8700k, 16GB 2666Mhz DDR4, 1080Ti 11GB, 27" 4K, 65" HDR 4K.

Link to comment
Share on other sites

11 hours ago, Fri13 said:

If we get a visual indicator of the virtual off-set position, it is already a lot.

 

In SteamVR View you can see the physical and the virtual controller. The WMR Controllers are the physical ones, the Vive Controller is the virtual controllers with the offset.

 

SteamVRView.jpg

 

 

Link to comment
Share on other sites

Good news and bad news. After I added controller rotations for all axis I encountered the problem that DCS refused to use my virtual controller and always switched to the phyiscal controller. As I can't influence what DCS is doing, the whole concept of the virtual controller is on the rocks!

 

Now the good news: I managed to "hook" (https://en.wikipedia.org/wiki/Hooking) my own code between the calls of the OpenVR interface and the actual driver of the pyhsical devices. By this I don't need to add a virtual twin of the controllers, instead I can directly manipulate the controller information that the driver is reporting to SteamVR.

 

The new concept is much more stable and less of a workaround. At the moment I verified that I can influence the controller position and orientation and press/release trigger and grip when certain keyboard keys are pressed. And as there are only 2 controllers, DCS is no longer confused. Next steps are to make these things configurable and add logic to distinguish between trigger and grip of left and right controller.

 

Current source code is added to github.


Edited by Copprhead
  • Like 1
Link to comment
Share on other sites

FWIW, I've been working on something similar - using the Leap to create VR mouse input (because I don't actually like DCS VR controls even when they do work). We share some of the same issues around how to get button input - that finger mouse is big, and you want something on your finger that can send a variety of inputs.

 

In case it helps, some of the things we've found:

  • The North Loop controller is by far and away the best option here, but you can't get it anymore (I am lucky enough to have one)
     
  • Kokuyo Presenter - a ring-sized thing that sends B, Page Up, and Page Down; this is still a bit bulky, but is relatively cheap. It only sends keyup events for PgUp and Down, whereas for 'B' you get both keydown and keyup events - DCS makes it easy to map these inputs to mouse inputs though
     
  • One solution is to take a wireless mouse apart, put it further back on the hand, and wire the buttons to a smaller ring on your finger
     
  • The standalone Vive tracker has pogo pins on it that you can short to send button presses; you can see instructions on how to turn it into a glove with etextile buttons here.
     
  • I'm in the midst of making some PCBs to do it myself with a five-direction switch - early stages, but I'll share more when I'm done.
    image.png
     

 

 

  • Thanks 1
Link to comment
Share on other sites

@frenzon thanks you for the ideas. The "click device" is still a weakness of the concept. Also because it's an initial hurdle to get a suitable device.

 

I've choosen the finger mouse because it is very cheap and I knew that I can capture the clicks, which is uncertain for things like "volume up/down" on Bluetooth remote devices.

 

It turned out to be quite complicated to capture, distinguish and remap click events from multiple connected mice, but its possible and instruction for that will follow later.

 

The finger mouse has 2 buttons and a wheel. One button I use to grip, the other is grip+trigger (so I don't have to press both buttons to flip a switch) and I plan to use the wheel for rotary controls. 

 

There are "bluetooth ring remote control" (google it) that are also cheap and much smaller, but I'm not sure if it's possible to capture and remap the buttons.

 

 

Link to comment
Share on other sites

54 minutes ago, Copprhead said:

There are "bluetooth ring remote control" (google it) that are also cheap and much smaller, but I'm not sure if it's possible to capture and remap the buttons.


Yeah I have a bunch of them from researching this - they are all uniformly terrible; they don't pair with Windows well, the latency is high and random (press a button four times, get two to four events one to five seconds later), and they send super weird key events that Windows doesn't recognize (whereas the Loop uses regular BLE GATT services, which makes it much easier to deal with).

The search continues 🙂

Link to comment
Share on other sites

28 minutes ago, frenzon said:


Yeah I have a bunch of them from researching this - they are all uniformly terrible; they don't pair with Windows well, the latency is high and random (press a button four times, get two to four events one to five seconds later), and they send super weird key events that Windows doesn't recognize (whereas the Loop uses regular BLE GATT services, which makes it much easier to deal with).

The search continues 🙂

 

Good to know, so I don't waste any time on them 😅

 

Just added the missing features (destinguish clicks for left and right hand ) and applied (almost) correct position and rotation offset values. Ready for a test flight 😎

 

 

Hands on throttle and stick:

Screen_210228_213952.jpg

Flat hands pressed against each other:

Screen_210228_213952b.jpg

 


Edited by Copprhead
Link to comment
Share on other sites

Looking for a spot to post my input experiments so I thought I'd throw it in here.  I had purchased a finger mouse which hasn't turned up, but have landed on this which I am liking so far, gives Left right mousewheel and the ability to move independent of my head. Seems solid and easy to locate behind the throttle: https://www.amazon.com.au/KENSINGTON-72337-Orbit-Wired-TRACKBALL/dp/B002OOWB3O/ref=asc_df_B002OOWB3O/?tag=googleshopdsk-22&linkCode=df0&hvadid=341743940079&hvpos=&hvnetw=g&hvrand=15732342607542282166&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9071657&hvtargid=pla-434709043369&psc=1

 


Edited by shu77

Hornet, Super Carrier, Warthog & (II), Mustang, Spitfire, Albatross, Sabre, Combined Arms, FC3, Nevada, Gulf, Normandy, Syria AH-6J

i9 10900K @ 5.0GHz, Gigabyte Z490 Vision G, Cooler Master ML120L, Gigabyte RTX3080 OC Gaming 10Gb, 64GB RAM, Reverb G2 @ 2480x2428, TM Warthog, Saitek pedals & throttle, DIY collective, TrackIR4, Cougar MFDs, vx3276-2k

Combat Wombat's Airfield & Enroute Maps and Planning Tools

 

cw1.png

Link to comment
Share on other sites

Hey apologies yes that would be a better spot for it 🙂

Hornet, Super Carrier, Warthog & (II), Mustang, Spitfire, Albatross, Sabre, Combined Arms, FC3, Nevada, Gulf, Normandy, Syria AH-6J

i9 10900K @ 5.0GHz, Gigabyte Z490 Vision G, Cooler Master ML120L, Gigabyte RTX3080 OC Gaming 10Gb, 64GB RAM, Reverb G2 @ 2480x2428, TM Warthog, Saitek pedals & throttle, DIY collective, TrackIR4, Cougar MFDs, vx3276-2k

Combat Wombat's Airfield & Enroute Maps and Planning Tools

 

cw1.png

Link to comment
Share on other sites

what would be nice would be if the stick or throttle axis moved, the virtual hands would snap to the visual in the cockpit, this would make the presentation better for the player. This would also make it less important to have your controls perfectly aligned. Something similar to how No Man's Sky does it.

Sent from my Samsung Chromebook Plus using Tapatalk

  • Like 1

F-14B, F-16, F-18C, A-10C, F-5E, F-86, FC3, BF-109, FW-190, P-51, Spitfire, UH-1,AJS-37 Viggen, MIG-15, MIG-19, MIG-21, AV-8B Harrier, P-47D

Persian Gulf, Caucuses, NTTR, Normandy, The Channel, Syria

Combined Arms, WWII Assets,Super Carrier

TM Warthog, Virpil VFX,BuddyFox UFC, Saitek Pro Flight quadrant & Switch Panel, Odyssey+ VR, Jet Pad w/ SSA, Voice Attack w/Viacom Pro

GeForce RTX2080TI OC, Intel Core i7-7700K 4.5Ghz, 64GB DDR4, Dedicated 1TB SSD

Link to comment
Share on other sites

  • Copprhead changed the title to hotas-vr-controller v1.0.0

Sorry for the potato video quality 😅

Shows the transition between physical joystick and virtual cockpit.

 

Also testing upcoming feature:

  • Use one button to move switch up and another button to move switch down. (So you don't need to rotate the controller to get the "blue laser", also avoids accidentally engagement of secondary action of hook and gear handle)
  • Support mouse wheel for rotating knobs. Rotation speed increases the more you scroll to allow precise single steps and also fast rotation. Still some fine tuning ahead.

Note that The "grip input" of the controller is automatically activated when you click a bottom or scroll the wheel. 

 

  • Like 1
Link to comment
Share on other sites

Im thankful this community share these things

i5 8400 | 32 Gb RAM | RTX 2080Ti | Virpil Mongoose T-50 base w/ Warthog & Hornet sticks | Warthog throttle | Cougar throttle USB | DIY Collective | Virpil desk mount | VKB T-Rudder Mk IV | Oculus Rift S | Buddy-Fox A-10 UFC | 3x TM MFDs | 2x bass shakers pedal plate| SIMple SIMpit chair | WinWing TakeOff panel | PointCTRL v2 | Andre JetSeat | Winwing Hornet UFC | Winwing Viper ICP

FC3 - Warthog - F-5E - Harrier - NTTR - Hornet - Tomcat - Huey - Viper - C-101 - PG - Hip - SuperCarrier - Syria - Warthog II - Hind - South Atlantic - Sinai - Strike Eagle

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...