How to Setup a Trigger for Remote Recording via Python Script (DOC-5033)

This document will take you through the steps of setting up a trigger for remote recording in the Hand Engine software via Command Prompt.

Requirements

  • StretchSense HandEngine 1.1.1 or higher: Log in to your account page on http://www.stretchsense.com/my-account  or email support@stretchsense.com for details

  • Operating System: Windows 10

  • Shogun Live API installed

  • Python installed

    Python Installation: https://www.python.org/downloads/

    • 64 bit if 64bit windows

    • 32 bit if 32 bit windows

      Note: Even if you have Python installed from the Microsoft App store you will still need to install Python from the website above

      IMPORTANT: Tick the checkbox for adding Python 3.9 to PATH

  • Basic python knowledge

  • Python Start/Stop recording scripts (triggering Hand Engine recording only):

    HE Animator Version - Click Here

    HE Studio Version - Click Here

  • Python Start/stop recording scripts (triggering Hand Engine and Vicon Shogun Trigger Recording simultaneously)

    HE Animator Version - Click Here

    HE Studio Version - Click Here


Setting up the trigger for remote recording in Hand Engine only

  1. Launch Hand Engine, connect your gloves, and load your calibration.

  2. Open Command Prompt, type cd, and paste the file location where the scripts are saved.

  3. Type in the following command line and hit Enter to start recording in Hand Engine. If successful, you will see a red pulsing light next to Recording.

    python start_capture_HE_Only.py --port=3000 --name="TakeName" --host="127.0.0.1"

    NOTE:
    a) The port and host can be changed to where Hand Engine is running (you can check them in the Hand Engine URL in the browser). If you don’t specify the host and port then the default (127.0.0.1 & 3000) will be used.

    b) The “TakeName” part can be changed to how you would like the take to be called.

     

  4. To stop recording, type the following command line and hit Enter. If successful, you will see the red light next to Recording turned off. The scrips will run checks for every glove tab in Hand Engine.

    python stop_capture_HE_Only.py --port=3000 --host="127.0.0.1"

     

  5. The recording location can be found under Settings > Browse Recordings.

     

Setting up the trigger for remote recording in Hand Engine and Vicon Shogun simultaneously

  1. Find and apply the remote recording trigger Python start and stop capture by placing these script files in the following path: 

    C:\Program Files\Vicon\ShogunLive[Version Number]\SDK\ShogunLiveAPI\sample_scripts 

    The scripts can be downloaded here:

    HE Animator Version - Click Here

    HE Studio Version - Click Here

  2. From here you can follow the Open Command Prompt, type cd, and paste the file location where the scripts are saved, for example: 

    C:\Program Files\Vicon\ShogunLive[Version Number]\SDK\ShogunLiveAPI\sample_scripts

  3. With both Hand Engine and Vicon Shogun running, type in the following command and hit Enter to start recording in Hand Engine and Start Capture in Vicon Shogun. If successful, you will see a red pulsing light next to Recording in Hand Engine. In Vicon a Capture will be Started.

    python start_capture.py --port=3000 --name="TakeName" --host="127.0.0.1" 

    NOTE:
    a) The port and host can be changed to where Hand Engine is running (you can check them in the Hand Engine URL in the browser). If you don’t specify the host and port then the default (127.0.0.1 & 3000) will be used.

    b) The “TakeName” part can be changed to how you would like the take to be called.

     

  4. To stop recording/capture in HE and Vicon Shogun, type the following command line and hit Enter. If successful, you will see the red light next to Recording turned off. The scripts will run checks for every glove connected to Hand Engine. 

    python stop_capture.py --port=3000 --host="127.0.0.1"

  5. The recording location for Hand Engine takes can be found under Settings > Browse Recordings.

     

Disclaimer, Intellectual Property, and Licensing

Revision Summary

Revision

Date

Notes

4

2021.10.04

Updated images for HE 1.4

3

2021.06.14

Added script for HE and Vicon Shogun simultaneous trigger and detailed steps.

2

2021.05.13

Added script for HE trigger only, screenshots and detailed steps.

1

2021.03.25

Initial version.