Skip to content

Stream skeleton, rigid bodies and marker data from QTM through the QTM real-time protocol.

Notifications You must be signed in to change notification settings

qualisys/QTM-Connect-For-Maya

Repository files navigation

QTM Connect for Maya

Stream skeleton, rigid bodies and marker data from QTM through the QTM real-time protocol.

QTM Connect dialog screenshot

Installation

Automatic

  1. Download the repo to your machine
  2. Go to qtm_connect_maya\installer and run install.bat
  3. Optional: In case you want to use a scene with QAvatar, open QAvatar.mb in folder C:\Users\<user>\Documents\maya\projects\qualisys-example

Manual

  1. Clone this repo to your machine.
  2. Rename the newly cloned directory to qtm_connect_maya.
  3. Edit your Maya.env file available in one of your Maya folders. Add the following line: pythonpath=<path_to_qtm_connect_maya>/...
  4. Start/restart Maya.
  5. In Maya, open the script editor and run the following Python code:
    import qtm_connect_maya;import qtm_connect_maya.mayaui;qtm_connect_maya.mayaui.install()

Note on Maya versions

Maya2022 uses Python3.7, earlier versions use Python2.7. The main branch of the plugin has been updated to Python3.7. For earlier vesions of Maya you must use the Python2.7 branch.

Streaming skeleton data

To stream skeleton data you must first define a skeleton in QTM. Do this by clicking the Calibrate skeleton button in QTM.

  1. Ensure that the real-time server in QTM is streaming data. See Streaming data from QTM
  2. In Maya's QTM_Connect shelf, click on the QTM Connect icon to open the dialog.
  3. Enter the hostname of your QTM machine and click Connect.
  4. Click Stream from QTM to start streaming skeleton data.

T-Pose

You can go to the T-pose of your skeleton by selecting the respective skeleton in the list and clicking the Go to T-Pose button.

HumanIK

The naming convention used by the joints is recognized by HumanIK. To automatically map joints to a HumanIK character definition you need to charcaterize your skeleton. To do so, go to the HumanIk pane, click on 'Create Character Definition', click on one of the joints of your skeleton (in the 3D view), load the HIK template (folder icon in the HumanIK pane) and enter the skeleton prefix to only focus on the bones of your skeleton (useful if more than one skeletons are streamed). HumanIK pane screenshot

Streaming marker data

  1. Ensure that the real-time server in QTM is streaming data. See Streaming data from QTM.
  2. In the QTM_Connect shelf, click on the QTM Connect icon to open the dialog.
  3. Enter the hostname of your QTM machine and click Connect.
  4. Check the Markers checkbox to enable marker streaming.
  5. Click Stream from QTM to start streaming marker data.

Grouping markers

If you have a large number markers it can be useful to group them. For each group you create a transform node will be created to which the markers will be parented to.

  1. Enter the name of the group.
  2. Select the markers you want to group in the marker list.
  3. Click the Group button.

Streaming rigid body data

To stream rigid bodies you must first define rigid bodies in QTM. See Defining rigid bodies in QTM.

  1. Ensure that the real-time server in QTM is streaming data. See Streaming data from QTM.
  2. In the QTM_Connect shelf, click on the QTM Connect icon to open the dialog.
  3. Enter the hostname of your QTM machine and click Connect.
  4. Check the Rigid bodies checkbox to enable rigid body streaming.
  5. Click Stream from QTM to start streaming rigid body data.

Streaming data from QTM

Live streaming

In QTM:

  1. Go to Project Options > Processing > Real-time actions, to ensure that real-time processing is enabled.
  2. Go to File > New to start streaming live data.

Streaming using pre-recorded file

In QTM:

  1. Open the file you want to stream.
  2. Go to Play > Play with Real-Time Output

Defining rigid bodies in QTM

In QTM:

  1. Select three or more markers that make up a rigid body.
  2. Open the context menu by right clicking and run Define rigid body (6DOF) > Current Frame / Average of frame.

Rigid bodies can also be edited in Project Options > Processing > 6DOF Tracking.

Update Qualisys Python SDK:

In terminal, run:

git subtree pull --prefix modules/qualisys_python_sdk https://github.com/qualisys/qualisys_python_sdk.git <branch/commit> --squash

where <branch/commit> is either a specific branch, or a commit hash.