Giter VIP home page Giter VIP logo

ik-mqtt-posenet-unity's Introduction

ik-mqtt-posenet-unity

Test Unity app for controlling avatar with Posenet client.

Contains scripts that:

  • Communicates with a Posenet server (over MQTT)
    • MqttController
  • Converts the input to control an avatar
    • PoseAvatarInputController
  • Converts the input to control gameobjects in a view
    • PoseInputController

Scenes

There are 2 scenes in this project

Upper body pose scene

The "Upper body pose scene" scene is used to visualize how to use the library that controls an upperbody only avatar.

It uses the "PoseInputController" script which will give each body part a 0-100% value for the X&Y values based on the camera screen.

VR-pose

The "VR-pose" scene is used to visualize how to use the library that controls a full Avatar body using Inverse Kinematics.

It uses the "PoseAvatarInputController" script which will try to control reference points for each body part. It will try to calculate the pose-value vs body size in the app ratio & location and then use this to place the reference points in the corrrect place.

Howto Use the scripts

Steps to do

To enable you to control game objects in a scene you need to do the following steps.

  1. Create a new Lib folder in your project for the MQTT lib files
  2. Drag in the MQTT library files into the new project from folder Assets/MqttLib in this project
  3. Create a new PoseCore folder in your project for the PoseCore script files
  4. Drag in all files from the Assets/PosenetScripts folder into the PoseCore folder you created in your project
  5. Create an empty game object (called for example "PoseCoreConnection")
  6. Drag the MqttController script into this controller.
  7. Configure the script to communicate with a specific MQTT server in One of these 2 ways
    • Check "Is using broadcast", then the component will try to find the server using the broadcasts mechanism
    • Uncheck "Is using broadcast", then the component will connect to the server you specify
  8. Drag the PoseCoreEventManager script into this controller object as well.
  9. Drag the PoseCoreEventManager object into the Pose Core Event Manager member field in the Mqtt Controller object
  10. Create empty game object (called for example "Player")
  11. Drag the script "PoseAvatarInputController" OR "PoseInputController" to this object
  12. Drag the camera object into the Cam field in the Pose Input Controller
  13. Create the game objects you want to control & drag these to the correct body part in the Player object
  14. The body parts hould now move according to your body movements

Webcast tutorial

Below is a link to a webcast tutorial on how to create a Unity application using the PoseCore server to get body tracking data: https://youtu.be/OZMrnhCYjgI

ik-mqtt-posenet-unity's People

Contributors

miman avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.