danepowell/phantom_omni

Failing to launch.

mjm522 opened this issue · 1 comments

Hi,

I am getting the following error while launching the file.

[ERROR] [1520375559.144348015]: Failed to initialize haptic device

Running PhantomTest, I am able to see the device and play with it. While the rosnode simply dies.

Could you please suggest anything about this error?

Best,

Mike

Hi

I fixed the issue. Got it running.

This is what you have to do.

Step 1: in the omni.cpp define a macro name

#define DEVICE_NAME "Default PHANToM"

Step 2: line 302 in omni.cpp change to

hHD = hdInitDevice(DEVICE_NAME);

Step 3: run the roslaunch as root!

Everything works!

My reasoning: HD_DEFAULT_DEVICE is a HDString and it is set as NULL by default, somehow this is causing the problem since the API is trying to access a NULL value. So we need to set the actual name of the device. This should be a bug in the API.