USB Button Solution

Home Forums AR Sandbox Forum USB Button Solution

This topic contains 83 replies, has 21 voices, and was last updated by  ajy00 4 days, 8 hours ago.

Viewing 9 posts - 76 through 84 (of 84 total)
  • Author
    Posts
  • #117972

    ajy00
    Participant

    Joshua

    On a quick scan I can’t see anything that jumps out … can you share the output from running with -Vruiverbose (as Chris described in earlier post … ~/src/SARndbox-2.5$ ./bin/SARndbox -uhm -fpv -Vruiverbose)
    so that we can perhaps see if there’s anything reported there.
    It might also be useful if you posted your “strange readouts in terminal”.

    As to linking buttons – once implemented they will effectively appear as ‘keys’ to be assigned when pressed, and you will see the Tool Selection menu – use ‘Utility/Script Executor’. Image shared here https://drive.google.com/file/d/1O9EXaHaoqSs3Tjap-xMZQ0RMBYJir9l_/view?usp=sharing

    A

    #117976

    Joshua.waymire
    Participant

    I have attached the Vruiverbose readout. Not exactly sure what is on the readout but maybe on of you can see what I am doing wrong. I have linked the file for you to review.
    VruiVerbose readout through terminal.
    https://drive.google.com/file/d/1U__TQyQzuN1-wCg4JB4s-A_BeX_FUuHX/view?usp=sharing

    I dont see a script executor in my utility submenu.
    https://drive.google.com/file/d/1U__TQyQzuN1-wCg4JB4s-A_BeX_FUuHX/view?usp=sharing

    #117980

    ajy00
    Participant

    Joshua

    Well it looks like the system is running though as expected. The only thing puzzling me is the vruiverbose output is referencing two windows defined in config, whilst the SARndbox.cfg file you have ( and there seem to be a few copies in your Google Drive files) references a single window. I guess the question is are you sure that the SARndbox.cfg file is the one from your /home/warren/.config/Vrui-4.5/Applications/SARndbox.cfg location?

    On the Script Executor .. not sure if you meant to attach an image … What happens when you pres an unassigned key? what menu are you offered?
    A

    #117982

    Joshua.waymire
    Participant

    I apologize but I needed to revise this post:

    I have attached the Vruiverbose readout. Not exactly sure what is on the readout but maybe on of you can see what I am doing wrong. I have linked the file for you to review.
    VruiVerbose readout through terminal.
    https://drive.google.com/file/d/1U__TQyQzuN1-wCg4JB4s-A_BeX_FUuHX/view?usp=sharing

    I dont see a script executor in my utility submenu.
    https://drive.google.com/file/d/18znpph82kLwwPd5sbMEukzFmqLddUIwa/view?usp=sharing

    #118009

    sewamobilsemarang
    Participant

    good ideas bro sewa mobil semarang

    #118011

    Joshua.waymire
    Participant

    Ok guys and girls,

    I have went over and over my code and still cannot find why my USB encoder is not working. Is there any kind soul that will review my code and see where Im going wrong? Thank you so much in advance. The kids are getting anxious and there may be a mutany if I dont get it running right soon. 😉

    Thanks,
    Josh

    #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 4 days, 15 hours ago by  tuchwando.
    • This reply was modified 4 days, 14 hours ago by  tuchwando.
    #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 4 days, 14 hours ago by  tuchwando.
    #118029

    ajy00
    Participant

    Agree the steps from tuchwando … though might I suggest that because ScroptExecutor isn’t there, it really would be a plan to re-install Vrui – if not bite the bullet and start afresh with a new clean version of the build

Viewing 9 posts - 76 through 84 (of 84 total)

You must be logged in to reply to this topic.

Comments are closed.