diff --git a/Base/Devices/imstkVRPNDeviceClient.cpp b/Base/Devices/imstkVRPNDeviceClient.cpp index 56dcda9ca0ce2fa1176a5a8480d5abd279207327..975fca1fb432fc98b57384503c5ddbe2a96429de 100644 --- a/Base/Devices/imstkVRPNDeviceClient.cpp +++ b/Base/Devices/imstkVRPNDeviceClient.cpp @@ -31,8 +31,6 @@ VRPNDeviceClient::initModule() { auto fullDeviceIp = this->getName().c_str(); - m_offsetSet = false; - m_vrpnTracker = std::make_shared<vrpn_Tracker_Remote>(fullDeviceIp); m_vrpnAnalog = std::make_shared<vrpn_Analog_Remote>(fullDeviceIp); m_vrpnButton = std::make_shared<vrpn_Button_Remote>(fullDeviceIp); @@ -100,14 +98,7 @@ VRPNDeviceClient::trackerChangeHandler(void *userData, const _vrpn_TRACKERCB t) quat.y() = t.quat[1]; quat.z() = t.quat[2]; quat.w() = t.quat[3]; - - if(!deviceClient->m_offsetSet) - { - deviceClient->m_rotOffset = quat.inverse(); - deviceClient->m_offsetSet = true; - return; - } - deviceClient->m_orientation = deviceClient->m_rotOffset * quat; + deviceClient->m_orientation = quat; //LOG(DEBUG) << "tracker: position = " << t.pos[0] << " " << t.pos[1] << " " << t.pos[2]; //LOG(DEBUG) << "tracker: orientation = " << deviceClient->m_orientation.matrix(); diff --git a/Base/Devices/imstkVRPNDeviceClient.h b/Base/Devices/imstkVRPNDeviceClient.h index 8609310e2e5c1d2328ec57b5ca711b7d9599434a..f9dca9e24aa651dcb1b3ef4585cfa656bf6f8242 100644 --- a/Base/Devices/imstkVRPNDeviceClient.h +++ b/Base/Devices/imstkVRPNDeviceClient.h @@ -125,9 +125,6 @@ private: std::shared_ptr<vrpn_Analog_Remote> m_vrpnAnalog; //!< VRPN position/orientation interface std::shared_ptr<vrpn_Button_Remote> m_vrpnButton; //!< VRPN button interface std::shared_ptr<vrpn_ForceDevice_Remote> m_vrpnForceDevice; //!< VRPN force interface - - bool m_offsetSet = false; - Quatd m_rotOffset = Quatd::Identity(); }; } diff --git a/Base/Devices/imstkVRPNDeviceServer.h b/Base/Devices/imstkVRPNDeviceServer.h index a1e07ac11d7ef3f4503343aea232b01d930c1291..23522db04259efba6d28118302340af1f8a22414 100644 --- a/Base/Devices/imstkVRPNDeviceServer.h +++ b/Base/Devices/imstkVRPNDeviceServer.h @@ -32,7 +32,6 @@ // imstk #include "imstkModule.h" -#include "imstkVRPNDeviceClient.h" namespace imstk {