Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The launch file fails to initialize haptic device. #2

Closed
mjm522 opened this issue Mar 6, 2018 · 2 comments
Closed

The launch file fails to initialize haptic device. #2

mjm522 opened this issue Mar 6, 2018 · 2 comments

Comments

@mjm522
Copy link

mjm522 commented Mar 6, 2018

Hi,

I followed the instructions to install the Phantom Omni. I am able to run both PHANToMConfiguration and PHANToMTest successfully. However after building this ros-package, I am getting the following error on launching the omni.launch file.

ERROR] [1520379495.119316581]: Failed to initialize haptic device

Could you please provide any guidance on solving this?

I am on Ubuntu 14.04 with Indigo.

Best,

Mike

@mjm522
Copy link
Author

mjm522 commented Mar 7, 2018

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.

@mjm522 mjm522 closed this as completed Mar 7, 2018
@deepakraina99
Copy link

@mjm522 I am still getting the same error after doing the above mentioned steps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants