Ejemplo n.º 1
0
def start():

    ## init scenegraph
    scenegraph = avango.gua.nodes.SceneGraph(Name="scenegraph")

    ## init solar system
    solarSystem = SolarSystem()
    solarSystem.my_constructor(scenegraph.Root.value)

    ## init navigation technique
    navigation = SteeringNavigation()
    navigation.set_start_transformation(
        avango.gua.make_trans_mat(0.0, 0.1,
                                  0.3))  # move camera to initial position

    if NAVIGATION_MODE == "Spacemouse":
        deviceInput = NewSpacemouseInput()
        deviceInput.my_constructor("gua-device-spacemouse")

        navigation.my_constructor(
            deviceInput.mf_dof, 0.1,
            1.0)  # connect navigation with spacemouse input

    elif NAVIGATION_MODE == "Keyboard":
        deviceInput = KeyboardInput()
        deviceInput.my_constructor("gua-device-keyboard")

        navigation.my_constructor(
            deviceInput.mf_dof)  # connect navigation with keyboard input

    else:
        print("Error: NAVIGATION_MODE " + NAVIGATION_MODE + " is not known.")
        return

    print_graph(scenegraph.Root.value)

    ## init viewing setup
    viewingSetup = SimpleViewingSetup(scenegraph, "mono")
    viewingSetup.connect_navigation_matrix(navigation.sf_nav_mat)
    navigation.set_rotation_center_offset(viewingSetup.get_head_position())

    viewingSetup.run(locals(), globals())
Ejemplo n.º 2
0
def start():

    ## create scenegraph
    scenegraph = avango.gua.nodes.SceneGraph(Name = "scenegraph")

    ## init scene
    scene = Scene(PARENT_NODE = scenegraph.Root.value)


    ## init navigation technique
    keyboardInput = KeyboardInput()
    keyboardInput.my_constructor("gua-device-keyboard0")

    steeringNavigation = SteeringNavigation()
    steeringNavigation.my_constructor(keyboardInput.mf_dof, keyboardInput.mf_buttons) # connect steering navigation with keyboard input


    ## init viewing setup
    viewingSetup = SimpleViewingSetup(SCENEGRAPH = scenegraph, STEREO_MODE = "mono")
    #viewingSetup = SimpleViewingSetup(SCENEGRAPH = scenegraph, STEREO_MODE = "anaglyph")
    viewingSetup.connect_navigation_matrix(steeringNavigation.sf_nav_mat)
    steeringNavigation.set_rotation_center_offset(viewingSetup.get_head_position())


    ## init manipulation techniques    
    manipulation_manager = ManipulationManager()
    manipulation_manager.my_constructor(PARENT_NODE = viewingSetup.navigation_node, SCENE_ROOT = scenegraph.Root.value, TARGET_LIST = scene.target_list)


    print_graph(scenegraph.Root.value)

    ## start application/render loop
    viewingSetup.run(locals(), globals())
Ejemplo n.º 3
0
def start():

    ## create scenegraph
    scenegraph = avango.gua.nodes.SceneGraph(Name="scenegraph")

    ## init solar system
    solar_system = SolarSystem()
    solar_system.my_constructor(scenegraph.Root.value)

    ## init navigation technique
    steering_navigation = SteeringNavigation()
    steering_navigation.set_start_transformation(
        avango.gua.make_trans_mat(0.0, 0.1, 0.3))

    if NAVIGATION_MODE == "Spacemouse":
        deviceInput = SpacemouseInput()
        deviceInput.my_constructor("gua-device-spacemouse")

        steering_navigation.my_constructor(
            deviceInput.mf_dof, deviceInput.mf_buttons,
            1.0)  # connect navigation with spacemouse input

    elif NAVIGATION_MODE == "New Spacemouse":
        deviceInput = SpacemouseInput()
        deviceInput.my_constructor("gua-device-spacemouse")

        steering_navigation.my_constructor(
            deviceInput.mf_dof, deviceInput.mf_buttons,
            0.2)  # connect navigation with spacemouse input

    elif NAVIGATION_MODE == "Keyboard":
        deviceInput = KeyboardInput()
        deviceInput.my_constructor("gua-device-keyboard0")

        steering_navigation.my_constructor(
            deviceInput.mf_dof,
            deviceInput.mf_buttons)  # connect navigation with keyboard input

    else:
        print("Error: NAVIGATION_MODE " + NAVIGATION_MODE + " is not known.")
        return

    # setup viewer
    viewingSetup = SimpleViewingSetup(scenegraph, "mono", False)
    #viewingSetup = SimpleViewingSetup(scenegraph, "anaglyph", False)
    viewingSetup.connect_navigation_matrix(steering_navigation.sf_nav_mat)
    steering_navigation.set_rotation_center_offset(
        viewingSetup.get_head_position())

    viewingSetup.run(locals(), globals())
Ejemplo n.º 4
0
def start():


    ## create scenegraph
    scenegraph = avango.gua.nodes.SceneGraph(Name = "scenegraph")
    #physics = avango.gua.nodes.Physics()

    ## init scene
    scene = Scene(PARENT_NODE = scenegraph.Root.value)
    #scene.Physics.value = physics


    ## init navigation technique
    deviceInput = NewSpacemouseInput()
    deviceInput.my_constructor("gua-device-spacemouse")
        
    steeringNavigation = SteeringNavigation()
    steeringNavigation.my_constructor(deviceInput.mf_dof, deviceInput.mf_buttons, 0.15, 1.0) # connect navigation with spacemouse input
    steeringNavigation.set_start_matrix(avango.gua.make_trans_mat(-2.1, 0.96, 0.705))

    ## init viewing setup
    ## init viewing and interaction setups
    hostname = open('/etc/hostname', 'r').readline()
    hostname = hostname.strip(" \n")
    
    print("wokstation:", hostname)

    if hostname == "medusa": # Samsung 3D-TV workstation
        _tracking_transmitter_offset = avango.gua.make_trans_mat(-2.1, 0.96, 0.705) * avango.gua.make_rot_mat(90.0, 0, 1, 0) * avango.gua.make_rot_mat(90.0, -1, 0, 0) # transformation into tracking coordinate system

        viewingSetup = MultiUserViewingSetup(
            SCENEGRAPH = scenegraph,
            WINDOW_RESOLUTION = avango.gua.Vec2ui(1400, 1050),
            SCREEN_DIMENSIONS = avango.gua.Vec2(1.135, 0.85),
            SCREEN_MATRIX = avango.gua.make_trans_mat(-2.1, 0.96, 0.705) * avango.gua.make_rot_mat(90.0, 0, 1, 0) * avango.gua.make_rot_mat(90.0, -1, 0, 0),
            # TRACKING_TRANSMITTER_OFFSET = _tracking_transmitter_offset,
            LEFT_POSITION = avango.gua.Vec2ui(0, 0),
            LEFT_RESOLUTION = avango.gua.Vec2ui(1400, 1050),
            RIGHT_POSITION = avango.gua.Vec2ui(1400, 0),
            RIGHT_RESOLUTION = avango.gua.Vec2ui(1400, 1050),
            DISPLAY_STRING_LIST = [[":0.0"], [":0.1"], [":0.2"]], # 3 user slots (left and right eye on same GPU)
            WARP_MATRIX_RED_RIGHT = "/opt/dlp-warpmatrices/dlp_6_warp_P1.warp",
            WARP_MATRIX_GREEN_RIGHT = "/opt/dlp-warpmatrices/dlp_6_warp_P2.warp",
            WARP_MATRIX_BLUE_RIGHT = "/opt/dlp-warpmatrices/dlp_6_warp_P3.warp",
            WARP_MATRIX_RED_LEFT = "/opt/dlp-warpmatrices/dlp_6_warp_P1.warp",
            WARP_MATRIX_GREEN_LEFT = "/opt/dlp-warpmatrices/dlp_6_warp_P2.warp",
            WARP_MATRIX_BLUE_LEFT = "/opt/dlp-warpmatrices/dlp_6_warp_P3.warp",
            )

        viewingSetup.init_user(HEADTRACKING_SENSOR_STATION = "tracking-dlp-glasses-1")
        viewingSetup.init_user(HEADTRACKING_SENSOR_STATION = "tracking-dlp-glasses-2")
        viewingSetup.init_user(HEADTRACKING_SENSOR_STATION = "tracking-dlp-glasses-3")

        # manipulationManager = ManipulationManager()
        # manipulationManager.my_constructor(
        #     SCENEGRAPH = scenegraph,
        #     NAVIGATION_NODE = viewingSetup.navigation_node,
        #     POINTER_TRACKING_STATION = "tracking-pst-pointer-1",
        #     TRACKING_TRANSMITTER_OFFSET = _tracking_transmitter_offset,
        #     POINTER_DEVICE_STATION = "device-pointer-1",
        #     HEAD_NODE = viewingSetup.head_node,            
        #     )
            
    else:
        print("No Viewing Setup available for this workstation")
        quit()

    # viewingSetup.connect_navigation_matrix(steeringNavigation.sf_nav_mat)
    # steeringNavigation.set_rotation_center_offset(viewingSetup.get_head_position())

    print_graph(scenegraph.Root.value)

    # leap = LeapSensor()
    # leap.my_constructor(SCENE = scene, SCENEGRAPH = scenegraph, TRACKING_TRANSMITTER_OFFSET = _tracking_transmitter_offset)

    ## start application/render loop
    viewingSetup.run(locals(), globals())
Ejemplo n.º 5
0
def start():

    ## create scenegraph
    scenegraph = avango.gua.nodes.SceneGraph(Name="scenegraph")

    ## init scene
    scene = Scene(PARENT_NODE=scenegraph.Root.value)

    ## init navigation technique
    deviceInput = NewSpacemouseInput()
    deviceInput.my_constructor("gua-device-spacemouse")

    steeringNavigation = SteeringNavigation()
    steeringNavigation.my_constructor(
        deviceInput.mf_dof, deviceInput.mf_buttons, 0.15,
        1.0)  # connect navigation with spacemouse input
    steeringNavigation.set_start_matrix(
        avango.gua.make_trans_mat(0.0, 0.2, 0.25))

    ## init viewing setup
    ## init viewing and interaction setups
    hostname = open('/etc/hostname', 'r').readline()
    hostname = hostname.strip(" \n")

    print("wokstation:", hostname)

    if hostname == "orestes":  # Mitsubishi 3D-TV workstation
        _tracking_transmitter_offset = avango.gua.make_trans_mat(
            -0.98, -(0.58 + 0.975), 0.27 + 3.48) * avango.gua.make_rot_mat(
                90.0, 0, 1,
                0)  # transformation into tracking coordinate system

        viewingSetup = StereoViewingSetup(
            SCENEGRAPH=scenegraph,
            WINDOW_RESOLUTION=avango.gua.Vec2ui(1920, 1080),
            SCREEN_DIMENSIONS=avango.gua.Vec2(1.445, 0.81),
            LEFT_SCREEN_RESOLUTION=avango.gua.Vec2ui(1920, 1080),
            RIGHT_SCREEN_RESOLUTION=avango.gua.Vec2ui(1920, 1080),
            STEREO_FLAG=True,
            STEREO_MODE=avango.gua.StereoMode.CHECKERBOARD,
            HEADTRACKING_FLAG=True,
            HEADTRACKING_STATION=
            "tracking-art-glasses-1",  # wired 3D-TV glasses on Mitsubishi 3D-TV workstation
            TRACKING_TRANSMITTER_OFFSET=_tracking_transmitter_offset,
        )

        manipulationManager = ManipulationManager()
        manipulationManager.my_constructor(
            SCENEGRAPH=scenegraph,
            NAVIGATION_NODE=viewingSetup.navigation_node,
            POINTER_TRACKING_STATION="tracking-art-pointer-3",
            TRACKING_TRANSMITTER_OFFSET=_tracking_transmitter_offset,
            POINTER_DEVICE_STATION="device-pointer-3",  # gyromouse
            HEAD_NODE=viewingSetup.head_node,
        )

    elif hostname == "athena":  # small powerwall workstation
        _tracking_transmitter_offset = avango.gua.make_trans_mat(
            0.0, -1.42, 1.6)  # transformation into tracking coordinate system

        viewingSetup = StereoViewingSetup(
            SCENEGRAPH=scenegraph,
            WINDOW_RESOLUTION=avango.gua.Vec2ui(1920 * 2, 1200),
            SCREEN_DIMENSIONS=avango.gua.Vec2(3.0, 2.0),
            LEFT_SCREEN_POSITION=avango.gua.Vec2ui(140, 0),
            LEFT_SCREEN_RESOLUTION=avango.gua.Vec2ui(1780, 1185),
            RIGHT_SCREEN_POSITION=avango.gua.Vec2ui(1920, 0),
            RIGHT_SCREEN_RESOLUTION=avango.gua.Vec2ui(1780, 1185),
            STEREO_FLAG=True,
            STEREO_MODE=avango.gua.StereoMode.SIDE_BY_SIDE,
            HEADTRACKING_FLAG=True,
            HEADTRACKING_STATION=
            "tracking-art-glasses-2",  # small powerwall polarization glasses
            TRACKING_TRANSMITTER_OFFSET=_tracking_transmitter_offset,
        )

        manipulationManager = ManipulationManager()
        manipulationManager.my_constructor(
            SCENEGRAPH=scenegraph,
            NAVIGATION_NODE=viewingSetup.navigation_node,
            POINTER_TRACKING_STATION="tracking-art-pointer-2",
            TRACKING_TRANSMITTER_OFFSET=_tracking_transmitter_offset,
            POINTER_DEVICE_STATION="device-pointer-2",
            HEAD_NODE=viewingSetup.head_node,
        )

    elif hostname == "kronos":  # Samsung 3D-TV workstation
        _tracking_transmitter_offset = avango.gua.make_trans_mat(
            0.0, -0.5, 0.6)  # transformation into tracking coordinate system

        viewingSetup = StereoViewingSetup(
            SCENEGRAPH=scenegraph,
            WINDOW_RESOLUTION=avango.gua.Vec2ui(1920, 1080),
            SCREEN_DIMENSIONS=avango.gua.Vec2(1.235, 0.7),
            LEFT_SCREEN_RESOLUTION=avango.gua.Vec2ui(1920, 1080),
            RIGHT_SCREEN_RESOLUTION=avango.gua.Vec2ui(1920, 1080),
            STEREO_FLAG=True,
            STEREO_MODE=avango.gua.StereoMode.CHECKERBOARD,
            HEADTRACKING_FLAG=True,
            HEADTRACKING_STATION=
            "tracking-pst-glasses-1",  # wired 3D-TV glasses on Samsung 3D-TV workstation
            TRACKING_TRANSMITTER_OFFSET=_tracking_transmitter_offset,
        )

        manipulationManager = ManipulationManager()
        manipulationManager.my_constructor(
            SCENEGRAPH=scenegraph,
            NAVIGATION_NODE=viewingSetup.navigation_node,
            POINTER_TRACKING_STATION="tracking-pst-pointer-1",
            TRACKING_TRANSMITTER_OFFSET=_tracking_transmitter_offset,
            POINTER_DEVICE_STATION="device-pointer-1",
            HEAD_NODE=viewingSetup.head_node,
        )

    else:
        print("No Viewing Setup available for this workstation")
        quit()

    viewingSetup.connect_navigation_matrix(steeringNavigation.sf_nav_mat)
    steeringNavigation.set_rotation_center_offset(
        viewingSetup.get_head_position())

    print_graph(scenegraph.Root.value)

    ## start application/render loop
    viewingSetup.run(locals(), globals())
