Adjuvo / SenseGlove-Unity

The latest stable Unity SDK for the SenseGlove.
MIT License
35 stars 10 forks source link

Can not control vibration #40

Open XPxxxgaos opened 5 months ago

XPxxxgaos commented 5 months ago

Hi. I just got a NOVA2 glove. I want to send vibration command to NOVA2 in Unity as follow,

float[] buzz = new float[this.fingerVibration.Length];

for (int f = 0; f < this.fingerVibration.Length; f++)
{
      buzz[f] = (int)fingerVibration[f].SlideValue / 100.0f;
}

hapticGlove.QueueVibroLevels(buzz);

This code is copy from SenseGlove-Unity/tree/master/SenseGlove/Examples/Resources/SGEx_GloveDiagnostics.cs: 334. However, when I send the vibration command, nothing happened. What shall I do to control vibration?

XPxxxgaos commented 5 months ago

Similarly, I cannot control wrist squeeze. Also nothing happened, when I send wrist squeeze command to NOVA2 in Unity as follow,

float wrist = thumperVibration.SlideValue / 100.0f;
if (hapticGlove is SGCore.Nova.NovaGlove)
{
    ((SGCore.Nova.NovaGlove)hapticGlove).QueueWristLevel(wrist);
}
hapticGlove.SendHaptics();

This code is copy from SenseGlove-Unity/tree/master/SenseGlove/Examples/Resources/SGEx_GloveDiagnostics.cs: 342.

MaxLammers commented 5 months ago

Hello there,

This code will not work, since this Diagnostics Scene was originally built for the Nova 1.0 and SenseGlove DK1 exoskeleton only. For the Nova 2.0, we've opted to create a specific, separate diagnostics scene "14_Nova2_Diagnostics" with its own Example script located at SenseGlove-Unity/tree/master/SenseGlove/Examples/Resources/SGEx_Nova2Diagnostics.cs. Updated the Readme to reflect this.

Upon checking, we realized the example was included, but the script was not. Apologies for the confusion. Added this in a v2.6.2 update. In addition, it may be worth checking out our Upgrade Guide to v2.6, as it highlights some of the new Nova 2.0 functions.

KheireddineAzzez-HHN commented 4 months ago

the same issue for me, even during the diagnostic

KheireddineAzzez-HHN commented 4 months ago

Actually you have to add this custom wave to the script : image