44 #include <visp3/sensor/vpForceTorqueIitSensor.h>
46 #if defined(VISP_HAVE_FT_IIT_SDK) && defined(VISP_HAVE_THREADS)
55 : m_ftLib(), m_numSensorsInLib(0), m_ft(6, 0), m_ft_filt(6, 0), m_ftSensorsData(), m_acquisitionEnabled(false),
56 m_dataValid(false), m_connected(false), m_acquisitionThread(), m_timeCur(), m_timePrev(), m_mutex(),
57 m_warmupMilliseconds(500)
73 if (
m_ftLib._configureStreaming(
false, 0) == 0) {
75 m_ftLib._startStreamingThread();
114 auto time_init = std::chrono::system_clock::now();
118 m_timeCur = std::chrono::system_clock::now();
121 auto elapsed_milliseconds = std::chrono::duration_cast<std::chrono::milliseconds>(
m_timeCur -
m_timePrev).count();
123 if (elapsed_milliseconds >= 1) {
141 auto warmup_milliseconds = std::chrono::duration_cast<std::chrono::milliseconds>(
m_timeCur - time_init).count();
149 const std::lock_guard<std::mutex> lock(
m_mutex);
150 for (
unsigned int i = 0; i < 6; i++) {
209 const std::lock_guard<std::mutex> lock(
m_mutex);
245 void dummy_vpForceTorqueIitSensor() { };
void start(bool reset=true)
Implementation of column vector and the associated operations.
std::chrono::time_point< std::chrono::system_clock > m_timePrev
~vpForceTorqueIitSensor()
std::atomic< bool > m_dataValid
bool connected(int timeout_ms=0) const
std::chrono::time_point< std::chrono::system_clock > m_timeCur
std::thread m_acquisitionThread
ftSensorsConnected m_ftSensorsData
vpColVector getForceTorque(bool filtered=false)
std::atomic< bool > m_acquisitionEnabled
VISP_EXPORT int wait(double t0, double t)
VISP_EXPORT void sleepMs(double t)