Giter Club home page Giter Club logo

haptico's Introduction

The Haptico Plugin

The Haptico Plugin allows you to use three and six degree of freedom haptic devices directly in the Unreal Engine. You can easily access your haptic device from Blueprint or C++ and retrieve the position, rotation, linear velocity, angular velocity and button clicks from the device and apply forces and torques to the device. This Plugin was tested with the PHANToM Omni from Sensable but should work with all of the following haptic devices that the internally used library CHAI3D supports: delta.x, omega.x, sigma.x, Novint Falcon, Phantom Omni, Touch 3D, Razer Hydra.

Instalation

  • Put the Haptico Folder into the Plugins folder in your project directory. If you don't have the folder, create it.

  • If you want to use C++, add the following lines to your <your_project_name>.Build.cs :

    	PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "Haptico"});
        PrivateDependencyModuleNames.AddRange(new string[] { "Haptico" });
        PrivateIncludePathModuleNames.AddRange(new string[] { "Haptico" });
        PublicIncludePathModuleNames.AddRange(new string[] { "Haptico" });
  • Put your haptic device specific DLL into the projects Binaries/Win64 folder next to the other DLL's. If you don't have one, create Binarries/Win64/ in your project directory.

  • Make sure that the plugin is enabled in the editor under Edit->Plugins.

How to use

In the editor in the Modes tab search for a class named Haptic Manager and place it in your scene. Now you can open your Blueprint and search for and use the following functions:

  • Set Force to Apply
  • Set Torque to Apply
  • Get Haptic Device Position (in Device Coordinates)
  • Get Haptic Device Position in Unreal Coordinates
  • Get Haptic Device Rotation (in Device Rotation Matrix)
  • Get Haptic Device Rotation as Unreal Rotator
  • Get Haptic Device Linear Velocity
  • Get Haptic Device Angular Velocity

To react to button clicks, You can catch the Events Button1Clicked and Button2Clicked.

You can access the same functions from C++ from the AHapticManager class.

If you need smooth haptic force feedback you can hook to the haptic thread that runs at nearly 1000Hz by binding to the OnHapticTick Delegate to do your force calculation on the haptic thread.

Example

You can find an example project that includes the plugin in the Example Folder. Drag the Haptico plugin into the project's Plugins folder and start the example.

haptico's People

Contributors

bunk96 avatar sindemcos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

haptico's Issues

Doubts about the Haptico plugin

Hi, I am a master degree student, I am working in the development of a virtual environment with Unreal Engine and I am using the Haptico plugin, but I have some questions related to the blueprint "Get Haptic Device Linear Velocity" and the "Get Haptic Device Angular Velocity", the last is the velocity related to the motors?. I hope you can contact me, my email is [email protected]

plugin needs rebuild

Hi, I'm trying to implement this with Phantom Haptic device but the plugin can't be loaded nor rebuilt for the current unreal version. I tried it on different PCs and other unreal versions and get the same error. Is there an update for the plugin?

Collision generation low frequency

Hello!

I see that the haptic loop fetches the position/speed of the haptic device and it's possible to apply forces/torques both at a high frequency (500-1000Hz). However, the generation of collisions in Unreal Engine works using the OnComponentHit function that releases the data on every Tick from Unreal Engine at low frequencies (60-120Hz). Even the sub-stepping experimental function from Unreal Engine releases all the collisions at the end of every Tick (60-120Hz) (see technical details here https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/Physics/Substepping/).

Therefore, even if your plugin can send forces to the device at 500-1000Hz, it is not possible to generate collision responses at 500-1000Hz in Unreal Engine to send them in real-time. Is this correct or are we missing something? Is there any possible way to calculate the collision forces at 500-1000Hz in Unreal Engine?

Thank you again.

Compile Error

Hi
I have a compile error in plugin source for some include file.
The "Async.h" and "AsyncWork.h" not found .

How can i fix it?

OS : windows 11
UE : 4.25
VS : 2017

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.