Commit 3e3b9df2 authored by Alexis Girault's avatar Alexis Girault
Browse files

ENH: implement NovintFalcon VRPN device

parent f078198c
......@@ -22,6 +22,9 @@
#include "imstkVRPNDeviceServer.h"
#include "vrpn_3DConnexion.h"
#define VRPN_USE_LIBNIFALCON
#define VERBOSE
#include "vrpn_Tracker_NovintFalcon.h"
#include "g3log/g3log.hpp"
......@@ -55,6 +58,12 @@ VRPNDeviceServer::initModule()
{
m_deviceConnections->add(new vrpn_3DConnexion_Navigator(name.c_str(), m_serverConnection));
} break;
case DeviceType::NOVINT_FALCON:
{
auto vrpn_device = new vrpn_Tracker_NovintFalcon(name.c_str(), m_serverConnection,
0, "4-button", "stamper");
m_deviceConnections->add(vrpn_device);
} break;
default:
{
LOG(WARNING) << "VRPNDeviceServer::initModule error: can not connect to "
......
......@@ -37,7 +37,8 @@ namespace imstk {
enum class DeviceType
{
SPACE_EXPLORER_3DCONNEXION,
NAVIGATOR_3DCONNEXION
NAVIGATOR_3DCONNEXION,
NOVINT_FALCON
};
///
......
......@@ -65,9 +65,11 @@ void testDevices()
auto sdk = std::make_shared<imstk::SimulationManager>();
auto server = std::make_shared<imstk::VRPNDeviceServer>("127.0.0.1");
server->addDevice("device0", imstk::DeviceType::SPACE_EXPLORER_3DCONNEXION);
server->addDevice("device0", imstk::DeviceType::NOVINT_FALCON);
server->setLoopDelay(100);
auto client = std::make_shared<imstk::VRPNDeviceClient>("device0", "localhost"); // localhost = 127.0.0.1
client->setLoopDelay(100);
// Start server in other thread
auto t = std::thread([server] { server->start(); });
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment