Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • in reply to: USB Button Solution #118015

    tuchwando
    Participant

    Also, a few more troubleshooting things to try:

    1) Script Executor. The computer freezing when trying to run a script in my experience has been due to the path of the script not being correct – it tries to run a script that isn’t there, and the machine locks up.
    – Test the script executor manually: With the program running, navigate a terminal to the ~/src/SARndbox-2.5/ folder (press F11 to exit fullscreen if needed) and type ./ToggleWeather.sh – This will run the script manually. Similarly you could try running a specific script in your ~/src/SARndbox-2.5/scripts/ folder
    – It’s a little strange that you don’t get the script executor as an option in the menu.

    2) USB encoder. One way to test whether the USB encoder is working is to see if you can assign a function (eg. global water etc) while the program is running, by simply pressing the buttons. First you need to comment out the button assignments in ~/.config/Vrui-4.5/Applications/SARndbox.cfg like so:

    section Vrui
        section Desktop
            #Disable the Screen Saver
            inhibitScreenSaver true
    
            inputDeviceAdapterNames += (HIDAdapter)
            
            section HIDAdapter
                inputDeviceAdapterType HID
                inputDeviceNames (USBEncoder)
    
                section USBEncoder
                    name USBEncoder
                    deviceVendorProductId 0079:0006
                    trackingDeviceName Mouse
                endsection
            endsection
    
            section MouseAdapter
                mouseIdleTimeout 5.0
            endsection
    
            section Window
                windowFullscreen true
            endsection
    
            section Tools
                toolClassNames += (ScriptExecutorTool)
    
               # section DefaultTools
               #     section WaterTool
               #         toolClass GlobalWaterTool
               #         bindings ((USBEncoder, Button0, Button1))
               #     endsection
    
    	   #     section ChangeWeather
    	   #          toolClass ScriptExecutorTool
    	   #          bindings ((USBEncoder, Button2))
    	   #          executablePathName ~/src/SARndbox-2.5/ToggleWeather.sh
    	   #          arguments ()
               #     endsection
               #  endsection
            endsection
        endsection
    endsection        
    

    If when you press a button you get a menu, the USBEncoder is working.

    • This reply was modified 3 weeks, 5 days ago by  tuchwando.
    in reply to: USB Button Solution #118012

    tuchwando
    Participant

    Hi Josh, since you don’t have the “Script Executor” option in a menu when pushing the button, you probably have an older VRUI installed.

    Assuming you have Linux and the display driver correctly installed, start fresh from Step 3 here: http://idav.ucdavis.edu/~okreylos/ResDev/SARndbox/SoftwareInstallation.html

    This will install Vrui 4.5, which has the script executor built in (old versions of Vrui didn’t have this yet).

    Patrick

    edit – i see you do have 4.5

    One small thing – your button numbers should probably start at Button0
    A second thing – the file ~/src/SARndbox-2.5/etc/SARndbox.cfg should not be the same as ~/.config/Vrui-4.5/Applications/SARndbox.cfg ; it is a place you can put options like this:

    
    # Configuration file for SARndbox application
    # Copyright (c) 2016 Oliver Kreylos
    
    section SARndbox
    	section Camera
    		# Configuration parameters for Kinect v1
    		compressDepthFrames true
    		smoothDepthFrames false
    	endsection
    
    	waterTableSize (400,300)
    	waterSpeed 1.0
    	waterMaxSteps 30
    	rainStrength 0.25
    	evaporationRate 0.0
    
    	elevationRange (-40,25)
    	rainElevationRange (25,100)
    	
    endsection
    
    • This reply was modified 3 weeks, 5 days ago by  tuchwando.
    • This reply was modified 3 weeks, 5 days ago by  tuchwando.

    tuchwando
    Participant

    OK, great. That’s exactly what I was looking for. It’s perhaps not as easy to do as using your calibration program, but I can see how it will work.

    Thanks!

    Patrick

    in reply to: joystick for local tools, part 2 #115892

    tuchwando
    Participant

    That makes sense – I guess I would need to brush up on my transformations and learn about ray casting! For now, I’m use the rain cylinder, extended it higher up in Z.

    Thanks for the reply, much appreciated!

    in reply to: joystick for local tools, part 2 #115875

    tuchwando
    Participant

    Hi – any tips on how you’d go about rendering a glyph/indicator (eg. from SixAxisTransformTool) as though it was floating 1-2 cm above the sand surface?

    Thanks in advance!

    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 8 posts - 1 through 8 (of 8 total)