### Version Command (OSC) Example Source: https://docs.qualisys.com/qtm-rt-protocol/index Provides an example of the 'Version' command in OSC and its expected response. This command retrieves the current RT protocol version used by the server. ```text Command: Version Response: Version is 1.27 ``` -------------------------------- ### Start API Source: https://docs.qualisys.com/qtm-rt-protocol/index Starts a new capture. If the `RTFromFile` argument is used, QTM streams real-time data from the current QTM file. Requires control over the QTM RT interface. ```APIDOC ## Start ### Description This command will start a new capture. If the argument RTFromFile is used, QTM will start streaming real-time data from current QTM file. If there is any file open. It is only possible to issue this command if you have the control over the QTM RT interface. See TakeControl. ### Method POST (Assumed, as it's a command) ### Endpoint /websites/qualisys_qtm-rt-protocol/start ### Parameters #### Query Parameters - **RTFromFile** (boolean) - Optional - If true, QTM will start streaming real-time data from the current QTM file. ### Request Example ``` Start [RTFromFile] ``` ### Response #### Success Response The command will return a command packet or an error packet. #### Response Example ``` Responses: 'Starting measurement' 'Starting RT from file' Errors: 'Measurement is already running' 'Not connected. Create connection with new' 'RT from file already running' 'No file open' 'Parse error' 'You must be master to issue this command' ``` ``` -------------------------------- ### Get Capture QTM Source: https://docs.qualisys.com/qtm-rt-protocol/index Downloads the latest capture as a QTM file. A 'Sending capture' response is sent, followed by a QTM file packet upon success. ```APIDOC ## GET /GetCaptureQTM ### Description Downloads the latest capture as a QTM file. A 'Sending capture' response is sent, followed by a QTM file packet upon success. ### Method GET ### Endpoint /GetCaptureQTM ### Parameters None ### Request Example None ### Response #### Success Response (200) - **message** (string) - 'Sending capture' - **data** (file) - QTM file packet containing the current capture. #### Error Response - **error** (string) - Possible errors include: 'No capture to get', 'Error sending QTM file', 'Parse error'. ``` -------------------------------- ### Connect Command (OSC) Source: https://docs.qualisys.com/qtm-rt-protocol/index Illustrates the OSC format for the 'Connect' command, used to establish a connection with the QTM RT server via UDP. The command requires the client's listening UDP port as a parameter. ```text **`Connect`**`Port` Connects the client to the QTM RT server via the OSC protocol over UDP. The Port argument is the UDP port on which the client listens for server responses. ``` -------------------------------- ### No More Data Packet Source: https://docs.qualisys.com/qtm-rt-protocol/index Indicates that QTM has no more data to send, typically when a measurement has stopped or not yet started. ```APIDOC ## No More Data Packet ### Description This packet is sent when QTM is out of data to send because a measurement has stopped or has not even started. ### Structure - **Size** (32-bit integer): 8 (only the header is sent). - **Type** (32-bit integer): 4. ``` -------------------------------- ### Load Project Source: https://docs.qualisys.com/qtm-rt-protocol/index Loads a project from a specified path. The project will only load if QTM is controlled, the path exists, the current measurement is saved, and there is no active camera connection. ```APIDOC ## POST /LoadProject ### Description Loads a project from a specified path. The project will only load if QTM is controlled, the path exists, the current measurement is saved, and there is no active camera connection. ### Method POST ### Endpoint /LoadProject ### Parameters #### Query Parameters - **ProjectPath** (string) - Required - The path of the project to load. ### Request Example ```json { "ProjectPath": "/path/to/your/project" } ``` ### Response #### Success Response (200) - **message** (string) - 'Project loaded' #### Error Response - **error** (string) - Possible errors include: 'Missing project name', 'Failed to load project', 'Active camera connection exists', 'Current measurement not saved', 'Parse error', 'You must be master to issue this command'. ``` -------------------------------- ### StreamFrames Stop Command Source: https://docs.qualisys.com/qtm-rt-protocol/index Stops the data stream before the end of a measurement or prevents data from being sent when a new measurement starts. ```APIDOC ## StreamFrames Stop Command ### Description Stops the data stream before it has reached the end of the measurement or prevents data from being sent if a new measurement is started after the first was finished. ### Method POST (Assumed, as it's a command) ### Endpoint /websites/qualisys_qtm-rt-protocol/streamframes/stop ### Parameters None ### Request Example ``` StreamFrames Stop ``` ### Response #### Success Response The command will start streaming data packets or an error packet will be sent. #### Response Example ``` Error: 'Version not supported on current port' 'Parse error' ``` ``` -------------------------------- ### New API Source: https://docs.qualisys.com/qtm-rt-protocol/index Creates a new measurement in QTM, connects to cameras, and enters RT (preview) mode. Requires control over the QTM RT interface. ```APIDOC ## New ### Description This command will create a new measurement in QTM, connect to the cameras and enter RT (preview) mode. It is only possible to issue this command if you have the control over the QTM RT interface. See TakeControl. ### Method POST (Assumed, as it's a command) ### Endpoint /websites/qualisys_qtm-rt-protocol/new ### Parameters None ### Request Example ``` New ``` ### Response #### Success Response The command will return a command packet or an error packet. #### Response Example ``` Response: 'Creating new connection' Errors: 'Already connected' 'Parse error' 'The previous measurement has not been saved or closed' 'Parse error' 'You must be master to issue this command' ``` ``` -------------------------------- ### No More Data Packet (OSC) Source: https://docs.qualisys.com/qtm-rt-protocol/index This OSC message is sent when QTM is out of data to send, typically when a measurement has stopped or not started. The OSC address is `/qtm/no_data`. ```APIDOC ## GET /qtm/no_data ### Description Indicates that QTM has no more data to send. ### Method GET ### Endpoint `/qtm/no_data` ### Parameters None ### Request Example None ### Response #### Success Response (200) - **No data** (Nil) - Contains no data. #### Response Example ```json { "No data": null } ``` ``` -------------------------------- ### GetParameters 6D Command Source: https://docs.qualisys.com/qtm-rt-protocol/index Retrieves the current 6D project settings from the QTM RT server. ```APIDOC ## GetParameters 6D ### Description In response to the command `GetParameters 6D` the QTM RT server will reply with an XML data packet, containing the element The_6D. ### Method GET (or equivalent command) ### Endpoint `/parameters/6d` (Hypothetical endpoint for command) ### Response #### Success Response (200 OK) - **The_6D** (XML) - XML data packet containing the current 6D project settings. ``` -------------------------------- ### Get Capture C3D Source: https://docs.qualisys.com/qtm-rt-protocol/index Downloads the latest capture as a C3D file. A 'Sending capture' response is sent, followed by a C3D file packet upon success. ```APIDOC ## GET /GetCaptureC3D ### Description Downloads the latest capture as a C3D file. A 'Sending capture' response is sent, followed by a C3D file packet upon success. ### Method GET ### Endpoint /GetCaptureC3D ### Parameters None ### Request Example None ### Response #### Success Response (200) - **message** (string) - 'Sending capture' - **data** (file) - C3D file packet containing the current capture. #### Error Response - **error** (string) - Possible errors include: 'No capture to get', 'Error sending C3D file', 'Parse error'. ``` -------------------------------- ### QTM RT Protocol Version Command Source: https://docs.qualisys.com/qtm-rt-protocol/index Explains the importance of sending the 'Version' command upon connection to ensure protocol compatibility. ```APIDOC ## Version Command ### Description The `Version` command is the first command a client should send to the QTM RT server after establishing a connection. This ensures that the client and server are using a compatible protocol version. If this command is not sent, the server defaults to protocol version 1.1. ### Method `Version` (Command String) ### Endpoint (Sent over the established TCP/IP connection) ### Parameters #### Request Body - **Command** (string) - Required - The command string `"Version"`. - **Protocol Version** (integer) - Required - The protocol version the client expects (e.g., `127` for 1.27). ### Request Example ``` Version 127 ``` ### Response #### Success Response - **Server Response** (string) - Confirmation of the version or negotiation details. #### Error Response - **Error Message** (string) - Indicates issues with the version command or compatibility. ``` -------------------------------- ### QTM RT Server Connection Source: https://docs.qualisys.com/qtm-rt-protocol/index Details on how to establish a connection to the QTM RT server, including welcome messages and connection refusal errors. ```APIDOC ## Connecting to QTM RT Server ### Description Connecting to the QTM RT server involves establishing a TCP/IP connection to a specific port on the QTM host machine. Upon successful connection, the server sends a welcome message. If the maximum number of clients is reached, a refusal message is returned. ### Method TCP/IP Connection ### Endpoint `[QTM_RT_SERVER_IP]:[PORT]` ### Parameters #### Query Parameters - **PORT** (integer) - Required - The TCP/IP port number for the QTM RT server. ### Request Example (No explicit request, connection establishment) ### Response #### Success Response - **Welcome Message** (string) - `QTM RT Interface connected.` #### Error Response (e.g., 400) - **Error Message** (string) - `Connection refused. Max number of clients reached.` ``` -------------------------------- ### Trig Measurement Source: https://docs.qualisys.com/qtm-rt-protocol/index Triggers a measurement if the camera system is set to start on external trigger. The RT server will send a 'WaitingForTrigger' event when it is waiting for a trigger. This command requires control over the QTM RT interface. ```APIDOC ## POST /Trig ### Description Triggers a measurement if the camera system is set to start on external trigger. The RT server will send a 'WaitingForTrigger' event when it is waiting for a trigger. This command requires control over the QTM RT interface. ### Method POST ### Endpoint /Trig ### Parameters None ### Request Example None ### Response #### Success Response (200) - **message** (string) - 'Trig ok' #### Error Response - **error** (string) - Possible errors include: 'QTM not waiting for trig', 'Parse error', 'You must be master to issue this command'. ``` -------------------------------- ### Auto Discover QTM Servers Source: https://docs.qualisys.com/qtm-rt-protocol/index Information on how to automatically discover QTM servers on a local network using UDP broadcasts. ```APIDOC ## Auto Discover QTM Servers ### Description QTM servers (version 2.4 and later) can be discovered on the local network by broadcasting a UDP packet to the QTM auto-discover port. The response packet contains information about the QTM server, including its IP address, hostname, version, and camera count. ### Method UDP Broadcast and Response ### Endpoint - **Broadcast Address**: `[QTM_AUTO_DISCOVER_PORT]` - **Response Address**: Received from the broadcasting server. ### Parameters #### Query Parameters - **QTM_AUTO_DISCOVER_PORT** (integer) - The UDP port number for auto-discovery. #### Request Body (Discover Packet) - **Response Port** (integer) - The UDP port number where the client expects the response. ### Request Example (UDP Broadcast Packet Content) ``` [Response Port Number] ``` ### Response #### Success Response (UDP Packet) - **IP Address** (string) - The IP address of the QTM server. - **Host Name** (string) - The hostname of the computer running QTM. - **QTM Version** (string) - The version of the QTM software. - **Number of Cameras** (integer) - The number of connected cameras. ``` -------------------------------- ### Reading Settings Source: https://docs.qualisys.com/qtm-rt-protocol/index Details how to retrieve QTM settings, such as capture frequency and marker labels, using the `GetParameters` command. The server responds with an XML packet upon success or an error packet on failure. ```APIDOC ## Reading Settings ### Description Before requesting streamed data, clients can query QTM settings like capture frequency and marker labels using the `GetParameters` command. Successful execution results in an XML packet response from the server. Errors are indicated by an 'Parse error' packet. ### Method POST (or relevant command sending method) ### Endpoint (Server endpoint for commands) ### Request Body ```xml GetParameters ``` ### Response #### Success Response (XML Packet) - **XML Data**: Contains requested settings information. #### Error Response - **Error Packet**: `Parse error` ``` -------------------------------- ### TakeControl API Source: https://docs.qualisys.com/qtm-rt-protocol/index Allows a client to take control over the QTM RT interface, enabling settings changes, measurement creation, and capture management. Only one client can have control at a time. ```APIDOC ## TakeControl ### Description This command is used to take control over the QTM RT interface. Only one client can have the control at a time. Once a user has the control, it is possible to change settings, create a new measurement, close measurement, start capture, stop capture and get a capture. ### Method POST (Assumed, as it's a command) ### Endpoint /websites/qualisys_qtm-rt-protocol/takecontrol ### Parameters #### Query Parameters - **Password** (string) - Optional - The password argument is optional and is only needed if it is required by QTM. QTM can be configured to deny all clients control, only allow clients with correct password or allow all clients control. ### Request Example ``` TakeControl [Password] ``` ### Response #### Success Response The command will return a command packet or an error packet. #### Response Example ``` Response: 'You are now master' 'You are already master' Error: '192.168.1.5 (1832) is already master' 'Client control disabled in QTM' 'Wrong or missing password' 'Parse error' ``` ``` -------------------------------- ### StreamFrames Command Source: https://docs.qualisys.com/qtm-rt-protocol/index Initiates real-time data streaming from the QTM RT server. Clients can specify which data components (e.g., 2D, 3D, Analog, Skeleton) and transmission parameters (frequency, UDP/TCP) to use. ```APIDOC ## POST /StreamFrames ### Description Initiates real-time data streaming from the QTM RT server. Clients can specify which data components (e.g., 2D, 3D, Analog, Skeleton) and transmission parameters (frequency, UDP/TCP) to use. ### Method POST ### Endpoint /StreamFrames ### Parameters #### Query Parameters - **Stop** (enum) - Optional - Stops the current streaming session. - **FrequencyDivisor:n** (integer) - Optional - Transmits every n:th processed real-time frame. - **Frequency:n** (integer) - Optional - Transmits frames at the nearest multiple of the real-time processing frequency. - **AllFrames** (boolean) - Optional - Transmits every real-time frame processed by QTM. - **UDP[:address]:port** (string) - Optional - Specifies UDP/IP for data transmission. Address is optional; port is required (1023-65535). - **2D** (boolean) - Optional - Includes 2D camera data. - **2DLin** (boolean) - Optional - Includes 2D linear camera data. - **3D** (boolean) - Optional - Includes 3D camera data. - **3DRes** (boolean) - Optional - Includes 3D resolved camera data. - **3DNoLabels** (boolean) - Optional - Includes 3D camera data without labels. - **3DNoLabelsRes** (boolean) - Optional - Includes 3D resolved camera data without labels. - **Analog[:channels]** (string) - Optional - Includes Analog data. Channels can be a comma-separated list or ranges (e.g., "1,2,3-6,16"). - **AnalogSingle[:channels]** (string) - Optional - Includes single Analog data points. - **Force** (boolean) - Optional - Includes Force data. - **ForceSingle** (boolean) - Optional - Includes single Force data points. - **6D** (boolean) - Optional - Includes 6D sensor data. - **6DRes** (boolean) - Optional - Includes 6D resolved sensor data. - **6DEuler** (boolean) - Optional - Includes 6D Euler angle sensor data. - **6DEulerRes** (boolean) - Optional - Includes 6D resolved Euler angle sensor data. - **Image** (boolean) - Optional - Includes image data. - **GazeVector** (boolean) - Optional - Includes gaze vector data. - **EyeTracker** (boolean) - Optional - Includes eye tracker data. - **Timecode** (boolean) - Optional - Includes timecode data. - **Skeleton[:global]** (boolean) - Optional - Includes skeleton data. ":global" flag sets skeleton data to global coordinates. ### Request Example ```json { "command": "StreamFrames", "parameters": { "Frequency": 100, "3D": true, "UDP": "192.168.1.100:5000" } } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the command. - **message** (string) - Provides details about the streaming status. #### Response Example ```json { "status": "Streaming started", "message": "Streaming 3D data at 100Hz over UDP to 192.168.1.100:5000" } ``` ``` -------------------------------- ### Load Measurement Source: https://docs.qualisys.com/qtm-rt-protocol/index Loads a measurement from a specified QTM file. The file can be a relative or absolute path. The measurement will only load if QTM is controlled, the file exists, the current measurement is saved, and there is no active camera connection. ```APIDOC ## POST /Load ### Description Loads a measurement from a specified QTM file. The file can be a relative or absolute path. The measurement will only load if QTM is controlled, the file exists, the current measurement is saved, and there is no active camera connection. ### Method POST ### Endpoint /Load ### Parameters #### Query Parameters - **Filename** (string) - Required - The name of the QTM file to load. If the filename doesn’t end with ".qtm", it will be added. Can be a relative or absolute path. ### Request Example ```json { "Filename": "path/to/your/measurement.qtm" } ``` ### Response #### Success Response (200) - **message** (string) - 'Measurement loaded' #### Error Response - **error** (string) - Possible errors include: 'Missing file name', 'Failed to load measurement', 'Active camera connection exists', 'Current measurement not saved', 'Parse error', 'You must be master to issue this command'. ``` -------------------------------- ### Change Settings Source: https://docs.qualisys.com/qtm-rt-protocol/index Describes how to modify QTM settings (General, 6d, Image, Force, skeleton) by sending an XML packet. The server confirms success with a 'Setting parameters succeeded' packet or indicates failure with 'Setting parameters failed'. This feature is not available with the OSC protocol. ```APIDOC ## Change Settings ### Description Clients can modify certain QTM settings (General, 6d, Image, Force, skeleton) by sending an XML packet containing the desired changes. A successful update is acknowledged with a 'Setting parameters succeeded' packet. Failures are reported with a 'Setting parameters failed' packet. Note: This functionality is not supported when using the OSC protocol. ### Method POST (or relevant command sending method) ### Endpoint (Server endpoint for commands) ### Request Body ```xml ChangeSettings CaptureFrameRate 100 ``` ### Response #### Success Response - **Status**: `Setting parameters succeeded` #### Error Response - **Status**: `Setting parameters failed` ``` -------------------------------- ### Calibration XML Parameters Source: https://docs.qualisys.com/qtm-rt-protocol/index Details the structure of the XML data packet returned by the QTM RT server in response to the `GetParameters Calibration` command. ```APIDOC ## Calibration XML Parameters ### Description XML data packet containing calibration information, received in response to `GetParameters Calibration`. ### XML Format ```xml ``` ### Elements and Attributes #### calibration Element ### Attributes - **calibrated** (boolean) - "true" or "false". - **source** (string) - Calibration file name. - **created** (string) - Time and date of calibration. - **qtm-version** (string) - QTM version used in calibration. - **type** (enum: "regular", "fixed", "refine") - Calibration type. - **refit-residual** (float) - Wand refit residual. (Only for refine calibration). - **wandLength** (float) - Calibration wand length in mm. (Only for regular and refine calibration). - **maximumFrames** (integer) - Maximum number of frames used for calibration. (Only for regular and refine calibration). - **shortArmEnd** (float) - Distance between origin marker and short arm end marker in mm. (Only for regular and refine calibration). - **longArmEnd** (float) - Distance between origin marker and long arm end marker in mm. (Only for regular and refine calibration). - **longArmMiddle** (float) - Distance between origin marker and long arm middle marker in mm. (Only for regular and refine calibration). #### results Element ### Attributes - **std-dev** (float) - Standard deviation of wand length. (Only for regular and refine calibration). - **min-max-diff** (float) - Min max diff of wand length. (Only for regular and refine calibration). - **refit-residual** (float) - Wand refit residual. (Only for refine calibration). - **consecutive** (integer) - Consecutive calibrations without reference. (Only for refine calibration). #### cameras Element ### Description Contains `camera` elements. #### camera Element ### Attributes - **active** (boolean) - **calibrated** (boolean) - **message** (string) - **point-count** (integer) - **avg-residual** (float) - **serial** (string) - **model** (string) - **viewrotation** (string) ### Elements - **fov_marker** (left, top, right, bottom - float) - **fov_marker_max** (left, top, right, bottom - float) - **fov_videor** (left, top, right, bottom - float) - **fov_video_max** (left, top, right, bottom - float) - **transform** (x, y, x, r11, r12, r13, r21, r22, r23, r31, r32, r33 - float) - **intrinsic** (focalLength, sensorMinU, sensorMaxU, sensorMinV, sensorMaxV, focalLengthU, focalLengthV, centerPointU, centerPointV, skew, radialDistortion1, radialDistortion2, radialDistortion3, tangentalDistortion1, tangentalDistortion2 - float) ``` -------------------------------- ### Change Parameters 6D Command Source: https://docs.qualisys.com/qtm-rt-protocol/index Changes the current 6D project settings in QTM by sending an XML data packet. ```APIDOC ## Change Parameters 6D ### Description To change the current 6d project settings in QTM, send an XML data packet containing a The_6D element. When sending 6d settings to the server, all current rigid bodies will be deleted from the project. ### Method POST (or equivalent command) ### Endpoint `/parameters/6d` (Hypothetical endpoint for command) ### Request Body - **The_6D** (XML) - XML data packet containing the new 6D project settings. - **Body** (Element) - Contains 6DOF body information. - **Name** (string) - Name of the 6DOF body. Must always be present. - **Enabled** (boolean) - Whether the body is enabled ('true' or 'false'). - **Color** (object) - Color of the 6DOF body with R, G, B attributes (0-255). - **MaximumResidual** (float) - Maximal residual of the rigid body. - **MinimumMarkersInBody** (integer) - Minimal number of markers needed to detect the rigid body. - **BoneLengthTolerance** (float) - Bone length tolerance for the rigid body. - **Filter** (object) - Contains an attribute 'Preset' for the filter. - **Preset** (string) - Name of the filter preset (e.g., 'No filter', 'Multi-purpose', 'High stability', 'Static pose'). - **Mesh** (object) - Mesh information for the rigid body. - **Name** (string) - Name of the obj file defining the mesh. - **Position** (object) - Contains X, Y, Z coordinate values (float). - **Rotation** (object) - Contains X, Y, Z rotation values (float). - **Scale** (float) - Scale of the mesh object. - **Opacity** (float) - Opacity of the mesh object. - **Points** (array) - Contains 3 or more Point elements. - **Point** (object) - Point details. - **X** (float) - Coordinate of point in body. - **Y** (float) - Coordinate of point in body. - **Z** (float) - Coordinate of point in body. - **Virtual** (integer) - 1 if point is virtual, 0 otherwise. - **PhysicalId** (integer) - Physical id of point. - **Name** (string) - Name of point. - **Data_origin** (object) - Origin type (0=Global, 1=Relative, 2=Fixed). - **Relative_body** (integer) - Index of the related body (if origin is Relative). - **X**, **Y**, **Z** (float) - Coordinates (if origin is Fixed). - **Data_orientation** (object) - Orientation data (R11 to R33 matrix elements, Relative_body attribute if applicable). ### Request Example ```xml MyRigidBody true 0.5 3 0.01 body.obj 1.0 1.0 ``` ``` -------------------------------- ### Skeleton Component (OSC) Source: https://docs.qualisys.com/qtm-rt-protocol/index This endpoint provides skeleton data, consisting of segments, for a specified skeleton and segment. The OSC address is `/qtm/skeleton/` followed by the skeleton and segment name. ```APIDOC ## GET /qtm/skeleton/{skeletonName}/{segmentName} ### Description Receives skeleton data for a specified skeleton and segment. ### Method GET ### Endpoint `/qtm/skeleton/{skeletonName}/{segmentName}` ### Parameters #### Path Parameters - **skeletonName** (string) - Required - The name of the skeleton. - **segmentName** (string) - Required - The name of the segment. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **ID** (Int32) - Segment id. - **Position X** (Float32) - Segment position x coordinate. - **Position Y** (Float32) - Segment position y coordinate. - **Position Z** (Float32) - Segment position z coordinate. - **Rotation X** (Float32) - Segment rotation quaternion x. - **Rotation Y** (Float32) - Segment rotation quaternion y. - **Rotation Z** (Float32) - Segment rotation quaternion z. - **Rotation W** (Float32) - Segment rotation quaternion w. #### Response Example ```json { "ID": 1, "Position X": 0.1, "Position Y": 0.2, "Position Z": 1.5, "Rotation X": 0.0, "Rotation Y": 0.0, "Rotation Z": 0.0, "Rotation W": 1.0 } ``` ``` -------------------------------- ### Image Settings API Source: https://docs.qualisys.com/qtm-rt-protocol/index Allows retrieval and modification of image settings for cameras connected to the QTM RT server. You can enable/disable cameras, set image format, resolution, and cropping. ```APIDOC ## Image Settings ### Description Allows retrieval and modification of image settings for cameras. ### Method GET /GetParameters Image (to retrieve) POST /Image (to change) ### Parameters #### Image XML Parameters (for changing settings) - **Image** (object) - **Camera** (array) - **ID** (integer) - Camera ID. - **Enabled** (boolean) - Enable or disable image streaming. - **Format** (string) - Picture format. Available: RAWGrayscale, RAWBGR, JPG, PNG. - **Width** (integer) - Width of the streaming image (before cropping). - **Height** (integer) - Height of the streaming image (before cropping). - **Left_Crop** (float) - Position of the left edge relative to the original image (0.0 to 1.0). - **Top_Crop** (float) - Position of the top edge relative to the original image (0.0 to 1.0). - **Right_Crop** (float) - Position of the right edge relative to the original image (0.0 to 1.0). - **Bottom_Crop** (float) - Position of the bottom edge relative to the original image (0.0 to 1.0). ### Request Example (Changing Image Settings) ```xml 1 true JPG 1920 1080 0.0 0.0 1.0 1.0 ``` ### Response Example (Success Response for GetParameters Image) ```xml 1 true JPG 1920 1080 0.0 0.0 1.0 1.0 ``` ``` -------------------------------- ### 6DOF Components Source: https://docs.qualisys.com/qtm-rt-protocol/index Details the structure of 6DOF data components, including '6DOF', '6DOF with residuals', '6DOF Euler', and '6DOF Euler with residuals'. ```APIDOC ## 6DOF Components ### Description This section describes the structure of 6DOF (Six Degrees of Freedom) data components. There are four variations: '6DOF', '6DOF with residuals', '6DOF Euler', and '6DOF Euler with residuals'. These components share a common 6dof header. ### Component Header | Bytes | Name | Type | Description | |---|---|---|---| | 4 | Component Size | 32-bit integer | The size of the component including the header (Component Size, Component Type and Body Count). | | 4 | Component Type | 32-bit integer | Value = 5, 6, 11 or 12. See Data component types. | | 4 | Body Count | 32-bit integer | The number of 6DOF bodies in this frame. | | 2 | 2D Drop Rate | 16-bit integer | Number of individual 2D frames that have been lost in the communication between QTM and the cameras. The value is in frames per thousand, over the last 0.5 to 1.0 seconds. Range 0-1000. | | 2 | 2D Out Of Sync Rate | 16-bit integer | Number of individual 2D frames in the communication between QTM and the cameras, which have not had the same frame number as the other frames. The value is in frames per thousand over the last 0.5 to 1.0 seconds, Range 0-1000. | ### Body Data Repeated `Body Count` times: | Bytes | Name | Type | Description | |---|---|---|---| | 4 | X | 32-bit float | X coordinate of the body. | | 4 | Y | 32-bit float | Y coordinate of the body. | | 4 | Z | 32-bit float | Z coordinate of the body. | | 9 * 4 | Rotation | 32-bit float | 3x3 rotation matrix of the body. **Only present for '6DOF' and '6DOF with residuals' components.** | | 4 | Angle 1 | 32-bit float | First Euler angle, in degrees. **Only present for '6DOF Euler' and '6DOF Euler with residuals' components.** | | 4 | Angle 2 | 32-bit float | Second Euler angle, in degrees. **Only present for '6DOF Euler' and '6DOF Euler with residuals' components.** | | 4 | Angle 3 | 32-bit float | Third Euler angle, in degrees. **Only present for '6DOF Euler' and '6DOF Euler with residuals' components.** | | 4 | Residual | 32-bit float | Residual for the 6D body. **Only present for '6DOF with residuals' and '6DOF Euler with residuals' components.** | **Note:** Euler angles are defined on the Euler tab in QTM's workspace options. ``` -------------------------------- ### XML Structure for 6D Body Parameters Source: https://docs.qualisys.com/qtm-rt-protocol/index This XML structure defines the parameters for a 6D rigid body in QTM. It includes elements for the body's name, enabled state, color, and various properties like maximum residual, minimum markers, bone length tolerance, and filter presets. It also details mesh properties, point definitions, and data origin/orientation. ```xml ``` -------------------------------- ### OSC Protocol Connection Source: https://docs.qualisys.com/qtm-rt-protocol/index Details on how to connect and disconnect using the OSC protocol, including the initial welcome message and port number usage. ```APIDOC ## Connecting (OSC) When using the OSC protocol, which uses UDP, the client must first establish a connection with the server using the `Connect` command. A connection is closed with the `Disconnect` command. Upon connection, the server sends a welcome message string: `QTM RT Interface connected`. ### Port Number (OSC) There is one server port available for OSC: base port + 4. OSC packets are sent via UDP. The client UDP server port is set using the `Connect` command. ### Commands (OSC) Command strings and parameters are case-insensitive and separated by spaces. Parentheses, brackets, and '|' are not included in the actual command sent. ## POST /Connect ### Description Connects the client to the QTM RT server via the OSC protocol over UDP. ### Method POST ### Endpoint `/Connect` ### Parameters #### Query Parameters - **Port** (integer) - Required - The UDP port on which the client listens for server responses. ### Request Example ``` Connect 5000 ``` ## POST /Disconnect ### Description Disconnects the client from the QTM RT server. ### Method POST ### Endpoint `/Disconnect` ## POST /Version ### Description Retrieves the current RT protocol version used by the server. The server responds with `Version is n.n`. ### Method POST ### Endpoint `/Version` ### Response #### Success Response (200) - **version** (string) - The current RT protocol version (e.g., "1.27"). ### Response Example ```json { "version": "1.27" } ``` ## POST /QTMVersion ### Description See standard version of the command, QTMVersion. ### Method POST ### Endpoint `/QTMVersion` ## POST /GetState ### Description See standard version of the command, GetState. ### Method POST ### Endpoint `/GetState` ## POST /GetParameters ### Description See standard version of the command, GetParameters. ### Method POST ### Endpoint `/GetParameters` ### Parameters #### Query Parameters - **parameters** (string) - Optional - Specifies which parameters to retrieve. Can be `All` or a combination of `[General] [Calibration] [3D] [6D] [Analog] [Force] [Image] [GazeVector] [EyeTracker] [Skeleton]`. ### Request Example ``` GetParameters All ``` ## POST /GetCurrentFrame ### Description See standard version of the command, GetCurrentFrame. ### Method POST ### Endpoint `/GetCurrentFrame` ### Parameters #### Query Parameters - **frame_options** (string) - Optional - Specifies the data to include in the current frame. Options include `[2D] [2DLin] [3D] [3DRes] [3DNoLabels] [3DNoLabelsRes] [Analog[:channels]] [AnalogSingle[:channels]] [Force] [ForceSingle] [6D] [6DRes] [6DEuler] [6DEulerRes] [Image] [GazeVector] [EyeTracker] [Timecode] [Skeleton[:global]]`. ### Request Example ``` GetCurrentFrame 3D 6D ``` ## POST /StreamFrames ### Description See standard version of the command, StreamFrames. ### Method POST ### Endpoint `/StreamFrames` ### Parameters #### Query Parameters - **command** (string) - Required - Can be `Stop` or stream configuration options. - **stream_options** (string) - Optional - Configuration for streaming. Examples: `FrequencyDivisor:n`, `Frequency:n`, `AllFrames`, `UDP[:address]:port`. - **data_options** (string) - Optional - Specifies the data to include in streamed frames. Options are similar to `GetCurrentFrame`. ### Request Example ``` StreamFrames UDP:127.0.0.1:5001 3D 6D ``` ### QTM RT Packets (OSC) All OSC packets sent to or from the server use an OSC address pattern of `/qtm`. The content uses OSC data types for int32, int64, float32, and strings. The address pattern of packets sent from the server depends on the packet type. ``` -------------------------------- ### Protocol Structure Source: https://docs.qualisys.com/qtm-rt-protocol/index Explains the structure of data packets exchanged between the QTM RT server and client, including the header format and communication flow. ```APIDOC ## Protocol Structure ### Description All data is transmitted in packets with an 8-byte header. This header contains a 4-byte 'Size' field and a 4-byte 'Type' field. Typically, the server only sends data upon client request (commands). Responses can be strings, XML, or frame data. Clients should be prepared to handle unsolicited packets like events or errors. ``` -------------------------------- ### 3D XML Parameters Structure Source: https://docs.qualisys.com/qtm-rt-protocol/index This XML structure represents the 3D data parameters returned by the QTM RT server in response to a 'GetParameters 3D' command. It includes elements for axis orientation, calibration time, and label information. ```xml ``` -------------------------------- ### Skeleton Settings API Source: https://docs.qualisys.com/qtm-rt-protocol/index Enables the modification of skeleton project settings. Sending an XML data packet with an Skeletons element will replace all current skeleton definitions. ```APIDOC ## Skeleton Settings ### Description Allows modification of skeleton project settings. Sending new settings will overwrite existing definitions. ### Method POST /Skeleton ### Parameters #### Skeleton XML Parameters - **Skeletons** (object) - Contains skeleton definitions. ### Request Example (Changing Skeleton Settings) ```xml ``` ``` -------------------------------- ### Force XML Structure for Configuration Source: https://docs.qualisys.com/qtm-rt-protocol/index Defines the XML structure for configuring Force plate parameters. It includes units, plate details, location, origin, channels, and calibration matrix. ```xml ```