45 #include <visp3/sensor/vpForceTorqueIitSensor.h> 47 #ifdef VISP_HAVE_FT_IIT_SDK 55 : m_ftLib(), m_numSensorsInLib(0), m_ft(6, 0), m_ft_filt(6, 0), m_ftSensorsData(), m_acquisitionEnabled(false), m_dataValid(false),
56 m_connected(false), m_acquisitionThread(), m_timeCur(), m_timePrev(), m_mutex(), m_warmupMilliseconds(500)
72 if (
m_ftLib._configureStreaming(
false, 0) == 0) {
74 m_ftLib._startStreamingThread();
113 auto time_init = std::chrono::system_clock::now();
117 m_timeCur = std::chrono::system_clock::now();
120 auto elapsed_milliseconds = std::chrono::duration_cast<std::chrono::milliseconds>(
m_timeCur -
m_timePrev).count();
122 if (elapsed_milliseconds >= 1) {
140 auto warmup_milliseconds = std::chrono::duration_cast<std::chrono::milliseconds>(
m_timeCur - time_init).count();
147 const std::lock_guard<std::mutex> lock(
m_mutex);
148 for (
unsigned int i = 0; i < 6; i++) {
207 const std::lock_guard<std::mutex> lock(
m_mutex);
244 void dummy_vpForceTorqueIitSensor(){};
VISP_EXPORT int wait(double t0, double t)
std::atomic< bool > m_acquisitionEnabled
std::thread m_acquisitionThread
bool connected(int timeout_ms=0) const
~vpForceTorqueIitSensor()
void start(bool reset=true)
VISP_EXPORT void sleepMs(double t)
std::atomic< bool > m_dataValid
std::chrono::time_point< std::chrono::system_clock > m_timePrev
std::chrono::time_point< std::chrono::system_clock > m_timeCur
Implementation of column vector and the associated operations.
vpColVector getForceTorque(bool filtered=false)
ftSensorsConnected m_ftSensorsData