Go to the documentation of this file.
16 #ifdef _IMU_USE_XSENS_DEVICE_
23 #define _IMU_DEVICE_DEFAUL_CONNECTION_ std::string("/dev/ttyUSB0")
24 #define _IMU_DEVICE_DEFAUL_FREQUENCY_ IMU::CIMUDevice::eSamplingFrequency_120HZ
25 #define _IMU_DEVICE_DEFAUL_CHECK_PERIOD_FACTOR_ 0.5f
26 #define _IMU_DEVICE_DEFAUL_NORMALIZED_THREAD_PRIORITY_ 0.125f
31 class IIMUEventDispatcher;
124 #ifdef _IMU_USE_XSENS_DEVICE_
134 bool Start(
const bool Blocking =
true);
138 void Stop(
const bool Blocking =
true);
150 return m_ReferenceTimeStamp;
171 void UnregisterEventDispatchers();
173 bool InitializeDevice(
const std::string& PortName,
const SamplingFrequency Frequency);
174 void FinalizeModuleDevice();
176 bool DispatchCylcle();
178 void SetReferenceTimeStamps();
180 static void* ThreadLoop(
void* pData);
184 int m_PeriodMicroSeconds;
186 int m_SamplesPerFusion;
187 int m_CollectedFusionSamples;
188 volatile bool m_IsActive;
189 volatile bool m_IsDispatching;
190 bool m_IsInitialized;
191 pthread_t m_pInternalThreadHandel;
192 pthread_mutex_t m_IsActiveMutex;
193 pthread_mutex_t m_IsDispatchingMutex;
194 pthread_mutex_t m_EventDispatchersMutex;
195 pthread_mutex_t m_DeviceMutex;
196 std::set<IIMUEventDispatcher*> m_IMUEventDispatchers;
197 timeval m_ReferenceTimeStamp;
198 timeval m_LastFrameTimeStamp;
204 #ifdef _IMU_USE_XSENS_DEVICE_
206 bool InitializeXsensDevice(
const std::string& PortName,
const SamplingFrequency Frequency);
207 void FinalizeXsensModuleDevice();
208 void DestroyXsensModuleDevice();
@ eSamplingFrequency_24HZ
@ eSamplingFrequency_256HZ
CIMUDevice()
The default constructor. The default constructor sets all member variables to zero,...
@ eSamplingFrequency_150HZ
@ eSamplingFrequency_192HZ
@ eSamplingFrequency_90HZ
IMUState GetIMUState() const
bool IntegrateCurrentState()
@ eSamplingFrequency_30HZ
@ eSamplingFrequency_320HZ
bool SetThreadRunnigMode(const ThreadPolicyType ThreadPolicy, const float NormalizedPriority)
@ eSamplingFrequency_20HZ
@ eSamplingFrequency_200HZ
@ eSamplingFrequency_50HZ
@ eSamplingFrequency_450HZ
@ eSamplingFrequency_80HZ
@ eSamplingFrequency_180HZ
@ eSamplingFrequency_64HZ
@ eSamplingFrequency_60HZ
ThreadPolicyType
Enum specifying the running thread policy.
@ eSamplingFrequency_12HZ
@ eSamplingFrequency_120HZ
@ eSamplingFrequency_10HZ
bool MeanFuseCurrentState()
@ eSamplingFrequency_18HZ
bool RegisterEventDispatcher(IIMUEventDispatcher *pIMUEventDispatcher)
@ eRoundRobinPriorityBased
bool GaussianFuseCurrentState()
@ eSamplingFrequency_15HZ
void IncorporateCurrentStateMeanFusion()
@ eSamplingFrequency_32HZ
bool IntegrateWithOutFusion()
@ eSamplingFrequency_40HZ
@ eSamplingFrequency_400HZ
This class contains the the devices module and the thread for read the measurements.
@ eSamplingFrequency_100HZ
@ eSamplingFrequency_240HZ
@ eSamplingFrequency_144HZ
bool Connect(const std::string &PortName, const SamplingFrequency Frequency)
void Stop(const bool Blocking=true)
@ eSamplingFrequency_16HZ
void IncorporateCurrentStateGaussianFusion()
@ eSamplingFrequency_72HZ
@ eSamplingFrequency_128HZ
@ eSamplingFrequency_360HZ
uint64_t GetDeviceId() const
@ eSamplingFrequency_160HZ
@ eSamplingFrequency_384HZ
virtual ~CIMUDevice()
The destructor.
bool UnregisterEventDispatcher(IIMUEventDispatcher *pIMUEventDispatcher)
SamplingFrequency
Enum specifying the supported sampling frequencies.
bool IntegrateWithFusion()
@ eSamplingFrequency_75HZ
@ eSamplingFrequency_25HZ
@ eSamplingFrequency_225HZ
@ eSamplingFrequency_96HZ
@ eSamplingFrequency_45HZ
@ eSamplingFrequency_512HZ
@ eSamplingFrequency_48HZ
bool Start(const bool Blocking=true)
@ eSamplingFrequency_36HZ
bool SetFusion(const FusionStrategy Strategy, const ushort SamplesPerFusion)
const timeval & GetReferenceTimeStamp() const
@ eSamplingFrequency_288HZ
@ eSamplingFrequency_300HZ
@ eSamplingFrequency_480HZ