Ejemplo n.º 6
0
def start():

    ## create scenegraph
    scenegraph = avango.gua.nodes.SceneGraph(Name = "scenegraph")

    # init scene
    scene = Scene(PARENT_NODE = scenegraph.Root.value)
   

    ## init navigation technique
    steering_navigation = SteeringNavigation()
    steering_navigation.set_start_transformation(avango.gua.make_trans_mat(0.0,0.2,0.0))
  
    if NAVIGATION_MODE == "Spacemouse":
        deviceInput = SpacemouseInput()
        deviceInput.my_constructor("device-old-spacemouse")
        
        steering_navigation.my_constructor(deviceInput.mf_dof, deviceInput.mf_buttons, 0.5) # connect navigation with spacemouse input
        
    elif NAVIGATION_MODE == "New Spacemouse":
        deviceInput = SpacemouseInput()
        deviceInput.my_constructor("device-new-spacemouse")
            
        steering_navigation.my_constructor(deviceInput.mf_dof, deviceInput.mf_buttons, 0.2) # connect navigation with spacemouse input

    elif NAVIGATION_MODE == "Keyboard":
        deviceInput = KeyboardInput()
        deviceInput.my_constructor("device-keyboard")

        steering_navigation.my_constructor(deviceInput.mf_dof, deviceInput.mf_buttons) # connect navigation with keyboard input

    else:    
        print("Error: NAVIGATION_MODE " + NAVIGATION_MODE + " is not known.")
        return


    ## init viewing setup    
    hostname = open('/etc/hostname', 'r').readline()
    hostname = hostname.strip(" \n")


    
    if hostname == "boreas": # Mitsubishi 3D-TV workstation
        viewingSetup = ViewingSetup( SCENEGRAPH = scenegraph
                                   , SCREEN_RESOLUTION = avango.gua.Vec2ui(1920, 1080) # in pixels
                                   , SCREEN_DIMENSIONS = avango.gua.Vec2(1.445, 0.81) # in meter
                                   #, SCREEN_MATRIX = avango.gua.make_identity_mat()
                                   , STEREO_FLAG = True
                                   , STEREO_MODE = avango.gua.StereoMode.CHECKERBOARD
                                   , HEADTRACKING_FLAG = True
                                   , HEADTRACKING_STATION = "tracking-art-glasses-1" # wired 3D-TV glasses on boreas workstation
                                   , TRACKING_TRANSMITTER_OFFSET = avango.gua.make_trans_mat(-1.0, -(0.58 + 0.975), 0.26 + 3.48) * avango.gua.make_rot_mat(90.0,0,1,0) # transformation into tracking coordinate system
                                   )


        manipulationManager = ManipulationManager( SCENEGRAPH = scenegraph
                                                 , PARENT_NODE = viewingSetup.navigation_node
                                                 , POINTER_TRACKING_STATION = "tracking-art-pointer-1"
                                                 , POINTER_DEVICE_STATION = "device-pointer-1"
                                                 , HEAD_NODE = viewingSetup.head_node
                                                 , TRACKING_TRANSMITTER_OFFSET = avango.gua.make_trans_mat(-1.0, -(0.58 + 0.975), 0.26 + 3.48) * avango.gua.make_rot_mat(90.0,0,1,0) # transformation into tracking coordinate system
                                                 )
                                                 
                                                 
    elif hostname == "arachne": # Samsung 3D-TV workstation
        viewingSetup = ViewingSetup( SCENEGRAPH = scenegraph
                                   , SCREEN_RESOLUTION = avango.gua.Vec2ui(1920, 1080) # in pixels
                                   , SCREEN_DIMENSIONS = avango.gua.Vec2(1.235, 0.7) # in meter
                                   , SCREEN_MATRIX = avango.gua.make_rot_mat(90.0,0,0,1)
                                   , STEREO_FLAG = True
                                   , STEREO_MODE = avango.gua.StereoMode.CHECKERBOARD
                                   , HEADTRACKING_FLAG = True
                                   , HEADTRACKING_STATION = "tracking-art-glasses-2" # wired 3D-TV glasses on arachne workstation
                                   , TRACKING_TRANSMITTER_OFFSET = avango.gua.make_trans_mat(0.48, -(0.64 + 0.975), 0.48 + 3.48) * avango.gua.make_rot_mat(90.0,0,1,0) # transformation into tracking coordinate system
                                   )

        manipulationManager = ManipulationManager( SCENEGRAPH = scenegraph
                                                 , PARENT_NODE = viewingSetup.navigation_node
                                                 , POINTER_TRACKING_STATION = "tracking-art-pointer-2"
                                                 , POINTER_DEVICE_STATION = "device-pointer-2"
                                                 , HEAD_NODE = viewingSetup.head_node
                                                 , TRACKING_TRANSMITTER_OFFSET = avango.gua.make_trans_mat(0.48, -(0.64 + 0.975), 0.48 + 3.48) * avango.gua.make_rot_mat(90.0,0,1,0) # transformation into tracking coordinate system
                                                 )
                                                 

                                              
    elif hostname == "pan": # Asus 3D-Monitor workstation 
        viewingSetup = ViewingSetup( SCENEGRAPH = scenegraph
                                   , SCREEN_RESOLUTION = avango.gua.Vec2ui(1920, 1080) # in pixels
                                   , SCREEN_DIMENSIONS = avango.gua.Vec2(0.535, 0.305) # in meter                            
                                   #, SCREEN_MATRIX = avango.gua.make_identity_mat()
                                   , STEREO_FLAG = True
                                   , STEREO_MODE = avango.gua.StereoMode.ANAGLYPH_RED_CYAN
                                   , HEADTRACKING_FLAG = True
                                   , HEADTRACKING_STATION = "tracking-pst-glasses-1" # glasses on pan workstation
                                   , TRACKING_TRANSMITTER_OFFSET = avango.gua.make_trans_mat(0.0,-0.12,0.90) # transformation into tracking coordinate system
                                   )

        manipulationManager = ManipulationManager( SCENEGRAPH = scenegraph
                                                 , PARENT_NODE = viewingSetup.navigation_node
                                                 , POINTER_TRACKING_STATION = "tracking-pst-pointer-1"
                                                 , POINTER_DEVICE_STATION = "device-pointer-1"
                                                 , HEAD_NODE = viewingSetup.head_node
                                                 , TRACKING_TRANSMITTER_OFFSET = avango.gua.make_trans_mat(0.0,-0.12,0.90) # transformation into tracking coordinate system                                   
                                                 )

    elif hostname == "agenor": # DELL-monitor workstation with PST tracker
        viewingSetup = ViewingSetup( SCENEGRAPH = scenegraph
                                   , SCREEN_RESOLUTION = avango.gua.Vec2ui(2560, 1440) # in pixels
                                   , SCREEN_DIMENSIONS = avango.gua.Vec2(0.595,0.335) # in meter                            
                                   #, SCREEN_MATRIX = avango.gua.make_identity_mat()
                                   , STEREO_FLAG = True
                                   , STEREO_MODE = avango.gua.StereoMode.ANAGLYPH_RED_CYAN
                                   , HEADTRACKING_FLAG = True
                                   , HEADTRACKING_STATION = "tracking-pst-glasses-1" # glasses on pan workstation
                                   , TRACKING_TRANSMITTER_OFFSET = avango.gua.make_trans_mat(0.0,-0.12,0.90) # transformation into tracking coordinate system
                                   )

        manipulationManager = ManipulationManager( SCENEGRAPH = scenegraph
                                                 , PARENT_NODE = viewingSetup.navigation_node
                                                 , POINTER_TRACKING_STATION = "tracking-pst-pointer-1"
                                                 , POINTER_DEVICE_STATION = "device-pointer-1"
                                                 , HEAD_NODE = viewingSetup.head_node
                                                 , TRACKING_TRANSMITTER_OFFSET = avango.gua.make_trans_mat(0.0,-0.12,0.90)# transformation into tracking coordinate system                                   
                                                 )


    else:
        viewingSetup = DesktopViewingSetup( SCENEGRAPH = scenegraph       
                                          , SCREEN_RESOLUTION = avango.gua.Vec2ui(2560, 1440) # in pixels
                                          , SCREEN_DIMENSIONS = avango.gua.Vec2(0.595, 0.32) # in meter                            
                                          #, SCREEN_MATRIX = avango.gua.make_identity_mat()
                                          #, STEREO_FLAG = False
                                          #, STEREO_MODE = avango.gua.StereoMode.ANAGLYPH_RED_CYAN
                                          #, HEADTRACKING_FLAG = False
                                          #, HEADTRACKING_STATION = "tracking-pst-glasses-1" # glasses on demeter workstation
                                          #, TRACKING_TRANSMITTER_OFFSET = avango.gua.make_identity_mat()
                                          )
                                          
                                          
                                      
    viewingSetup.connect_navigation_matrix(steering_navigation.sf_nav_mat)
    steering_navigation.set_rotation_center_offset(viewingSetup.get_head_position())

    viewingSetup.run(locals(), globals())
