Gravity Compensation and Force Feedback in HardwareAPI 0.1.11 on Ubuntu

I am currently working with the Hardware API C++ version 0.1.11 to implement gravity compensation and force feedback on the Inverse3 device. The implementation works perfectly on Windows, but when running the same code on Linux, the effects do not seem to be applied correctly. I have already reviewed the documentation, but I could not find any mention of limitations or differences between the Windows and Linux implementations.

To clarify my situation:

  1. The same HardwareAPI version (0.1.11) is being used on both Windows and Linux.
  2. The gravity compensation and force feedback functionalities work as expected on Windows.
  3. On Linux, there is no observable effect despite using the same code and device setup.

Could you please confirm:

    • Are there any known limitations or differences in the HardwareAPI between Windows and Linux?
  • Is there any additional setup or configuration required specifically for Linux?
  • If not, are there any debugging steps or logs I should check to identify the root cause?

Thank you for your assistance, and I look forward to your guidance.

Hi @sakai, welcome to our forum.

There is no reason for gravity compensation or force feedback to be different between Windows, Linux or MacOS as they are feature integrated in our Hardware at the Firmware level.

To clarify the issue, are you able to connect to the device ? Linux system typically have restriction on accessing USB ports and could either require a UDEV rule or the same script to be run with root/sudo in order to properly access the com port.

Hoping we can get you going quickly !

Best,
Antoine

Dear @antoine,
Thank you for your response and clarification regarding gravity compensation and force feedback being handled at the firmware level.

To address your points and provide more details:

  1. I am running the application with sudo privileges, so there should not be any permission issues regarding USB or serial port access.
  2. The source code I am using is the example provided in the demo: 03-hello-wall.cpp.
  3. My environment is as follows:
  1. Both 00-auto-detect and 01-print-inverse3 examples are working correctly. I can successfully detect the device and retrieve position and velocity data.
  2. However, when running 03-hello-wall, I do not feel any haptic feedback, and gravity compensation does not seem to be applied.

It seems that only the features requiring force feedback or gravity compensation are not functioning on Linux, despite the device being connected and other functionalities (e.g., position tracking) working as expected.

Could you advise:

  • Are there any specific dependencies or configurations required for 03-hello-wall to function properly on Linux?
  • Should I verify certain logs or outputs to debug this further?
  • Could the issue be related to the low-latency kernel, or are there other system-specific factors I should investigate?

Thank you for your assistance, and I am happy to provide additional information or test further configurations if needed.

Thanks for the follow up investigation.

There is no reason for forces and gravity compensation to not function in Linux, and if you are able to get position it means the full communication (including sending forces) is working with your setup.

Is the LED on the device steady or blinking, and what color is it ?
If you calibrate the device by puting it in the inkwell position Quick Start: Inverse3 | Haply Documentation Hub does the force stay disabled or does it turns on ?

Low latency kernel should not interfere, as long as the communication messages to the device are still being sent at a 500Hz+ rate.

Best,
Antoine

Dear Antoine,

Thank you for your detailed response and the suggestions for further investigation. I have followed your advice and conducted additional testing. Below are the results:

  1. Initial connection (device plugged into the PC):
  • LED status: Blinking red
  • Force feedback: Not functional
  1. After calibration (device placed in the inkwell position):
  • LED status: Still blinking red
  • Force feedback: Not functional
  1. When running the program (sudo ./03-hello-wall /dev/ttyACM0):
  • LED status: Blinking purple
  • Gravity compensation: Not functional
  • Force feedback: Not functional

Additionally, I revisited testing on Windows and found that both gravity compensation and force feedback are not functional there either. This is a change from my previous observation where these features were working on Windows.

Windows-specific details:

  • When running the program on Windows, the LED blinks green, but gravity compensation and force feedback are still not functioning.
  • Device information is as follows:
    • info: id=1342, model=4, version={hardware:7, firmware:1}

Based on this, it appears the issue is not specific to Linux but affects both platforms.

Could you please advise:

  1. Is the LED behavior described above consistent with normal operation?
  2. Could the issue be related to the device firmware version or configuration?
  3. Are there any specific debugging steps or device resets that you would recommend?

Thank you for your support. I look forward to your guidance to resolve this issue.

Best regards,
sakai

Thank you for your advice.

After disconnecting and reconnecting both the power cable and USB cable of the device, I was able to confirm that it is now working correctly on both Windows and Linux.

Could the device have been in an invalid state?

Best regards,
Sakai