Skip to main content
All CollectionsMove Live
Simulating The Move Live Data Stream For Testing
Simulating The Move Live Data Stream For Testing
Updated over a week ago

Move Live MoCap is streamed out over a GRPC protocol. This can be received by any client, and can be tested using the below guide.

The server script is a substitute for running the Move Live software. It simulates the mocap data stream from Move Live so that you can send mocap data into Unreal engine for testing purposes. Move Live and the server script should not be used at the same time.
​
The client script is a substitute for running Unreal Engine (or any other 3D engine). It verifies that the mocap datastream is being received from the given IP address for testing purposes. Unreal and the client script should not be used at the same time.

Testing The Data Stream

To simulate the Move Live data stream into a 3D engine for testing, you can use the below repo:

First Time Setup:

  1. Head to the repo

  2. Click Code > Download .zip

  3. Extract the zip

  4. Open Anaconda Prompt (miniconda3) application as administrator

  5. Enter conda create -n mvai-rt python=3.8 and proceed (y) when prompted

  6. Enter conda activate mvai-rt to activate the Move environment

    1. The command line should now begin with the prefix (mvai-rt)

  7. Install the packages using this command: pip install PySide6 PySide6-Addons grpcio grpcio-tools pyyaml open3d scipy

  8. Enter cd followed by the path to the src folder within the repo folder downloaded, for example - cd C:\Users\name\Downloads\moveai-rt-stream-main\moveai-rt-stream-main\src

  9. Create the mocapexchange files using the command: python -m grpc_tools.protoc -I./ --python_out=. --pyi_out=. --grpc_python_out=. ./MocapExchange.proto

  10. Check with IP address you'll use:

    1. If using the server & client on different devices, configure them onto the same network range and check you can ping from one to the other. Note down the IP of the device that'll run the server

    2. if using the server & client on the same device, head to the network settings and note down an IP address of one of the ports on the device.

Activating the Server (data source):

  1. Open an Anaconda prompt (administrator) window

  2. Enter cd followed by the path to the src folder within the repo folder downloaded, for example - cd C:\Users\name\Downloads\moveai-rt-stream-main\moveai-rt-stream-main\src

  3. Activate the environment: conda activate mvai-rt to activate mvai-rt

  4. Activate the server: python ./server_replay.py --input ../data/grpc_mocap_data_1.pkl --ip X.X.X.X

    1. Replace the X's with the IP address of your server device.

    2. If you've recorded your own animation, amend the --input file directory to point to your file and add the --fps argument if you did not capture using the standard 60fps setting in Invsibile.

  5. Leave this running

Activating the Client (data receiver):

  1. If using Unreal Engine, setup an Unreal project according to this doc, and enter the IP address of your server device in the live link plugin - https://help.move.ai/en/articles/9291544-streaming-data-from-invisible-to-unreal-engine

  2. If you want to use a test client to check the connection, open another Anaconda prompt (administrator) window:

    1. Enter cd followed by the path to the src folder within the repo folder downloaded, for example - cd C:\Users\name\Downloads\moveai-rt-stream-main\moveai-rt-stream-main\src

    2. Activate the environment: conda activate mvai-rt

    3. Activate one of the clients:

      1. python ./client_simple.py

        1. If using Windows or Mac, append --ip X.X.X.X to the end, replacing the X's with the IP address you chose.

        2. You should begin to see the data stream appear below

        or

      2. python ./client_qml_3d.py

        1. Please note that this is currently not supported on Windows or Mac

        2. A new window should open to show the 3d movements on loop.

        or

      3. python ./client_open_3d.py

        1. Please note that this is currently not supported on Windows or Mac

        2. A new window show open to show the 3d movements on loop.

Recording your own animations

If you'd like to record a custom animation for the server to stream, you can connect the client to your Move Live setup to record the output and store it. Please note: Python cannot run as fast as C++, so the client will not be able to replay the animation at 100% of full speed.

Record the animation:

All you need to do is run the client_simple script, adding the IP address of your Move Live server and the --out_file argument, followed by your desired location, to define where it should save the output .pkl file. The client will then save any animation received from Move Live, so when you're done recording, simply kill the script with Ctrl + C. See the below example:

  • python ./client_simple.py --ip X.X.X.X --out_file ../data/file.pkl

Replay the animation:

Then, when you run the server_replay, amend the --input argument to read the desired .pkl file and the --fps argument to select the fps you recorded using. See the below example:

  • python ./server_replay.py --ip X.X.X.X --input ../data/file.pkl --fps 110


Did this answer your question?