Ejemplo n.º 7
0
def start():

    ## create scenegraph
    scenegraph = avango.gua.nodes.SceneGraph(Name = "scenegraph")
    
    ## init solar system
    solar_system = SolarSystem()
    solar_system.my_constructor(scenegraph.Root.value)

    ## init navigation technique
    steering_navigation = SteeringNavigation()
    steering_navigation.set_start_transformation(avango.gua.make_trans_mat(0.0,0.1,0.3))
  
    if NAVIGATION_MODE == "Spacemouse":
        deviceInput = SpacemouseInput()
        deviceInput.my_constructor("gua-device-spacemouse")
        
        steering_navigation.my_constructor(deviceInput.mf_dof, deviceInput.mf_buttons, 1.0) # connect navigation with spacemouse input
        
    elif NAVIGATION_MODE == "New Spacemouse":
        deviceInput = SpacemouseInput()
        deviceInput.my_constructor("gua-device-spacemouse")
            
        steering_navigation.my_constructor(deviceInput.mf_dof, deviceInput.mf_buttons, 0.2) # connect navigation with spacemouse input

    elif NAVIGATION_MODE == "Keyboard":
        deviceInput = KeyboardInput()
        deviceInput.my_constructor("gua-device-keyboard0")

        steering_navigation.my_constructor(deviceInput.mf_dof, deviceInput.mf_buttons) # connect navigation with keyboard input

    else:    
        print("Error: NAVIGATION_MODE " + NAVIGATION_MODE + " is not known.")
        return


    # setup viewer
    viewingSetup = SimpleViewingSetup(scenegraph, "mono", False)
    #viewingSetup = SimpleViewingSetup(scenegraph, "anaglyph", False)
    viewingSetup.connect_navigation_matrix(steering_navigation.sf_nav_mat)
    steering_navigation.set_rotation_center_offset(viewingSetup.get_head_position())

    viewingSetup.run(locals(), globals())
Ejemplo n.º 8
0
def create_navigation_client(HOST_NAME, DEVICE_INPUT, START_POSITION, SCENEGRAPH, SCENE_ROOT):
  
  navigation_client = SteeringNavigation()
  navigation_client.set_start_transformation(START_POSITION)
  navigation_client.my_constructor(DEVICE_INPUT.mf_dof, 1.0, SCENEGRAPH, SCENE_ROOT, HOST_NAME) # connect navigation with spacemouse input
  return navigation_client
def start():

    ## create scenegraph
    scenegraph = avango.gua.nodes.SceneGraph(Name = "scenegraph")

    # init scene
    sceneManager = SceneManager()
    sceneManager.my_constructor(PARENT_NODE = scenegraph.Root.value)


    ## init viewing setup
    hostname = open('/etc/hostname', 'r').readline()
    hostname = hostname.strip(" \n")

    
    if hostname == "eris": # Mitsubishi 3D-TV workstation
        viewingSetup = ViewingSetup( SCENEGRAPH = scenegraph
                                   , SCREEN_RESOLUTION = avango.gua.Vec2ui(1920, 1080) # in pixels
                                   , SCREEN_DIMENSIONS = avango.gua.Vec2(1.445, 0.81) # in meter
                                   #, SCREEN_MATRIX = avango.gua.make_identity_mat()
                                   , STEREO_FLAG = True
                                   , STEREO_MODE = avango.gua.StereoMode.CHECKERBOARD
                                   , HEADTRACKING_FLAG = True
                                   , HEADTRACKING_STATION = "tracking-art-glasses-1" # wired 3D-TV glasses on boreas workstation
                                   , TRACKING_TRANSMITTER_OFFSET = avango.gua.make_trans_mat(-1.0, -(0.58 + 0.975), 0.26 + 3.48) * avango.gua.make_rot_mat(90.0,0,1,0) # transformation into tracking coordinate system
                                   )

        pointer_station_name = "device-pointer-1"
        pointer_tracking_name = "tracking-art-pointer-1"
        transmitter_offset = avango.gua.make_trans_mat(-1.0, -(0.58 + 0.975), 0.26 + 3.48) * avango.gua.make_rot_mat(90.0,0,1,0) # transformation into tracking coordinate system
                                                 
                                                 
    elif hostname == "arachne": # Samsung 3D-TV workstation
        viewingSetup = ViewingSetup( SCENEGRAPH = scenegraph
                                   , SCREEN_RESOLUTION = avango.gua.Vec2ui(1920, 1080) # in pixels
                                   , SCREEN_DIMENSIONS = avango.gua.Vec2(1.235, 0.7) # in meter
                                   , SCREEN_MATRIX = avango.gua.make_rot_mat(90.0,0,0,1)
                                   , STEREO_FLAG = True
                                   , STEREO_MODE = avango.gua.StereoMode.CHECKERBOARD
                                   , HEADTRACKING_FLAG = True
                                   , HEADTRACKING_STATION = "tracking-art-glasses-2" # wired 3D-TV glasses on arachne workstation
                                   , TRACKING_TRANSMITTER_OFFSET = avango.gua.make_trans_mat(0.48, -(0.64 + 0.975), 0.48 + 3.48) * avango.gua.make_rot_mat(90.0,0,1,0) # transformation into tracking coordinate system
                                   )

        pointer_station_name = "device-pointer-2"
        pointer_tracking_name = "tracking-art-pointer-2"
        transmitter_offset = avango.gua.make_trans_mat(0.48, -(0.64 + 0.975), 0.48 + 3.48) * avango.gua.make_rot_mat(90.0,0,1,0) # transformation into tracking coordinate system
                                                 

                                              
    elif hostname == "pan": # Asus 3D-Monitor workstation 
        viewingSetup = ViewingSetup( SCENEGRAPH = scenegraph
                                   , SCREEN_RESOLUTION = avango.gua.Vec2ui(1920, 1080) # in pixels
                                   , SCREEN_DIMENSIONS = avango.gua.Vec2(0.535, 0.305) # in meter                            
                                   #, SCREEN_MATRIX = avango.gua.make_identity_mat()
                                   , STEREO_FLAG = True
                                   , STEREO_MODE = avango.gua.StereoMode.ANAGLYPH_RED_CYAN
                                   , HEADTRACKING_FLAG = True
                                   , HEADTRACKING_STATION = "tracking-pst-glasses-1" # glasses on pan workstation
                                   , TRACKING_TRANSMITTER_OFFSET = avango.gua.make_trans_mat(0.0,-0.11,0.77) # transformation into tracking coordinate system
                                   )

        pointer_station_name = "device-gyromouse"
        pointer_tracking_name = "tracking-pst-pointer-1"
        transmitter_offset = avango.gua.make_trans_mat(0.0,-0.11,0.77) # transformation into tracking coordinate system                                   

    elif hostname == "agenor": # DELL-monitor workstation with PST tracker
        viewingSetup = ViewingSetup( SCENEGRAPH = scenegraph
                                   , SCREEN_RESOLUTION = avango.gua.Vec2ui(2560, 1440) # in pixels
                                   , SCREEN_DIMENSIONS = avango.gua.Vec2(0.595,0.335) # in meter                            
                                   #, SCREEN_MATRIX = avango.gua.make_identity_mat()
                                   , STEREO_FLAG = True
                                   , STEREO_MODE = avango.gua.StereoMode.ANAGLYPH_RED_CYAN
                                   , HEADTRACKING_FLAG = True
                                   , HEADTRACKING_STATION = "tracking-pst-glasses-1" # glasses on pan workstation
                                   , TRACKING_TRANSMITTER_OFFSET = avango.gua.make_trans_mat(0.0,-0.12,0.71) # transformation into tracking coordinate system
                                   )

        pointer_station_name = "device-pointer-1"
        pointer_tracking_name = "tracking-pst-pointer-1"
        transmitter_offset =  avango.gua.make_trans_mat(0.0,-0.12,0.71) # transformation into tracking coordinate system


    else: # other desktop setups
        viewingSetup = ViewingSetup( SCENEGRAPH = scenegraph       
                                   , SCREEN_RESOLUTION = avango.gua.Vec2ui(2560, 1440) # in pixels
                                   , SCREEN_DIMENSIONS = avango.gua.Vec2(0.595, 0.32) # in meter                            
                                   #, SCREEN_MATRIX = avango.gua.make_identity_mat()
                                   )

        pointer_station_name = ""
        pointer_tracking_name = ""
        transmitter_offset = avango.gua.make_identity_mat() # transformation into tracking coordinate system


    ## init navigation technique
    if NAVIGATION_MODE == "Spacemouse":
        deviceInput = SpacemouseInput()
        deviceInput.my_constructor("device-old-spacemouse"
                                  , TRANSLATION_FACTOR = 0.6
                                  , ROTATION_FACTOR = 0.4
                                  )
        
    elif NAVIGATION_MODE == "New Spacemouse":
        deviceInput = NewSpacemouseInput()
        deviceInput.my_constructor( DEVICE_STATION = "device-new-spacemouse"
                                  , TRANSLATION_FACTOR = 0.6
                                  , ROTATION_FACTOR = 0.4
                                  )

    elif NAVIGATION_MODE == "Keyboard":
        deviceInput = KeyboardInput()
        deviceInput.my_constructor("device-keyboard")

    else:    
        print("Error: NAVIGATION_MODE " + NAVIGATION_MODE + " is not known.")
        return


    steering_navigation = SteeringNavigation()
    steering_navigation.my_constructor( SCENEGRAPH = scenegraph
                                      , PARENT_NODE = viewingSetup.get_navigation_node()
                                      , MF_NAV_DOF = deviceInput.mf_dof
                                      , POINTER_STATION_NAME = pointer_station_name
                                      , POINTER_TRACKING_NAME = pointer_tracking_name
                                      , TRACKING_TRANSMITTER_OFFSET = transmitter_offset
                                      )
    steering_navigation.sf_nav_mat.value = avango.gua.make_trans_mat(0.0,0.5,3.0) # initial navigation matrix
    steering_navigation.sf_head_mat.connect_from(viewingSetup.head_node.Transform) # connect headtracking matrix into navigation class


    viewingSetup.connect_navigation_matrix(steering_navigation.sf_nav_mat)
    viewingSetup.run(locals(), globals())
