Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Joystick as tracking device? #115681

    tuchwando
    Participant

    Hi Oliver,

    I ended up getting a SteelSeriesStratusXL, and it works using the config file you provided. I was also able to get the SixAxisTransformTool working, including setting bindings in the SARndbox config file so that they’re available when the program is run. I can move the little cone around, and add water locally at its position. Success! I found that I needed to change “ForwardedDevice0, Valuator0,…” from the SpaceTraveler example to be the name of the device itself. Could you confirm whether I have used this tool correctly in the my SARndbox config file below?

    
    section Vrui
        section Desktop
    
    	inputDeviceAdapterNames += (HIDAdapter)
    		
    	section HIDAdapter
    	        inputDeviceAdapterType HID
    		inputDeviceNames (SteelSeriesStratusXL)
    			
    		section SteelSeriesStratusXL
    			name SteelSeriesStratusXL
    			deviceVendorProductId 0111:1419
    			trackingDeviceName Mouse
    			trackingDeviceType Ray
    			axis0Settings (-2047, 0, 0,  2047)
    			axis1Settings ( 2047, 0, 0, -2047)
    			axis2Settings (-2047, 0, 0,  2047)
    			axis3Settings ( 2047, 0, 0, -2047)
    			axis4Settings (-4095, 0, 0,  4095)
    			axis5Settings (-4095, 0, 0,  4095)
    			buttonNames (Back, Home, A, B, X, Y, L1, R1, Forward, LStick, RStick)
    			valuatorNames (LStickX, LStickY, RStickX, RStickY, R2, L2, DPadX, DPadY)
    		endsection
    	endsection 
    
            section Tools
    
                section DefaultTools
    
    		section SteelSeriesStratusXLtool
                            toolClass SixAxisTransformTool
    			bindings ((SteelSeriesStratusXL,Home,A,B,X,Y), \
    			          (SteelSeriesStratusXL, LStickX, L2, LStickY, RStickX, RStickY, R2))
    		endsection
    
                    section LocalWaterTool
                        toolClass LocalWaterTool
                        bindings ((SteelSeriesStratusXL, A,B))
                    endsection
    
    		endsection
    	   endsection
         endsection
    endsection
    

    As for the other controller, I keep getting the exception “InputDeviceAdapterHID::InputDeviceAdapterHID: No match for vendorId:productId” – I can see the vendor/id using lsusb (045e:0291), and I also see it appear in /dev/input/by-id with both event-joystick and joystick entries. Any other trick I might try?

    Thanks again for your help – and thanks for this wonderful Sandbox project!

    Patrick

    in reply to: Joystick as tracking device? #115650

    tuchwando
    Participant

    Thanks Oliver for the prompt reply! Will give it a try when I get a chance.

    I’d like to make “local tools” like the local water tool available via an arcade style joystick (attached to the USB encoder described in your Button solution post) or a wireless controller. These tools use the tracking device position (currently the mouse) – is it possible in Vrui to assign a 2-axis joystick like those present on a gamepad/controller to control the mouse pointer? In principle I could keep track of the position and manage movement manually by reading from valuators/buttons, but I wanted to see if you’ve already got a solution for this kind of thing.

    in reply to: USB Button Solution #103509

    tuchwando
    Participant

    Hi All,

    I’d like to use the joystick connected to my USB Encoder (the one listed above, Reyann Zero Delay Arcade USB Encoder) to control the local water tool. That is, the user should be able to move a “pointer” around the landscape using the joystick, then press a button to cause rain to fall at the present location.

    Is there a simple way to tell Vrui to do this? I tried binding this tool to the USB encoder, but when I move the joystick, Vrui asks to bind it and I’m not sure what the correct choice is. Preferably, I want the binding to be done in the patch config file.

    I’m guessing this could be done by adding to the local water tool class, overriding the mouse position typically used in that tool. I could read from the two axes (valuators?) from the joystick, use that to control a new pointer position that I use as the rain position (location where the rain cylinder is rendered). However, I wanted to check if there was a simpler way before jumping in to modifying the code.

    Thanks in advance!

Viewing 3 posts - 1 through 3 (of 3 total)