joystick for local tools, part 2

Home Forums AR Sandbox Forum joystick for local tools, part 2

This topic contains 3 replies, has 2 voices, and was last updated by  tuchwando 1 month, 2 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #115817


    Hi Oliver,

    I am continuing quest for joystick control of local tools. I am able to create and bind a 2-Axis joystick (on the USB encoder suggested in this forum) to a virtual SixAxisTransform tool. I am reusing the axes for Z and rotation slots, then disabling unneeded actions using zero translate/rotate vectors in the config file.

    I have two issues for which I hope you could provide some advice:

    1) On my laptop, the glyph (eg. Cone, Cube, etc) renders fine. On my sandbox build machine, for some reason the glyph only is visible if there is a popup dialog box that appears for any reason on startup, and the glyph is only visible within the menu. It disappears if I move it off the menu. Running Mint 18.3 Mate, Vrui 4.5, Kinect 3.5, and SARndbox 2.5

    2) The glyph is clamped to the default Z-plane (the same is true for the top of the blue local rain cylinder). When moving it in X and Y, it will disappear below hills that are tall enough. My ideal goal would be to have the glyph float a fixed distance above the surface – I’m guessing I’ll have to create a tool for that? As a temporary solution, I thought to use a Z value to be higher than default – I tried setting the SixAxisTransformTool “homePosition” value in the config file, but it gives an error. For example, adding the line “homePosition (0.0,0.0,10.0)” to my SixAxisTransformTool section gives the error
    “exception: Unable to convert (0.0,0.0,10.0) to geometry::OrthonormalTransformation due to unknown token”

    Any advice would be much appreciated!




    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!


    Oliver Kreylos

    There isn’t an easy way to do that, as the transform tools are part of the underlying Vrui toolkit and don’t know about AR or sand boxes. The correct way is to create a SARndbox-specific version of the SixAxisTransformTool which knows about the sand surface, and keeps the virtual input device floating above it. That’s relatively advanced programming, though, as the sand surface is represented in (projective) depth image space, so even finding the elevation of the sand under the current device position is non-trivial as it involves casting rays into an elevation grid.



    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!

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

You must be logged in to reply to this topic.

Comments are closed.