Stream skeleton, rigid bodies and marker data from QTM through the QTM real-time protocol.
Automatic
- Download the repo to your machine
- Go to
qtm_connect_maya\installer
and runinstall.bat
- Optional: In case you want to use a scene with QAvatar, open
QAvatar.mb
in folderC:\Users\<user>\Documents\maya\projects\qualisys-example
Manual
- Clone this repo to your machine.
- Rename the newly cloned directory to
qtm_connect_maya
. - Edit your Maya.env file available in one of your Maya folders. Add the following line:
pythonpath=<path_to_qtm_connect_maya>/..
. - Start/restart Maya.
- 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()
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.
To stream skeleton data you must first define a skeleton in QTM. Do this by clicking the Calibrate skeleton
button in QTM.
- Ensure that the real-time server in QTM is streaming data. See Streaming data from QTM
- In Maya's
QTM_Connect
shelf, click on the QTM Connect icon to open the dialog. - Enter the hostname of your QTM machine and click
Connect
. - Click
Stream from QTM
to start streaming skeleton data.
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.
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).
- Ensure that the real-time server in QTM is streaming data. See Streaming data from QTM.
- In the
QTM_Connect
shelf, click on the QTM Connect icon to open the dialog. - Enter the hostname of your QTM machine and click
Connect
. - Check the
Markers
checkbox to enable marker streaming. - Click
Stream from QTM
to start streaming marker data.
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.
- Enter the name of the group.
- Select the markers you want to group in the marker list.
- Click the
Group
button.
To stream rigid bodies you must first define rigid bodies in QTM. See Defining rigid bodies in QTM.
- Ensure that the real-time server in QTM is streaming data. See Streaming data from QTM.
- In the
QTM_Connect
shelf, click on the QTM Connect icon to open the dialog. - Enter the hostname of your QTM machine and click
Connect
. - Check the
Rigid bodies
checkbox to enable rigid body streaming. - Click
Stream from QTM
to start streaming rigid body data.
In QTM:
- Go to
Project Options
>Processing
>Real-time actions
, to ensure that real-time processing is enabled. - Go to
File
>New
to start streaming live data.
In QTM:
- Open the file you want to stream.
- Go to
Play
>Play with Real-Time Output
In QTM:
- Select three or more markers that make up a rigid body.
- 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
.
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.