Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
!/plugins/csp-anchor-labels
!/plugins/csp-atmospheres
!/plugins/csp-custom-web-ui
!/plugins/csp-guided-tour
!/plugins/csp-demo-node-editor
!/plugins/csp-vr-accessibility
!/plugins/csp-fly-to-locations
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ if (MSVC)
$<$<COMPILE_LANGUAGE:CXX>:-external:anglebrackets>
$<$<COMPILE_LANGUAGE:CXX>:-external:W0>
$<$<COMPILE_LANGUAGE:CXX>:-W3>
$<$<COMPILE_LANGUAGE:CXX>:-WX>
# $<$<COMPILE_LANGUAGE:CXX>:-WX>
$<$<COMPILE_LANGUAGE:CXX>:-EHsc>
$<$<COMPILE_LANGUAGE:CXX>:-wd4251>

Expand Down
2 changes: 1 addition & 1 deletion config/base/scripts/hmd.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ set CURRENT_DIR=%cd%
cd "%SCRIPT_DIR%"

rem Scene config file can be passed as first parameter.
set SETTINGS=../share/config/simple_hmd.json
set SETTINGS=../share/config/user-guided-tour_hmd.json
IF NOT "%1"=="" (
SET SETTINGS=%1
SHIFT
Expand Down
2 changes: 1 addition & 1 deletion config/base/scripts/start.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ set CURRENT_DIR=%cd%
cd "%SCRIPT_DIR%"

rem Scene config file can be passed as first parameter.
set SETTINGS=../share/config/simple_desktop.json
set SETTINGS=../share/config/user-guided-tour.json
IF NOT "%1"=="" (
SET SETTINGS=%1
SHIFT
Expand Down
5 changes: 5 additions & 0 deletions config/base/vista/display.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
# SPDX-FileCopyrightText: German Aerospace Center (DLR) <[email protected]>
# SPDX-License-Identifier: CC0-1.0

#[FONTS]
# MONO_FONT = fonts/SometypeMono-Regular.ttf
# SANS_FONT = fonts/OpenSans-Regular.ttf
# SERIF_FONT = fonts/SourceSerifPro-Regular.ttf

[SYSTEM]
DISPLAYSYSTEMS = MAIN
WINDOWINGTOOLKIT = SDL2
Expand Down
2 changes: 1 addition & 1 deletion config/base/vista/display_hmd.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ WINDOWINGTOOLKIT = OPENVR_SDL2
NAME = MIRROR_WINDOW
STEREO = false
SIZE = 1280, 800
FULLSCREEN = false
FULLSCREEN = true
TITLE = CosmoScout VR
VSYNC = false

Expand Down
19 changes: 16 additions & 3 deletions config/base/vista/interaction.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

[SYSTEM]
DRIVERPLUGINDIRS = ${VISTACORELIBS_DRIVER_PLUGIN_DIRS}
DEVICEDRIVERS = KEYBOARD, MOUSE, SPACENAVIGATOR, SDL2CONTROLLER
INTERACTIONCONTEXTS = KEYINPUT, MOUSEINPUT, MOUSEZOOM, MOUSEPAN, SPACENAVIGATION, KEYBOARDNAVIGATION, CONTROLLERNAVIGATION
DUMPDFNGRAPHS = FALSE
DEVICEDRIVERS = KEYBOARD, MOUSE, SPACENAVIGATOR, SDL2CONTROLLER, ICAROS
INTERACTIONCONTEXTS = KEYINPUT, MOUSEINPUT, MOUSEZOOM, MOUSEPAN, SPACENAVIGATION, KEYBOARDNAVIGATION, CONTROLLERNAVIGATION, ICAROSNAVIGATION
DUMPDFNGRAPHS = TRUE


###################### interaction contexts ###########################
Expand Down Expand Up @@ -42,6 +42,11 @@ GRAPH = xml/keyboard_navigation.xml
ROLE = CONTROLLERNAVIGATION
GRAPH = xml/controller_navigation.xml

[ICAROSNAVIGATION]
ROLE = ICAROSNAVIGATION
GRAPH = xml/icaros_navigation.xml
RELOADTRIGGER = T

######################## device drivers ###############################

[KEYBOARD]
Expand Down Expand Up @@ -84,3 +89,11 @@ RAWID = 0

[CONTROLLER_DB]
PATH = ../share/config/vista/gamecontrollerdb.txt

[ICAROS]
TYPE = ICAROS
HISTORY = 10
SENSORS = ICAROS_CONTROLLER

[ICAROS_CONTROLLER]
RAWID = 0
18 changes: 16 additions & 2 deletions config/base/vista/interaction_hmd.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

[SYSTEM]
DRIVERPLUGINDIRS = ${VISTACORELIBS_DRIVER_PLUGIN_DIRS}
DEVICEDRIVERS = KEYBOARD, MOUSE, OPENVRDRIVER, SDL2CONTROLLER
INTERACTIONCONTEXTS = KEYINPUT, KEYBOARDNAVIGATION, HEADTRACKING, FLYSTICKNAVIGATION, FLYSTICKINPUT, CONTROLLERNAVIGATION
DEVICEDRIVERS = KEYBOARD, MOUSE, OPENVRDRIVER, SDL2CONTROLLER, ICAROS
INTERACTIONCONTEXTS = KEYINPUT, KEYBOARDNAVIGATION, HEADTRACKING, FLYSTICKNAVIGATION, FLYSTICKINPUT, CONTROLLERNAVIGATION, ICAROSNAVIGATION

###################### interaction contexts ###########################

Expand Down Expand Up @@ -36,6 +36,11 @@ GRAPH = xml/openvr_standardinput.xml
ROLE = CONTROLLERNAVIGATION
GRAPH = xml/controller_navigation.xml

[ICAROSNAVIGATION]
ROLE = ICAROSNAVIGATION
GRAPH = xml/icaros_navigation.xml
RELOADTRIGGER = T

######################## device drivers ###############################

[KEYBOARD]
Expand Down Expand Up @@ -83,3 +88,12 @@ RAWID = 0

[CONTROLLER_DB]
PATH = ../share/config/vista/gamecontrollerdb.txt


[ICAROS]
TYPE = ICAROS
HISTORY = 10
SENSORS = ICAROS_CONTROLLER

[ICAROS_CONTROLLER]
RAWID = 0
267 changes: 267 additions & 0 deletions config/base/vista/xml/icaros_navigation.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,267 @@
<!--
SPDX-FileCopyrightText: German Aerospace Center (DLR) <[email protected]>
SPDX-License-Identifier: MIT
This data flow net graph defines the interaction configuration for the ICAROS device.
-->
<?xml version="1.0" encoding="utf-8"?>
<module>
<nodespace></nodespace>
<graph>


<!-- Keyboard-->
<node name="key_calibrate" type="KeyCallback">
<param name="key" value="c"/>
<param name="description" value="calibration key"/>
</node>

<!-- calibrate-->
<node name="key_calibrate_LatestUpdate" type="LatestUpdate[bool]"/>
<node name="calibration_condition" type="ConditionalRoute"/>
<node name="calibration" type="Substract[VistaVector3D]"/>

<!-- time input -->
<node name="timer" type="Timer" />

<!-- icaros device input -->
<node name="icaros" type="DriverSensor">
<param name="sensor_index" value="0" />
<param name="driver" value="ICAROS" />
</node>

<node name="history" type="HistoryProject">
<param name="project">ORIENTATION, BUTTON_1, BUTTON_2, BUTTON_3, BUTTON_4</param>
</node>

<node name="sampling_mode" type="ConstantValue[int]">
<param name="value" value="0" />
</node>

<!-- observer output -->
<node name="observer" type="ObserverNavigationNode">
<param name="max_linear_speed" value="10, 10, 10" />
<param name="max_angular_speed" value="2" />
<param name="angular_deceleration" value="1" />
<param name="linear_acceleration" value="3" />
<param name="linear_deceleration" value="1" />
<param name="prevent_navigation_when_hovered_gui" value="false" />
<param name="fixed_horizon" value="true" />
</node>

<!-- rotation -->
<node name="movement" type="Compose3DVector" />

<node name="rotation_delay" type="Delay[VistaQuaternion]" /> <!-- hier kommt rotation rein raus kommt rotation vom frame davor -->
<node name="rotation_delay_invert" type="Invert[VistaQuaternion]" /> <!-- Hier kommt das aus delay rein -->
<node name="rotation_dif" type="Multiply[VistaQuaternion]" /> <!-- hier kommt rein das original und das inverte -->



<!-- yaw rotation -->
<node name="orientation_invert" type="Invert[VistaQuaternion]"/>
<node name="quaterionToEuler" type="QuaternionToEuler"/>
<node name="deconstruct" type="Decompose3DVector"/>

<node name="yaw" type="AxisRotate"/>


<node name="roll_absolute" type="Absolute[float]"/>
<node name="roll_limited" type="Threshold[float]"/>

<node name="roll_bool" type="LessEqual[float]"/>
<node name="roll_sign_invert_bool" type="Invert[bool]"/>
<node name="roll_sign_null_one" type="TypeConvert[bool,float]"/>
<node name="roll_sign_multiply" type="Multiply[float]"/>
<node name="roll_sign" type="Substract[float]"/>

<node name="roll" type="Multiply[float]"/>
<node name="roll_calibration" type="Multiply[float]"/>

<!-- pitch rotaion -->
<node name="pitch_calibrate" type="Multiply[float]"/>
<node name="pitch" type="AxisRotate"/>

<!-- speed -->
<node name="key_speed_up" type="LatestUpdate[bool]"/>
<node name="key_speed_down" type="LatestUpdate[bool]"/>

<node name="convert_speed_up" type="TypeConvert[bool,float]"/>
<node name="convert_speed_down" type="TypeConvert[bool,float]"/>

<node name="delta_int_speed" type="Substract[float]"/>



<node name="speed_level" type="Add[float]"/>

<node name="observer_speed" type="ConstantValue[float]">
<param name="value" value="-0.01"/>
</node>

<node name="clamp_high" type="Min[float]"/>
<node name="clamp_low" type="Max[float]"/>

<node name="updated_speed" type="Multiply[float]"/>

<node name="pitch_orientation" type="Add[float]"/>
<node name="pitch_orientation_value" type="ConstantValue[float]"> <!-- Nicken ausrichtung -->
<param name="value" value="0.0" />
</node>
<!-- constant float values -->
<node name="zero" type="ConstantValue[float]">
<param name="value" value="0"/>
</node>

<node name="two" type="ConstantValue[float]">
<param name="value" value="-2.0" />
</node>

<node name="minusOne" type="ConstantValue[float]">
<param name="value" value="-1.0" />
</node>

<!-- setting values -->
<node name="pitch_calibrate_value" type="ConstantValue[float]"> <!-- Pitch stärke einstellen welche winkel sind möglich -->
<param name="value" value="0.8" />
</node>

<node name="roll_calibration_value" type="ConstantValue[float]"> <!-- Rollen einstellen -->
<param name="value" value="0.5" />
</node>
<node name="last_speed_level" type="ConstantValue[float]">
<param name="value" value="0.0" />
</node>

<node name="threshhold_value" type="ConstantValue[float]">
<param name="value" value="0.0" />
</node>

<node name="yaw_axis" type="ConstantValue[VistaVector3D]">
<param name="value" value="0,1,0,0" />
</node>

<node name="pitch_axis" type="ConstantValue[VistaVector3D]">
<param name="value" value="1,0,0,0" />
</node>

<!-- clamp values -->
<node name="clamp_low_value" type="ConstantValue[float]">
<param name="value" value="0" />
</node>
<node name="clamp_high_value" type="ConstantValue[float]">
<param name="value" value="100" />
</node>

<!-- debug text -->
<node name="debug_text" type="SimpleText"/>

</graph>

<edges>

<edge fromnode="icaros" tonode="history" fromport="history" toport="history" />
<edge fromnode="sampling_mode" tonode="history" fromport="value" toport="sampling_mode" />
<edge fromnode="history" tonode="orientation_invert" fromport="ORIENTATION" toport="in" />
<!-- debug text history -->
<edge fromnode="history" tonode="debug_text" fromport="ORIENTATION" toport="history_Orientation" />

<edge fromnode="orientation_invert" tonode="quaterionToEuler" fromport="out" toport="quaternion" />
<edge fromnode="calibration" tonode="deconstruct" fromport="out" toport="in" />
<!-- debug text calibartion -->

<edge fromnode="deconstruct" tonode="pitch_orientation" fromport="x" toport="first" />
<edge fromnode="pitch_orientation_value" tonode="pitch_orientation" fromport="value" toport="second" />
<edge fromnode="pitch_orientation" tonode="pitch_calibrate" fromport="out" toport="first" />
<edge fromnode="deconstruct" tonode="debug_text" fromport="x" toport="deconstruct_" />


<edge fromnode="pitch_calibrate_value" tonode="pitch_calibrate" fromport="value" toport="second" />
<edge fromnode="pitch_calibrate" tonode="pitch" fromport="out" toport="angle" />
<edge fromnode="pitch_axis" tonode="pitch" fromport="value" toport="axis" />
<!-- debug text movement -->
<edge fromnode="pitch_calibrate" tonode="debug_text" fromport="out" toport="pitch_calibrate" />

<edge fromnode="deconstruct" tonode="roll_absolute" fromport="y" toport="in" />
<edge fromnode="deconstruct" tonode="roll_bool" fromport="y" toport="first" />

<edge fromnode="zero" tonode="roll_bool" fromport="value" toport="second" />
<edge fromnode="roll_bool" tonode="roll_sign_invert_bool" fromport="out" toport="in" />

<edge fromnode="roll_sign_invert_bool" tonode="roll_sign_null_one" fromport="out" toport="in" />

<edge fromnode="roll_sign_null_one" tonode="roll_sign_multiply" fromport="out" toport="first" />
<edge fromnode="two" tonode="roll_sign_multiply" fromport="value" toport="second" />
<edge fromnode="roll_sign_multiply" tonode="roll_sign" fromport="out" toport="first" />
<edge fromnode="minusOne" tonode="roll_sign" fromport="value" toport="second" />
<edge fromnode="roll_absolute" tonode="roll_limited" fromport="out" toport="in" />
<edge fromnode="threshhold_value" tonode="roll_limited" fromport="value" toport="threshold" />
<edge fromnode="roll_limited" tonode="roll" fromport="out" toport="first" />
<edge fromnode="roll_sign" tonode="roll" fromport="out" toport="second" />

<edge fromnode="roll" tonode="roll_calibration" fromport="out" toport="first" />
<edge fromnode="roll_calibration_value" tonode="roll_calibration" fromport="value" toport="second" />
<edge fromnode="roll_calibration" tonode="yaw" fromport="out" toport="angle" />
<edge fromnode="yaw_axis" tonode="yaw" fromport="value" toport="axis" />
<!-- debug text rolling to yaw -->

<edge fromnode="deconstruct" tonode="debug_text" fromport="y" toport="y" />
<edge fromnode="roll_bool" tonode="debug_text" fromport="out" toport="roll_bool" />
<edge fromnode="roll_sign_invert_bool" tonode="debug_text" fromport="out" toport="roll_sign_invert_bool" />
<edge fromnode="roll_sign_null_one" tonode="debug_text" fromport="out" toport="roll_sign_null_one" />
<edge fromnode="roll_sign_multiply" tonode="debug_text" fromport="out" toport="roll_sign_multiply" />
<edge fromnode="roll_sign" tonode="debug_text" fromport="out" toport="roll_sign" />

<edge fromnode="history" tonode="key_speed_up" fromport="BUTTON_2" toport="in_1" />
<edge fromnode="history" tonode="key_speed_down" fromport="BUTTON_3" toport="in_1" />
<edge fromnode="key_speed_up" tonode="convert_speed_up" fromport="out" toport="in" />
<edge fromnode="key_speed_down" tonode="convert_speed_down" fromport="out" toport="in" />
<edge fromnode="convert_speed_up" tonode="delta_int_speed" fromport="out" toport="first" />
<edge fromnode="convert_speed_down" tonode="delta_int_speed" fromport="out" toport="second" />
<edge fromnode="clamp_low_value" tonode="clamp_low" fromport="value" toport="first" />
<edge fromnode="clamp_high_value" tonode="clamp_high" fromport="value" toport="first" />
<edge fromnode="delta_int_speed" tonode="speed_level" fromport="out" toport="second" />
<edge fromnode="last_speed_level" tonode="speed_level" fromport="value" toport="first" />
<edge fromnode="speed_level" tonode="clamp_low" fromport="out" toport="second" />
<edge fromnode="clamp_low" tonode="clamp_high" fromport="out" toport="second" />
<edge fromnode="clamp_high" tonode="speed_level" fromport="out" toport="first" />
<edge fromnode="speed_level" tonode="updated_speed" fromport="out" toport="second" />

<!-- debug text speedlevel /> -->
<edge fromnode="speed_level" tonode="debug_text" fromport="out" toport="speed_level" />


<edge fromnode="observer_speed" tonode="updated_speed" fromport="value" toport="first" />
<!-- debug text speedlevel /> -->
<edge fromnode="observer_speed" tonode="debug_text" fromport="value" toport="observer_speed" />
<edge fromnode="updated_speed" tonode="debug_text" fromport="out" toport="updated_speed" />


<edge fromnode="key_calibrate" tonode="key_calibrate_LatestUpdate" fromport="state" toport="in_1" />
<edge fromnode="key_calibrate_LatestUpdate" tonode="calibration_condition" fromport="out" toport="trigger" />
<edge fromnode="quaterionToEuler" tonode="calibration_condition" fromport="out" toport="euler" />
<edge fromnode="calibration_condition" tonode="calibration" fromport="euler" toport="second" />
<edge fromnode="quaterionToEuler" tonode="calibration" fromport="out" toport="first" />
<!-- debug text speedlevel /> -->


<edge fromnode="yaw" tonode="observer" fromport="out" toport="rotation" />
<edge fromnode="pitch" tonode="rotation_delay" fromport="out" toport="in" />
<edge fromnode="rotation_delay" tonode="rotation_delay_invert" fromport="out" toport="in" />
<edge fromnode="rotation_delay_invert" tonode="rotation_dif" fromport="out" toport="first" />
<edge fromnode="pitch" tonode="rotation_dif" fromport="out" toport="second" />

<edge fromnode="rotation_dif" tonode="observer" fromport="out" toport="rotation_offset" />



<edge fromnode="zero" tonode="movement" fromport="value" toport="y" />
<edge fromnode="zero" tonode="movement" fromport="value" toport="x" />
<edge fromnode="updated_speed" tonode="movement" fromport="out" toport="z" />
<edge fromnode="movement" tonode="observer" fromport="out" toport="translation" />
<edge fromnode="timer" tonode="observer" fromport="time" toport="time" />
<!-- debug text speedlevel /> -->
<edge fromnode="movement" tonode="debug_text" fromport="out" toport="translation" />

</edges>

</module>
Loading