vrpn / vrpn

Virtual Reality Peripheral Network - Official GitHub Repository
https://github.com/vrpn/vrpn/wiki
387 stars 216 forks source link

Cannot find 3D systems Touch Haptic HID #295

Open cyborgdennett opened 1 month ago

cyborgdennett commented 1 month ago

Hi, I have the Touch Haptic USBHID, it cannot be found because the name of the driver is different than in vrpn

https://github.com/vrpn/vrpn/blob/c8c9e44affff1477857c8ffaf90267922ab4f538/cmake/FindOpenHaptics.cmake#L160-L169

Was able to make it work with the new name

if(UNIX)
    find_library(HDAPI_PHANToMIO_LIBRARY
        NAMES
        PHANToMIO
        HINTS
        ${_libsearchdirs})
    if(NOT HDAPI_PHANToMIO_LIBRARY)
        find_library(HDAPI_PHANToMIO_LIBRARY
            NAMES
            PhantomIOLib42
            HINTS
            ${_libsearchdirs})
    endif()
    mark_as_advanced(HDAPI_PHANToMIO_LIBRARY)
    list(APPEND _deps_check HDAPI_PHANToMIO_LIBRARY)
    list(APPEND _deps_libs "${HDAPI_PHANToMIO_LIBRARY}")
endif()
cyborgdennett commented 1 month ago

After the fixes, I still get the following error when trying to run vrpn_server and phan_client

phan_client:

(9) from Tracker0: No response from server for >= 3 seconds
VRPN Warning
... x10

vrpn_server:

Reading from config file vrpn.cfg
Opening vrpn_Phantom:
    VRPN name: Phantom
    Configuration name: "Default PHANToM"
    Calibration: yes
    Frequence: 1000.000
Initializing phantom, you have 10 seconds to establish reset position
InitLogFile : (null)

vrpn: Connection request received from 127.0.0.1: 127.0.0.1 43167
vrpn_Endpoint::getOneTCPMessage:  Can't read header (this is normal when a connection is dropped)
vrpn: TCP handling failed, dropping connection (this is normal when a connection is dropped)
vrpn_Phantom: Dropped last connection, resetting force effects

Any tips would be appreciated

cyborgdennett commented 1 month ago

Actually this is also when using sample_server with vrpn_print_devices. Not sure what I am doing wrong

russell-taylor commented 1 month ago

The VRPN name for the Phantom device reported by the server is Phantom. So you'll want to run vrpn_print_devices Phantom@localhost to hear from it.

cyborgdennett commented 1 month ago

Wow thanks that solved it

russell-taylor commented 1 month ago

Sure thing. You can set the name in the configuration file vrpn.cfg to whatever you'd like, but the client must match. This trips up a lot of people.