Start of trail End of trail navigation bar

Table of Contents

PTI Visualeyez

Reads raw 3D marker position and rigid body position and orientation data from the Phoenix Technologies Incorporated Visualeyez tracker system.

Library

QUARC Targets/Devices/Third-Party/PhoeniX Technologies Inc./Interface

Description

PTI Visualeyez

The PTI Visualeyez block can be used to read marker positions that are setup as targets in the PTI VZSoft tracking software, as well as positions and orientations of rigid body objects that are setup in the PTI VZAnalyzer tracking software.

The PTI Visualeyez block may be configured to access the PTI tracking system locally (referred to as "direct access") or remotely. The choice of local or remote access is determined by the Source of URI parameter. If this parameter is set to None (direct access) then the PTI Visualeyez block attempts to access a PTI tracking system running on the same computer.

Any other value of this parameter causes it to use the given URI to contact a Quanser PTI Visualeyez Server application running on a remote computer to obtain the tracking data. In this case, the PTI VZSoft and/or VZAnalyzer tracking system software must be running on the remote computer.

The remote system is identified by a Universal Resource Identifier (URI), such as tcpip://remotehost:8000?nagle=no or udp://remotehost:9000. QUARC uses URI's for all its communications because it provides a uniform, extensible and flexible means of identifying the communication protocol to use and the associated communication parameters. Refer to Universal Resource Identifiers for more information.

The URI is specified in the URI of Quanser's PTI Visualeyez server parameter. The Quanser PTI Visualeyez Server application running on the remote tracking system must be configured with a compatible URI (typically the same URI).

Hint When the URI is specified as a dialog parameter and is not evaluated then the URI is configuration-dependent. A separate URI may be entered for each model configuration as well as for normal simulation. Thus, it is possible to employ a different URI for each target, without making a new diagram. The URI that is entered becomes the URI for the currently active configuration when the Simulation mode is set to External. It becomes the URI for normal simulation when the Simulation mode is set to Normal.

Installation Requirements

Install In order to use the PTI Visualeyez block with marker data, the PTI VZSoft software version 2.90 must be installed and running. Before the PTI Visualeyez block is able to read marker tracking data, VZSoft must be started so that it is actively capturing data. Note that the configuration of the VZSoft software affects the target markers that will be tracked and the units of the marker positions. The VZSoft units should be set to mm. See the VZSoft user manual for more information.

Install In order to use the PTI Visualeyez block with rigid body data, the PTI VZAnalyzer software version 3.60 must be installed and running. Before the PTI Visualeyez block is able to read rigid body tracking data, VZAnalyzer must be started so that it is actively capturing data.

Install If this block is used with a URI for accessing a remote Visualeyez tracker system then the VZSoft and/or VZAnalyzer software must be installed and running on the remote system. Furthermore, Quanser's PTI Visualeyez Server must also be running on the remote system and be configured to use a compatible URI.

Input Ports

This block has no input ports.

Output Ports

m_xyz

A vector containing 3*n elements, where n is the number of markers specified in the block parameters. Each group of 3 elements represents the xyz position coordinates of a marker in meters; e.g., the output vector [x_1, y_1, z_1, x_2, y_2, z_2] contains the xyz coordinates (x_1, y_1, z_1) and (x_2, y_2, z_2) for markers 1 and 2, respectively. If a marker is not detected in the current frame its xyz marker position holds its previous value. Note that the markers selected depends on the channel numbers specified in the block's Marker channel numbers parameter.

Note that the position units is specified in the VZSoft Data Units setting.

m_valid

A boolean vector indicating the detection status of each marker. The vector contains n boolean elements, where n is the number of markers specified in the block parameters. If element i (i = 1, .., n) is 0 (false) then marker i is not detected in the current frame and its xyz position is not guaranteed to be valid. If element i is 1 (true) then marker i is detected in the current frame and its xyz position is valid.

r_xyz

A vector containing 3*n elements, where n is the number of rigid body objects specified in the block parameters. Each group of 3 elements represents the xyz position coordinates of a rigid body in meters; e.g., the output vector [x_1, y_1, z_1, x_2, y_2, z_2] contains the xyz coordinates (x_1, y_1, z_1) and (x_2, y_2, z_2) for rigid bodies 1 and 2, respectively. If a rigid body is not detected in the current frame its xyz position holds its previous value. Note that the rigid bodies selected depends on the rigid body IDs specified in the block's Rigid body IDs parameter.