Ejemplo n.º 10
0
def start():

    ## create scenegraph
    scenegraph = avango.gua.nodes.SceneGraph(Name="scenegraph")

    # init scene
    scene = Scene(PARENT_NODE=scenegraph.Root.value)

    ## init navigation technique
    steering_navigation = SteeringNavigation()
    steering_navigation.set_start_transformation(
        avango.gua.make_trans_mat(0.0, 0.2, 0.0))

    if NAVIGATION_MODE == "Spacemouse":
        deviceInput = SpacemouseInput()
        deviceInput.my_constructor("device-old-spacemouse")

        steering_navigation.my_constructor(
            deviceInput.mf_dof, deviceInput.mf_buttons,
            0.5)  # connect navigation with spacemouse input

    elif NAVIGATION_MODE == "New Spacemouse":
        deviceInput = SpacemouseInput()
        deviceInput.my_constructor("device-new-spacemouse")

        steering_navigation.my_constructor(
            deviceInput.mf_dof, deviceInput.mf_buttons,
            0.2)  # connect navigation with spacemouse input

    elif NAVIGATION_MODE == "Keyboard":
        deviceInput = KeyboardInput()
        deviceInput.my_constructor("device-keyboard")

        steering_navigation.my_constructor(
            deviceInput.mf_dof,
            deviceInput.mf_buttons)  # connect navigation with keyboard input

    else:
        print("Error: NAVIGATION_MODE " + NAVIGATION_MODE + " is not known.")
        return

    ## init viewing setup
    hostname = open('/etc/hostname', 'r').readline()
    hostname = hostname.strip(" \n")

    if hostname == "boreas":  # Mitsubishi 3D-TV workstation
        viewingSetup = ViewingSetup(
            SCENEGRAPH=scenegraph,
            SCREEN_RESOLUTION=avango.gua.Vec2ui(1920, 1080)  # in pixels
            ,
            SCREEN_DIMENSIONS=avango.gua.Vec2(1.445, 0.81)  # in meter
            #, SCREEN_MATRIX = avango.gua.make_identity_mat()
            ,
            STEREO_FLAG=True,
            STEREO_MODE=avango.gua.StereoMode.CHECKERBOARD,
            HEADTRACKING_FLAG=True,
            HEADTRACKING_STATION=
            "tracking-art-glasses-1"  # wired 3D-TV glasses on boreas workstation
            ,
            TRACKING_TRANSMITTER_OFFSET=avango.gua.make_trans_mat(
                -1.0, -(0.58 + 0.975), 0.26 + 3.48) * avango.gua.make_rot_mat(
                    90.0, 0, 1,
                    0)  # transformation into tracking coordinate system
        )

        manipulationManager = ManipulationManager(
            SCENEGRAPH=scenegraph,
            PARENT_NODE=viewingSetup.navigation_node,
            POINTER_TRACKING_STATION="tracking-art-pointer-1",
            POINTER_DEVICE_STATION="device-pointer-1",
            HEAD_NODE=viewingSetup.head_node,
            TRACKING_TRANSMITTER_OFFSET=avango.gua.make_trans_mat(
                -1.0, -(0.58 + 0.975), 0.26 + 3.48) * avango.gua.make_rot_mat(
                    90.0, 0, 1,
                    0)  # transformation into tracking coordinate system
        )

    elif hostname == "arachne":  # Samsung 3D-TV workstation
        viewingSetup = ViewingSetup(
            SCENEGRAPH=scenegraph,
            SCREEN_RESOLUTION=avango.gua.Vec2ui(1920, 1080)  # in pixels
            ,
            SCREEN_DIMENSIONS=avango.gua.Vec2(1.235, 0.7)  # in meter
            ,
            SCREEN_MATRIX=avango.gua.make_rot_mat(90.0, 0, 0, 1),
            STEREO_FLAG=True,
            STEREO_MODE=avango.gua.StereoMode.CHECKERBOARD,
            HEADTRACKING_FLAG=True,
            HEADTRACKING_STATION=
            "tracking-art-glasses-2"  # wired 3D-TV glasses on arachne workstation
            ,
            TRACKING_TRANSMITTER_OFFSET=avango.gua.make_trans_mat(
                0.48, -(0.64 + 0.975), 0.48 + 3.48) * avango.gua.make_rot_mat(
                    90.0, 0, 1,
                    0)  # transformation into tracking coordinate system
        )

        manipulationManager = ManipulationManager(
            SCENEGRAPH=scenegraph,
            PARENT_NODE=viewingSetup.navigation_node,
            POINTER_TRACKING_STATION="tracking-art-pointer-2",
            POINTER_DEVICE_STATION="device-pointer-2",
            HEAD_NODE=viewingSetup.head_node,
            TRACKING_TRANSMITTER_OFFSET=avango.gua.make_trans_mat(
                0.48, -(0.64 + 0.975), 0.48 + 3.48) * avango.gua.make_rot_mat(
                    90.0, 0, 1,
                    0)  # transformation into tracking coordinate system
        )

    elif hostname == "pan":  # Asus 3D-Monitor workstation
        viewingSetup = ViewingSetup(
            SCENEGRAPH=scenegraph,
            SCREEN_RESOLUTION=avango.gua.Vec2ui(1920, 1080)  # in pixels
            ,
            SCREEN_DIMENSIONS=avango.gua.Vec2(
                0.535, 0.305)  # in meter                            
            #, SCREEN_MATRIX = avango.gua.make_identity_mat()
            ,
            STEREO_FLAG=True,
            STEREO_MODE=avango.gua.StereoMode.ANAGLYPH_RED_CYAN,
            HEADTRACKING_FLAG=True,
            HEADTRACKING_STATION=
            "tracking-pst-glasses-1"  # glasses on pan workstation
            ,
            TRACKING_TRANSMITTER_OFFSET=avango.gua.make_trans_mat(
                0.0, -0.12,
                0.90)  # transformation into tracking coordinate system
        )

        manipulationManager = ManipulationManager(
            SCENEGRAPH=scenegraph,
            PARENT_NODE=viewingSetup.navigation_node,
            POINTER_TRACKING_STATION="tracking-pst-pointer-1",
            POINTER_DEVICE_STATION="device-pointer-1",
            HEAD_NODE=viewingSetup.head_node,
            TRACKING_TRANSMITTER_OFFSET=avango.gua.make_trans_mat(
                0.0, -0.12, 0.90
            )  # transformation into tracking coordinate system                                   
        )

    elif hostname == "agenor":  # DELL-monitor workstation with PST tracker
        viewingSetup = ViewingSetup(
            SCENEGRAPH=scenegraph,
            SCREEN_RESOLUTION=avango.gua.Vec2ui(2560, 1440)  # in pixels
            ,
            SCREEN_DIMENSIONS=avango.gua.Vec2(
                0.595, 0.335)  # in meter                            
            #, SCREEN_MATRIX = avango.gua.make_identity_mat()
            ,
            STEREO_FLAG=True,
            STEREO_MODE=avango.gua.StereoMode.ANAGLYPH_RED_CYAN,
            HEADTRACKING_FLAG=True,
            HEADTRACKING_STATION=
            "tracking-pst-glasses-1"  # glasses on pan workstation
            ,
            TRACKING_TRANSMITTER_OFFSET=avango.gua.make_trans_mat(
                0.0, -0.12,
                0.90)  # transformation into tracking coordinate system
        )

        manipulationManager = ManipulationManager(
            SCENEGRAPH=scenegraph,
            PARENT_NODE=viewingSetup.navigation_node,
            POINTER_TRACKING_STATION="tracking-pst-pointer-1",
            POINTER_DEVICE_STATION="device-pointer-1",
            HEAD_NODE=viewingSetup.head_node,
            TRACKING_TRANSMITTER_OFFSET=avango.gua.make_trans_mat(
                0.0, -0.12, 0.90
            )  # transformation into tracking coordinate system                                   
        )

    else:
        viewingSetup = DesktopViewingSetup(
            SCENEGRAPH=scenegraph,
            SCREEN_RESOLUTION=avango.gua.Vec2ui(2560, 1440)  # in pixels
            ,
            SCREEN_DIMENSIONS=avango.gua.Vec2(
                0.595, 0.32)  # in meter                            
            #, SCREEN_MATRIX = avango.gua.make_identity_mat()
            #, STEREO_FLAG = False
            #, STEREO_MODE = avango.gua.StereoMode.ANAGLYPH_RED_CYAN
            #, HEADTRACKING_FLAG = False
            #, HEADTRACKING_STATION = "tracking-pst-glasses-1" # glasses on demeter workstation
            #, TRACKING_TRANSMITTER_OFFSET = avango.gua.make_identity_mat()
        )

    viewingSetup.connect_navigation_matrix(steering_navigation.sf_nav_mat)
    steering_navigation.set_rotation_center_offset(
        viewingSetup.get_head_position())

    viewingSetup.run(locals(), globals())
