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 15 posts - 61 through 75 (of 84 total)
  • Author
    Posts
  • #117928

    Joshua.waymire
    Participant

    Here is a link to my current code. I would very much appreciate anyone taking the time to look at it and see where i went wrong.

    https://drive.google.com/drive/folders/1StePqv84NtvaH9zFqhX02wc3Bc_wDJ6v?usp=sharing

    #117930

    ChrisVeale
    Participant

    Hey Joshua.

    When running the application, are you running the shell command or just running it from the command line?

    If you are running a .sh file, which onw are you using…I see one in the SARndbox folder and one in the scripts folder… Just make sure you are using one with a -vruiVerbose switch, this will output more details to the command window which should help us track the issue.

    in the SARndbox.cfg file I note you have an additional tab around the “changeWeather” section, not sure if tabbing makes a difference, or even if its just the google drive representation but I would check this also.

    Also I cannot see it anywhere but make sure there are the necessary files in the ~/.config/Vruix.xx/Applications folder I did have an issue with this as I had to create the folder, and knowing if it was 4.2 (in my case) or 4.20 took a trial…

    Did you register the ScriptExecutorTool as well already?

    And did you run through the “lsusb” command with the buttons connected to confirm the product ID?

    #117931

    ajy00
    Participant

    Joshua

    Had a read though and I think there may be a complication in the config file … may work for Chris but I’ve loaded mine here so you can perhaps try that 🙂
    https://drive.google.com/drive/folders/1BG8xRHoDOdPnsZuarStALO1rro1Ul_vP?usp=sharing

    Read the notes though… you’ll need to do some editing in the input graph .. but the basics should work without that anyway

    AJY

    #117932

    ajy00
    Participant

    hi

    I can’t figure why you’re getting regular crashes. I know the mobile setup i have will sometimes crash on first invocation of the weather script… but it works fine for the rest of the day, and because it’s only occasional its really hard to debug 🙁 and of course it doesn’t crash on the test rig – the only difference there is a different Kinect camera and no projector…

    I’ve so far put it down to a glitch in the graphics processor while it is warming up!! (feeble I know)

    #117933

    Joshua.waymire
    Participant

    Thank you for uploading your code @ajy. I will compare it to mine when I get to school tomorrow morning and see if I can get it working.

    #117934

    Joshua.waymire
    Participant

    @chrisveale
    When running the application, are you running the shell command or just running it from the command line?
    I am running it from a shell command that is used from the desktop as a shortcut launch for the sandbox.

    If you are running a .sh file, which onw are you using…I see one in the SARndbox folder and one in the scripts folder… Just make sure you are using one with a -vruiVerbose switch, this will output more details to the command window which should help us track the issue.
    I need more information on the -vruiVerbose switch. – I have never heard of that

    in the SARndbox.cfg file I note you have an additional tab around the “changeWeather” section, not sure if tabbing makes a difference, or even if its just the google drive representation but I would check this also.
    Thank you for noticing that as I didnt even see it.

    Also I cannot see it anywhere but make sure there are the necessary files in the ~/.config/Vruix.xx/Applications folder I did have an issue with this as I had to create the folder, and knowing if it was 4.2 (in my case) or 4.20 took a trial…
    I was curious about that myself from the reading on the forums I have done and noticed that folder didnt exist. I will create that folder in the morning. What files go in it?

    Did you register the ScriptExecutorTool as well already? – Following the forums I followed instructions on how to register the ScriptExecutorTool but it does not work on linux mint. Any ideas

    And did you run through the “lsusb” command with the buttons connected to confirm the product ID? The product ID is correct.

    #117936

    ChrisVeale
    Participant

    instead of running the sandbox application from a .sh file, copy the command line from that file, and run it from a terminal, if you add the -vruiVerbose switch to that, diagnostics will be written to the terminal window which will output hopefully something useful…

    The SARndbox.cfg needs to sit in the ~/.config/Vruix.xx/Applications folder

    Also I would expect if the registration of the ScriptExecutorTool didnt work, that may be your issue, as the vrui system will not know how to execute the .sh files…

    Chris

    #117937

    ajy00
    Participant

    Agree with Chris that you need to get the Script Exec working – and it does work in Mint … that’s what I run the box on.
    A

    #117938

    Joshua.waymire
    Participant

    @adjy00. How did you script executor tool to work? In other words, what commands in terminal did you run?

    #117939

    ajy00
    Participant

    Hi Joshua

    Exactly the ones noted in Oliver’s post at the top of this thread (https://arsandbox.ucdavis.edu/forums/topic/usb-button-solution/#post-102823), suitably edited for the installed version of Vrui:

    Download the tool class’s source code, ScriptExecutorTool.h and ScriptExecutorTool.cpp and save them into the Vrui/Tools subdirectory of the Vrui source code directory. Then run from a terminal:

    cd ~/src/<strong>Vrui-4.5-004</strong>
    make
    sudo make install
    </blockquote>

    FYI I’m running Linux Mint 19 Tara, Vrui 4.5-004 and Sandbox 2.5. All the scripts for the buttons were written under previous releases last May/June and reinstalled when I rebuilt the box with the current versions earlier this year.

    #117940

    Joshua.waymire
    Participant

    Thank you to everyone. I will look into this today while at school.

    #117950

    Oliver Kreylos
    Keymaster

    Vrui-4.5-004 already includes ScriptExecutorTool. No need to download it again and re-build.

    #117954

    Joshua.waymire
    Participant

    Ok so today I had time to sit down with it and see what if I could get it working.

    Key wise I have working:

    Key 1- Global Flood
    Key 2- Global Drain
    Key 5- Local Water
    Key 6- Local Drain

    Key 9 as Cycle weather will freeze the computer completely.
    Key 0 is the screenshot feature which I would love to get working but right now its not a necessity.

    The first problem I ran into is with the 69-USB-encoder.rules. The directories shown on the forum to set this up do not exist on my system. I did find two .rules files in the share folder of Kinect folder and in the Sandbox-2.5 folder.

    The USB encoder is not being recognized and not sure what I am doing wrong. I have attached a link to screenshots of the errors I am getting right now.

    https://drive.google.com/drive/folders/1Lsy-cGBsuX8mA-fDQKrz4xNIWjImBIGA?usp=sharing

    #117959

    ajy00
    Participant

    Joshua

    by the looks you’re trying to edit rules under the usr directory tree rather than the system. you need to literally follow the scripts in Oliver’s post .. using xed rather than pluma if that’s your text editor so it becomes …
    sudo xed /etc/udev/rules.d/69-USB-encoder.rules

    try that and let us know how it goes 🙂

    #117966

    Joshua.waymire
    Participant

    Ok, Ajy00. I edited my files using the xed command and still getting some strange readouts in terminal. I have attached a google drive link of current files that are in question. Im not quite sure what to do to get the encoder working.

    I also cannot find in the menu on the sandbox where to assign the scripts to create the link between the config file and arcade buttons.

    Sandbox files: https://drive.google.com/drive/folders/17ZveUvGnExULvwgMrC9rMSD3Y6Kpu10p?usp=sharing

Viewing 15 posts - 61 through 75 (of 84 total)

You must be logged in to reply to this topic.

Comments are closed.