r_xyzv

A vector containing 3*n elements, where n is the number of rigid body objects specified in the block parameters. Each group of 3 elements represents the xyz velocities of a rigid body in meters/second. If a rigid body is not detected in the current frame its xyz velocity holds its previous value. Note that the rigid bodies selected depends on the rigid body IDs specified in the block's Rigid body IDs parameter.

r_rot

A vector containing 3*n elements, where n is the number of rigid body objects specified in the block parameters. Each group of 3 elements represents the roll, pitch, and yaw rotation angles of a rigid body in radians; e.g., the output vector [r_1, p_1, y_1, r_2, p_2, y_2] contains the rpy coordinates (r_1, p_1, y_1) and (r_2, p_2, y_2) for rigid bodies 1 and 2, respectively. If a rigid body is not detected in the current frame its rotation angle output holds its previous value. Note that the rigid bodies selected depends on the rigid body IDs specified in the block's Rigid body IDs parameter.

r_rotv

A vector containing 3*n elements, where n is the number of rigid body objects specified in the block parameters. Each group of 3 elements represents the rotational velocities of a rigid body in radians/second about the roll, pitch, and yaw directions, respectively. If a rigid body is not detected in the current frame its rotational velocity output holds its previous value. Note that the rigid bodies selected depends on the rigid body IDs specified in the block's Rigid body IDs parameter.

r_pts

A vector containing n elements, where n is the number of rigid body objects specified in the block parameters. Each element contains the number of points (markers) detected for each rigid body in the order specified by the Rigid body IDs parameter. This value can be used to guage whether the outputs for each rigid body are valid or not; in general, the more markers used to measure the position and orientation of a rigid body the more accurate the measurement becomes. Note that the rigid bodies selected depends on the rigid body IDs specified in the block's Rigid body IDs parameter.

r_new

A boolean vector indicating the status of each rigid body. The vector contains n boolean elements, where n is the number of rigid bodies specified in the block parameters. If element i (i = 1, .., n) is 0 (false) then there is no new data for rigid body i. If element i is 1 (true) then there is new data available for rigid body i. Note that the rigid bodies selected depends on the rigid body IDs specified in the block's Rigid body IDs parameter.

Parameters and Dialog Box

PTI Visualeyez

Source of URI

Indicates whether the URI should be determined from the dialog parameters or whether direct access to the PTI tracking system should be used. If this field is set to Specify via dialog (do not evaluate) then the URI is specified via the URI of Quanser's PTI Visualeyez server parameter. In this case, the URI is not evaluated as a MATLAB expression but is interpreted as a literal string. However, format specifiers are recognized. Refer to qc_perform_substitutions for a list of the format specifiers available.

Warning If format specifiers which change frequently, such as '%{time}' or '%{instance}', are used in the URI then the PTI Visualeyez block cannot be placed in a referenced model, because the URI will change from the time the code is built to when the code is run. As a result, Simulink will insist that the code be rebuilt because block parameters in referenced models are inlined.

If this field is set to Specify via dialog (evaluate) then the URI is also specified via the URI of Quanser's PTI Visualeyez server parameter. However, in this case, the URI is evaluated as a MATLAB expression. This option is convenient for using a variable in the MATLAB workspace for the URI.

If this field is set to None (direct access) then the URI of Quanser's PTI Visualeyez server parameter is ignored and the URI is not used. Instead, the PTI Visualeyez block accesses the PTI tracking system software directly. This option is only supported when the tracking system is running on the same computer.

URI of Quanser's PTI Visualeyez server (tunable offline)

The URI identifying the remote host to which to connect. This parameter identifies the communication protocol and associated parameters. For example, tcpip://quanser-dev:18000?nagle=no connects to the remote host called quanser-dev using TCP/IP on port 18000. This field is only used if the Source of URI parameter is set to Specify via dialog (do not evaluate) or Specify via dialog (evaluate). Refer to Universal Resource Identifiers for more information about URIs and the communications protocols supported by QUARC.

Hint