Ejemplo n.º 11
0
def start():

    ## create scenegraph
    scenegraph = avango.gua.nodes.SceneGraph(Name="scenegraph")

    # init scene
    sceneManager = SceneManager()
    sceneManager.my_constructor(PARENT_NODE=scenegraph.Root.value)

    ## init viewing setup
    hostname = open('/etc/hostname', 'r').readline()
    hostname = hostname.strip(" \n")

    if hostname == "eris":  # Mitsubishi 3D-TV workstation
        viewingSetup = ViewingSetup(
            SCENEGRAPH=scenegraph,
            SCREEN_RESOLUTION=avango.gua.Vec2ui(1920, 1080)  # in pixels
            ,
            SCREEN_DIMENSIONS=avango.gua.Vec2(1.445, 0.81)  # in meter
            #, SCREEN_MATRIX = avango.gua.make_identity_mat()
            ,
            STEREO_FLAG=True,
            STEREO_MODE=avango.gua.StereoMode.CHECKERBOARD,
            HEADTRACKING_FLAG=True,
            HEADTRACKING_STATION=
            "tracking-art-glasses-1"  # wired 3D-TV glasses on boreas workstation
            ,
            TRACKING_TRANSMITTER_OFFSET=avango.gua.make_trans_mat(
                -1.0, -(0.58 + 0.975), 0.26 + 3.48) * avango.gua.make_rot_mat(
                    90.0, 0, 1,
                    0)  # transformation into tracking coordinate system
        )

        pointer_station_name = "device-pointer-1"
        pointer_tracking_name = "tracking-art-pointer-1"
        transmitter_offset = avango.gua.make_trans_mat(
            -1.0, -(0.58 + 0.975), 0.26 + 3.48) * avango.gua.make_rot_mat(
                90.0, 0, 1,
                0)  # transformation into tracking coordinate system

    elif hostname == "arachne":  # Samsung 3D-TV workstation
        viewingSetup = ViewingSetup(
            SCENEGRAPH=scenegraph,
            SCREEN_RESOLUTION=avango.gua.Vec2ui(1920, 1080)  # in pixels
            ,
            SCREEN_DIMENSIONS=avango.gua.Vec2(1.235, 0.7)  # in meter
            ,
            SCREEN_MATRIX=avango.gua.make_rot_mat(90.0, 0, 0, 1),
            STEREO_FLAG=True,
            STEREO_MODE=avango.gua.StereoMode.CHECKERBOARD,
            HEADTRACKING_FLAG=True,
            HEADTRACKING_STATION=
            "tracking-art-glasses-2"  # wired 3D-TV glasses on arachne workstation
            ,
            TRACKING_TRANSMITTER_OFFSET=avango.gua.make_trans_mat(
                0.48, -(0.64 + 0.975), 0.48 + 3.48) * avango.gua.make_rot_mat(
                    90.0, 0, 1,
                    0)  # transformation into tracking coordinate system
        )

        pointer_station_name = "device-pointer-2"
        pointer_tracking_name = "tracking-art-pointer-2"
        transmitter_offset = avango.gua.make_trans_mat(
            0.48, -(0.64 + 0.975), 0.48 + 3.48) * avango.gua.make_rot_mat(
                90.0, 0, 1,
                0)  # transformation into tracking coordinate system

    elif hostname == "pan":  # Asus 3D-Monitor workstation
        viewingSetup = ViewingSetup(
            SCENEGRAPH=scenegraph,
            SCREEN_RESOLUTION=avango.gua.Vec2ui(1920, 1080)  # in pixels
            ,
            SCREEN_DIMENSIONS=avango.gua.Vec2(
                0.535, 0.305)  # in meter                            
            #, SCREEN_MATRIX = avango.gua.make_identity_mat()
            ,
            STEREO_FLAG=True,
            STEREO_MODE=avango.gua.StereoMode.ANAGLYPH_RED_CYAN,
            HEADTRACKING_FLAG=True,
            HEADTRACKING_STATION=
            "tracking-pst-glasses-1"  # glasses on pan workstation
            ,
            TRACKING_TRANSMITTER_OFFSET=avango.gua.make_trans_mat(
                0.0, -0.11,
                0.77)  # transformation into tracking coordinate system
        )

        pointer_station_name = "device-gyromouse"
        pointer_tracking_name = "tracking-pst-pointer-1"
        transmitter_offset = avango.gua.make_trans_mat(
            0.0, -0.11, 0.77)  # transformation into tracking coordinate system

    elif hostname == "agenor":  # DELL-monitor workstation with PST tracker
        viewingSetup = ViewingSetup(
            SCENEGRAPH=scenegraph,
            SCREEN_RESOLUTION=avango.gua.Vec2ui(2560, 1440)  # in pixels
            ,
            SCREEN_DIMENSIONS=avango.gua.Vec2(
                0.595, 0.335)  # in meter                            
            #, SCREEN_MATRIX = avango.gua.make_identity_mat()
            ,
            STEREO_FLAG=True,
            STEREO_MODE=avango.gua.StereoMode.ANAGLYPH_RED_CYAN,
            HEADTRACKING_FLAG=True,
            HEADTRACKING_STATION=
            "tracking-pst-glasses-1"  # glasses on pan workstation
            ,
            TRACKING_TRANSMITTER_OFFSET=avango.gua.make_trans_mat(
                0.0, -0.12,
                0.71)  # transformation into tracking coordinate system
        )

        pointer_station_name = "device-pointer-1"
        pointer_tracking_name = "tracking-pst-pointer-1"
        transmitter_offset = avango.gua.make_trans_mat(
            0.0, -0.12, 0.71)  # transformation into tracking coordinate system

    else:  # other desktop setups
        viewingSetup = ViewingSetup(
            SCENEGRAPH=scenegraph,
            SCREEN_RESOLUTION=avango.gua.Vec2ui(2560, 1440)  # in pixels
            ,
            SCREEN_DIMENSIONS=avango.gua.Vec2(
                0.595, 0.32)  # in meter                            
            #, SCREEN_MATRIX = avango.gua.make_identity_mat()
        )

        pointer_station_name = ""
        pointer_tracking_name = ""
        transmitter_offset = avango.gua.make_identity_mat(
        )  # transformation into tracking coordinate system

    ## init navigation technique
    if NAVIGATION_MODE == "Spacemouse":
        deviceInput = SpacemouseInput()
        deviceInput.my_constructor("device-old-spacemouse",
                                   TRANSLATION_FACTOR=0.6,
                                   ROTATION_FACTOR=0.4)

    elif NAVIGATION_MODE == "New Spacemouse":
        deviceInput = NewSpacemouseInput()
        deviceInput.my_constructor(DEVICE_STATION="device-new-spacemouse",
                                   TRANSLATION_FACTOR=0.6,
                                   ROTATION_FACTOR=0.4)

    elif NAVIGATION_MODE == "Keyboard":
        deviceInput = KeyboardInput()
        deviceInput.my_constructor("device-keyboard")

    else:
        print("Error: NAVIGATION_MODE " + NAVIGATION_MODE + " is not known.")
        return

    steering_navigation = SteeringNavigation()
    steering_navigation.my_constructor(
        SCENEGRAPH=scenegraph,
        PARENT_NODE=viewingSetup.get_navigation_node(),
        MF_NAV_DOF=deviceInput.mf_dof,
        POINTER_STATION_NAME=pointer_station_name,
        POINTER_TRACKING_NAME=pointer_tracking_name,
        TRACKING_TRANSMITTER_OFFSET=transmitter_offset)
    steering_navigation.sf_nav_mat.value = avango.gua.make_trans_mat(
        0.0, 0.5, 3.0)  # initial navigation matrix
    steering_navigation.sf_head_mat.connect_from(
        viewingSetup.head_node.Transform
    )  # connect headtracking matrix into navigation class

    viewingSetup.connect_navigation_matrix(steering_navigation.sf_nav_mat)
    viewingSetup.run(locals(), globals())