OptiTrack Point Cloud End of trail navigation bar

Table of Contents

Vicon

Selects Vicon segments, markers, and unlabeled markers for tracking.

Library

QUARC Targets/Devices/Third-Party/Vicon

MATLAB Command Line

Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:

qc_open_library('quarc_library/Devices/Third-Party/Vicon')

Description

Vicon

The Vicon block uses the Vicon DataStream API and Tracker software to read translation and rotation measurements from the Vicon tracking system. Segments and named markers setup for tracking in the Vicon Tracker software (via Objects) can be referenced by name in the Vicon block. Unlabeled markers are referenced by index value.

Installation Requirements

Install In order to use the Vicon block, the Vicon Tracker version 3.6 and newer, and Vicon DataStream SDK version 1.7.0 or 1.8.0 must be installed and licensed. This software can be purchased and downloaded from Vicon. Make sure to download the 32-bit or 64-bit Vicon software packages if you are using 32-bit or 64-bit Windows, respectively.

The Vicon DataStream directory must be added to the system Path environment variable. For example, if the DataStream SDK is installed under C:\Program Files\Vicon\DataStream SDK, the following should be added to the system's Path environment variable: C:\Program Files\Vicon\DataStream SDK\Win32\CPP (note that the path is different for a 64-bit installation of the Vicon DataStream SDK). Note that the computer will have to be rebooted after adding the directories to the Path environment variable before the blocks can be used.

The Vicon Tracker software is used for calibrating the cameras, defining the workspace coordinate frame, and defining objects including segments and markers. Once calibrated, objects can be defined and named and later referenced in the Vicon block parameters. The Vicon Tracker software must be running with the desired objects selected for tracking in order for the Vicon block to read the tracking data. Refer to the Vicon Tracker user manual for instructions on setting up the camera system and calibrating the cameras.

Input Ports

This block has no input ports.

Output Ports

seg xyz

A vector containing 3*n elements, where n is the number of segments specified in the block parameters. Each group of 3 elements represents the xyz translation coordinates of a segment 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 segments 1 and 2, respectively. If a segment is not detected in the current frame its xyz marker position holds its previous value.

seg rot

A rotation vector containing 3*n elements, where n is the number of segments specified in the block parameters. Each group of 3 elements represents the Euler rotation in radians about the XYZ axes with respect to the global frame. Note that the global axes are defined in the Vicon Tracker software. If a segment is not detected in the current frame its rotation output holds its previous value.

seg valid

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

marker 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 translation 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.

marker 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 the marker i is occluded in the current frame and its position is not guaranteed to be valid. If element i is 1 (true) then the marker i is detected in the current frame and its position is valid.

UL marker xyz

A vector containing 3*n elements, where n is the number of unlabeled markers specified in the block parameters. Each group of 3 elements represents the xyz translation coordinates of an unlabeled 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 unlabeled markers 1 and 2, respectively. If an unlabeled marker is not detected in the current frame its xyz marker position holds its previous value. Note that unlabeled markers are not ordered since they are unlabeled and the index of any unlabeled marker may change during tracking, which will result in the unlabeled marker outputs "jumping" between unlabeled marker values during the experiment. For more predictable tracking of markers, use labeled markers instead.

UL marker valid

A boolean vector indicating the detection status of each unlabeled marker. The vector contains n boolean elements, where n is the number of unlabeled markers specified in the block parameters. If element i (i = 1, .., n) is 0 (false) then the unlabeled marker i is occluded in the current frame and its position is not guaranteed to be valid. If element i is 1 (true) then the unlabeled marker i is detected in the current frame and its position is valid. Note that unlabeled markers are not ordered since they are unlabeled and the index of unlabeled markers may change during tracking, which will result in the unlabeled marker outputs "jumping" between unlabeled marker values during the experiment. For more predictable tracking of markers, use labeled markers instead.

frame

An integer containing the number of the last frame retrieved from the DataStream. During proper execution, this frame number should be monotonically increasing.

latency

The total latency in seconds introduced at various stages of the real-time pipeline. If no latency information is available then all latencies will be reported as 0.0.

Parameters and Dialog Box

Vicon

Host name

The DNS identifiable name or IP address of the PC hosting the DataStream server. The default connection when the model is executed on the same PC as that running the Vicon Tracker is localhost:801. You can specify an alternate port number after the colon.

List of segments

This list specifies the segment objects, if any, that the Vicon block will try to read from the Vicon DataStream. Segments are referenced by subject name and segment name. To add a segment to the list, type the subject and segment name formatted as SubjectName.SegmentName in the editable field below the list and press the + button to add it to the list. Alternatively segments can be added by clicking on the ... button, which query the list of segments from a running Tracker application that you can select to be added. Remove a segment from the list by selecting the item in the list and pressing the - button. Segments in the list can be re-ordered by selecting them in the list and pressing the up and down arrow buttons. Note that the segments and segment names must be defined using the Vicon Tracker software (via the Objects tab).

List of markers

This list specifies the marker objects, if any, that the Vicon block will try to read from the Vicon DataStream. Markers are referenced by subject name and marker name. To add a marker to the list, type the subject and marker name formatted as SubjectName.MarkerName in the editable field below the list and press the + button to add it to the list. Alternatively markers can be added by clicking on the ... button, which query the list of markers from a running Tracker application that you can select to be added. Remove a marker from the list by selecting the item in the list and pressing the - button. Markers in the list can be re-ordered by selecting them in the list and pressing the up and down arrow buttons. Note that the markers and marker names must be defined using the Vicon Tracker software (via the Objects tab).

Unlabeled markers

This list specifies the unlabeled markers, if any, that the Vicon block will try to read from the Vicon DataStream. Unlabeled markers are referenced by integer indices starting at 0. Enter the indices of the unlabeled markers to be tracked in a 1-dimensional vector. Note that unlabeled markers are not ordered since they are unlabeled and the index of any given unlabeled marker may change during tracking, which will result in the unlabeled marker outputs "jumping" between unlabeled marker values during the experiment. For more predictable tracking of markers, use labeled markers instead.

Stream mode

This selector specifies the stream mode for the DataStream connection. There are three stream modes and each mode affects the client, server, and network resource utilization. Note that the Client pull and Server push stream modes are blocking and should either be run at a lower sample time than the camera sample rate or run in an Asynchronous Thread subsystem to avoid blocking your model.

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.

Targets

Target Name

Compatible*

Model Referencing

Comments

QUARC Win32 Target

Yes

Yes

QUARC Win64 Target

Yes

Yes

QUARC Linux Nvidia Target

Yes

Yes

QUARC Linux QBot Platform Target

Yes

Yes

QUARC Linux QCar 2 Target

Yes

Yes

QUARC Linux QDrone 2 Target

Yes

Yes

QUARC Linux Raspberry Pi 3 Target

Yes

Yes

QUARC Linux Raspberry Pi 4 Target

Yes

Yes

QUARC Linux RT ARMv7 Target

Yes

Yes

QUARC Linux x64 Target

Yes

Yes

QUARC Linux DuoVero Target

Yes

Yes

QUARC Linux DuoVero 2016 Target

Yes

Yes

QUARC Linux Verdex Target

Yes

Yes

QUARC QNX x86 Target

Yes

Yes

Last fully supported in QUARC 2018.

Rapid Simulation (RSIM) Target

Yes

Yes

S-Function Target

No

N/A

Old technology. Use model referencing instead.

Normal simulation

Yes

Yes

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

 

navigation bar