When using TCP/IP, better latency performance is achieved if the Nagle algorithm is turned off. To disable the Nagle algorithm, add the "nagle=no" option to the URI. For example: tcpip://remhost:18000?nagle=no.

Marker channel numbers (tunable offline)

A vector of integer channel numbers that selects the markers to be tracked. Valid channel numbers depend on the target control modules and LED channels being used in the VZSoft target sequence editor (see the VZSoft user manual for further information). The order in which the channel numbers are specified in this vector is the order that the xyz position elements will appear in the output vector m_xyz and m_valid.

If this vector is empty then no markers are tracked.

Rigid body IDs (tunable offline)

A vector of integer rigid body ID numbers that selects the rigid body objects to be tracked. Valid ID numbers depend on the rigid body definitions setup in VZAnalyzer (see the VZAnalyzer user manual for further information). The order in which the ID numbers are specified in this vector is the order that the position and orientation elements will appear in the output vectors r_xyz, r_xyzv, r_rot, r_rotv, r_pts and r_valid.

If this vector is empty then no rigid bodies are tracked and the VZAnalyzer application does not need to be running.

Sample time

The sample time of the block. A sample time of 0 indicates that the block will be treated as a continuous time block. A positive sample time indicates that the block is a discrete time block with the given sample time.

A sample time of -1 indicates that the block inherits its sample time. Since this is a source block, only inherent the sample time when it is placed in a conditionally executed subsystem, like a Triggered or Enabled Subsystem, or in a referenced model.

To use the fundamental sampling time of the model, set the sample time to qc_get_step_size, which is a QUARC function that returns the fundamental sampling time of the model.

Active during normal simulation (tunable offline)

Indicates whether this block should execute during normal simulation. If this option is not checked then the block will do nothing during normal simulation. This parameter has no effect on generated code.

Targets

Target Name

Compatible*

Model Referencing

Comments

QUARC Win32 Target

Yes

Yes

QUARC Win64 Target

Yes

Yes

Direct access is not supported, but it is possible to connect to a PTI tracking system on a Win-32 machine.

QUARC Linux Nvidia Target

Yes

Yes

Direct access is not supported, but it is possible to connect to a PTI tracking system on a Win-32 machine.

QUARC Linux QBot Platform Target

Yes

Yes

Direct access is not supported, but it is possible to connect to a PTI tracking system on a Win-32 machine.

QUARC Linux QCar 2 Target

Yes

Yes

Direct access is not supported, but it is possible to connect to a PTI tracking system on a Win-32 machine.

QUARC Linux QDrone 2 Target

Yes

Yes

Direct access is not supported, but it is possible to connect to a PTI tracking system on a Win-32 machine.

QUARC Linux Raspberry Pi 3 Target

Yes

Yes

Direct access is not supported, but it is possible to connect to a PTI tracking system on a Win-32 machine.

QUARC Linux Raspberry Pi 4 Target

Yes

Yes

Direct access is not supported, but it is possible to connect to a PTI tracking system on a Win-32 machine.

QUARC Linux RT ARMv7 Target

Yes

Yes

Direct access is not supported, but it is possible to connect to a PTI tracking system on a Win-32 machine.

QUARC Linux x64 Target

Yes

Yes

Direct access is not supported, but it is possible to connect to a PTI tracking system on a Win-32 machine.

QUARC Linux DuoVero Target

Yes

Yes

Direct access is not supported, but it is possible to connect to a PTI tracking system on a Win-32 machine.

QUARC Linux DuoVero 2016 Target

Yes

Yes

Direct access is not supported, but it is possible to connect to a PTI tracking system on a Win-32 machine.

QUARC Linux Verdex Target

Yes

Yes

Direct access is not supported, but it is possible to connect to a PTI tracking system on a Win-32 machine.

QUARC QNX x86 Target

Yes

Yes

Last fully supported in QUARC 2018.

Rapid Simulation (RSIM) Target

Yes

Yes

Direct access is not supported, but it is possible to connect to a PTI tracking system on a Win-32 machine.

S-Function Target

No

N/A

Old technology. Use model referencing instead.

Normal simulation

Yes

Yes

Direct access is not supported, but it is possible to connect to a PTI tracking system on a Win-32 machine.

* Compatible means that the block can be compiled for the target.

 

navigation bar