Wrapper class to create an input Device, a GroundFollowing instance, an InputMapping and a Platform.
More...
Wrapper class to create an input Device, a GroundFollowing instance, an InputMapping and a Platform.
Furthermore, this class reacts on the device's button inputs and toggles the 3-DOF (realistic) / 6-DOF (unrealistic) navigation mode. When switching from unrealistic to realistic mode, an animation is triggered in which the platform is rotated back in an upright position (removal of pitch and roll angle). It also handles couplings and their animations with other Navigation instances. Apart from that, it uses the class Trace to draw lines representing its past movements.
def lib-server.Navigation.Navigation.__init__ |
( |
|
self | ) |
|
def lib-server.Navigation.Navigation.activate_realistic_mode |
( |
|
self | ) |
|
Activates 3-DOF (realistic) navigation mode.
def lib-server.Navigation.Navigation.animate_coupling |
( |
|
self | ) |
|
Animates the movement to another platform during the coupling process.
def lib-server.Navigation.Navigation.animate_dofchange |
( |
|
self | ) |
|
Animates the removal of pitch and roll angles when switching from 6-DOF (unrealistic) to 3-DOF (realistic) navigation mode.
def lib-server.Navigation.Navigation.clear_couplings |
( |
|
self | ) |
|
Decouples this Navigation from all coupled Navigations.
def lib-server.Navigation.Navigation.couple_navigation |
( |
|
self, |
|
|
|
NAVIGATION |
|
) |
| |
Bidirectional coupling of this and another navigation.
- Parameters
-
def lib-server.Navigation.Navigation.deactivate_realistic_mode |
( |
|
self | ) |
|
Activates 6-DOF (unrealistic) navigation mode.
def lib-server.Navigation.Navigation.decouple_navigation |
( |
|
self, |
|
|
|
NAVIGATION |
|
) |
| |
Bidirectional decoupling of this and another navigation.
- Parameters
-
def lib-server.Navigation.Navigation.evaluate |
( |
|
self | ) |
|
def lib-server.Navigation.Navigation.get_current_world_pos |
( |
|
self | ) |
|
Computes the current world position of the rotation center on the platform ground (y = 0).
def lib-server.Navigation.Navigation.my_constructor |
( |
|
self, |
|
|
|
NET_TRANS_NODE, |
|
|
|
SCENEGRAPH, |
|
|
|
PLATFORM_SIZE, |
|
|
|
SCALE, |
|
|
|
STARTING_MATRIX, |
|
|
|
NAVIGATION_LIST, |
|
|
|
INPUT_SENSOR_TYPE, |
|
|
|
INPUT_SENSOR_NAME, |
|
|
|
NO_TRACKING_MAT, |
|
|
|
GF_SETTINGS, |
|
|
|
ANIMATE_COUPLING, |
|
|
|
MOVEMENT_TRACES, |
|
|
|
INVERT, |
|
|
|
SLOT_MANAGER, |
|
|
|
TRANSMITTER_OFFSET, |
|
|
|
DISPLAYS, |
|
|
|
AVATAR_TYPE, |
|
|
|
CONFIG_FILE, |
|
|
|
TRACKING_TARGET_NAME = None |
|
) |
| |
Custom constructor.
- Parameters
-
NET_TRANS_NODE | Reference to the net matrix node in the scenegraph for distribution. |
SCENEGRAPH | Reference to the scenegraph in which the navigation should take place. |
PLATFORM_SIZE | Physical size of the platform in meters. Passed in an two-element list: [width, depth] |
SCALE | Start scaling of the platform. |
STARTING_MATRIX | Initial position matrix of the platform to be created. |
NAVIGATION_LIST | List of all navigations in the setup. |
INPUT_SENSOR_TYPE | String indicating the type of input device to be created, e.g. "XBoxController" or "OldSpheron" |
INPUT_SENSOR_NAME | Name of the input device sensor as chosen in daemon. |
NO_TRACKING_MAT | Matrix which should be applied if no tracking is available. |
GF_SETTINGS | Setting list for the GroundFollowing instance: [activated, ray_start_height] |
ANIMATE_COUPLING | Boolean indicating if an animation should be done when a coupling of navigations is initiated. |
MOVEMENT_TRACES | Boolean indicating if the device should leave traces behind. |
INVERT | Boolean indicating if the input values should be inverted. |
SLOT_MANAGER | Reference to the one and only SlotManager instance in the setup. |
TRANSMITTER_OFFSET | The matrix offset that is applied to the values delivered by the tracking system. |
DISPLAYS | The names of the displays that belong to this navigation. |
AVATAR_TYPE | A string that determines what kind of avatar representation is to be used ["joseph", "joseph_table", "kinect"]. |
CONFIG_FILE | The path to the config file that is used. |
TRACKING_TARGET_NAME | Name of the device's tracking target name as chosen in daemon. |
def lib-server.Navigation.Navigation.reset |
( |
|
self | ) |
|
Resets the platform's matrix to the initial value.
def lib-server.Navigation.Navigation.set_coupling_animation_settings |
( |
|
self, |
|
|
|
TARGET_NAVIGATION |
|
) |
| |
Sets all the necessary attributes to perform a lerp and slerp animation to another navigation.
- Parameters
-
TARGET_NAVIGATION | The Navigation instance to animate to. |
def lib-server.Navigation.Navigation.sf_coupling_trigger_changed |
( |
|
self | ) |
|
Evaluated when value changes.
def lib-server.Navigation.Navigation.sf_dof_trigger_changed |
( |
|
self | ) |
|
Evaluated when value changes.
def lib-server.Navigation.Navigation.sf_reset_trigger_changed |
( |
|
self | ) |
|
Evaluated when value changes.
def lib-server.Navigation.Navigation.trigger_coupling |
( |
|
self | ) |
|
Triggers the coupling mechanism.
When other platforms are close enough, they are coupled to each other.
def lib-server.Navigation.Navigation.trigger_dofchange |
( |
|
self | ) |
|
Switches from realistic to unrealistic or from unrealistic to realistic mode on this and all other coupled instances.
lib-server.Navigation.Navigation.ANIMATE_COUPLING |
Boolean indicating if an animation should be done when a coupling of navigations is initiated.
lib-server.Navigation.Navigation.animation_start_time |
Point in time where the animation started.
lib-server.Navigation.Navigation.animation_time |
Time of the rotation animation in relation to the rotation distance.
lib-server.Navigation.Navigation.coupled_navigations |
lib-server.Navigation.Navigation.device |
Device instance handling relative inputs of physical device.
lib-server.Navigation.Navigation.groundfollowing |
GroundFollowing instance to correct the absolute matrices with respect to gravity.
lib-server.Navigation.Navigation.in_coupling_animation |
Boolean variable to indicate if a movement animation for coupling is in progress.
lib-server.Navigation.Navigation.in_dofchange_animation |
Boolean variable to indicate if a movement animation for a DOF change (realistic/unrealistic) is in progress.
lib-server.Navigation.Navigation.input_sensor_name |
Name of the input device sensor as chosen in daemon.
lib-server.Navigation.Navigation.input_sensor_type |
String indicating the type of input device to be created, e.g.
"XBoxController" or "OldSpheron"
lib-server.Navigation.Navigation.inputmapping |
InputMapping instance to process and map relative device inputs to an absolute matrix.
lib-server.Navigation.Navigation.material_used |
|
static |
Initial value: 1 = [
False,
False,
False,
False,
False,
2 False,
False,
False,
False,
False]
List of booleans to indicate if a material in trace_materials was already used.
lib-server.Navigation.Navigation.movement_traces |
Boolean indicating if the movement traces are currently visualized by line segments.
lib-server.Navigation.Navigation.movement_traces_activated |
Boolean indicating if the movement traces are generally activated.
lib-server.Navigation.Navigation.NAVIGATION_LIST |
Reference to a list containing all Navigation instances in the setup.
lib-server.Navigation.Navigation.NET_TRANS_NODE |
Reference to the net matrix node in the scenegraph for distribution.
lib-server.Navigation.Navigation.platform |
lib-server.Navigation.Navigation.SCENEGRAPH |
Reference to the scenegraph.
tuple lib-server.Navigation.Navigation.sf_coupling_trigger = avango.SFBool() |
|
static |
tuple lib-server.Navigation.Navigation.sf_dof_trigger = avango.SFBool() |
|
static |
tuple lib-server.Navigation.Navigation.sf_reset_trigger = avango.SFBool() |
|
static |
lib-server.Navigation.Navigation.start_matrix |
Initial position matrix of the platform.
lib-server.Navigation.Navigation.start_rot |
Quaternion representing the start rotation of the animation.
lib-server.Navigation.Navigation.start_rot_center_mat |
Matrix representing the transformation of the start navigation's rotation center (used for coupling animation purposes).
lib-server.Navigation.Navigation.start_trans |
Starting translation vector of the animation.
lib-server.Navigation.Navigation.target_navigation |
Reference to the target Navigation instance used in coupling animations.
Used for updating target_trans when the rotation center moves.
lib-server.Navigation.Navigation.target_rot |
Quaternion representing the target rotation of the animation.
lib-server.Navigation.Navigation.target_trans |
The current animation's target translation.
lib-server.Navigation.Navigation.timer |
Instance of TimeSensor to handle the duration of animations.
lib-server.Navigation.Navigation.trace |
The trace class that handles the line segment updating.
Instance of Trace class to handle trace drawing of this navigation's movements.
lib-server.Navigation.Navigation.trace_material |
The material to be used for the movement traces.
lib-server.Navigation.Navigation.trace_materials |
|
static |
Initial value: 1 = [
'AvatarBlue',
'AvatarCyan',
'AvatarGreen',
'AvatarMagenta',
'AvatarDarkGreen',
2 'AvatarOrange',
'AvatarRed',
'AvatarWhite',
'AvatarYellow',
'AvatarGrey']
List of material pretexts to choose from when a trace is created.
All avatars on this platform will have this material.
The documentation for this class was generated from the following file: