|
RTAB-Map 0.23.10
Real-Time Appearance-Based Mapping
|
Background thread that replays IMU measurements from a CSV file. More...
#include <IMUThread.h>


Public Member Functions | |
| IMUThread (int rate, const Transform &localTransform) | |
| Constructs the replay thread. | |
| bool | init (const std::string &path) |
| Opens and validates an IMU CSV file. | |
| void | setRate (int rate) |
| Sets the target playback rate in Hz. | |
| void | enableIMUFiltering (int filteringStrategy=1, const ParametersMap ¶meters=ParametersMap(), bool baseFrameConversion=false) |
| Enables orientation fusion on replayed samples. | |
| void | disableIMUFiltering () |
| Disables fusion and deletes the internal IMUFilter. | |
Public Member Functions inherited from UThread | |
| UThread (Priority priority=kPNormal) | |
| virtual | ~UThread () |
| void | start () |
| void | kill () |
| void | join (bool killFirst=false) |
| void | setPriority (Priority priority) |
| void | setAffinity (int cpu=0) |
| bool | isCreating () const |
| bool | isRunning () const |
| bool | isIdle () const |
| bool | isKilled () const |
| Handle | getThreadHandle () const |
| unsigned long | getThreadId () const |
Public Member Functions inherited from UThreadC< void > | |
| int | Create (Handle *const &H=0, const bool &CreateDetached=false, const unsigned int &StackSize=0, const bool &CancelEnable=false, const bool &CancelAsync=false) const |
| int | Create (unsigned long &ThreadId, Handle *const &H=0, const bool &CreateDetached=false, const unsigned int &StackSize=0, const bool &CancelEnable=false, const bool &CancelAsync=false) const |
| int | Create (Handle *const &H=0, const bool &CreateDetached=false, const unsigned int &StackSize=0, const bool &CancelEnable=false, const bool &CancelAsync=false) const |
| int | Create (unsigned long &ThreadId, Handle *const &H=0, const bool &CreateDetached=false, const unsigned int &StackSize=0, const bool &CancelEnable=false, const bool &CancelAsync=false) const |
Additional Inherited Members | |
Public Types inherited from UThread | |
| enum | Priority { kPLow , kPBelowNormal , kPNormal , kPAboveNormal , kPRealTime } |
Public Types inherited from UThreadC< void > | |
| typedef THREAD_HANDLE | Handle |
| typedef void(* | Handler) () |
| typedef THREAD_HANDLE | Handle |
| typedef void(* | Handler) () |
Static Public Member Functions inherited from UThread | |
| static unsigned long | currentThreadId () |
Static Public Member Functions inherited from UThreadC< void > | |
| static int | Create (const Handler &Function, Handle *const &H=0, const bool &CreateDetached=false, const unsigned int &StackSize=0, const bool &CancelEnable=false, const bool &CancelAsync=false) |
| static int | Join (Handle H) |
| static int | Kill (Handle H) |
| static int | Detach (Handle H) |
| static int | Create (const Handler &Function, Handle *const &H=0, const bool &CreateDetached=false, const unsigned int &StackSize=0, const bool &CancelEnable=false, const bool &CancelAsync=false) |
| static int | Join (const Handle &H) |
| static int | Kill (const Handle &H) |
| static int | Detach (const Handle &H) |
Protected Member Functions inherited from UEventsSender | |
| void | post (UEvent *event, bool async=true) const |
Static Protected Member Functions inherited from UThreadC< void > | |
| static void | Exit () |
| static void | TestCancel () |
| static Handle | Self () |
| static void | Exit () |
| static void | TestCancel () |
| static int | Self () |
Background thread that replays IMU measurements from a CSV file.
Reads gyroscope and accelerometer samples from a comma-separated file (EuRoC-style or epoch timestamps), optionally fuses them with IMUFilter, and posts IMUEvent on each step.
CSV format:
stamp,gx,gy,gz,ax,ay,az (stamp in seconds with a decimal point, or EuRoC nanoseconds without one).Playback rate is limited by setRate() when rate > 0; otherwise samples are read as fast as possible (or spaced using inter-sample timestamps after the first pair). When the file ends, the thread posts an empty IMUEvent and stops.
Definition at line 65 of file IMUThread.h.
| rtabmap::IMUThread::IMUThread | ( | int | rate, |
| const Transform & | localTransform | ||
| ) |
| bool rtabmap::IMUThread::init | ( | const std::string & | path | ) |
Opens and validates an IMU CSV file.
| path | Path to the CSV file. |
| void rtabmap::IMUThread::enableIMUFiltering | ( | int | filteringStrategy = 1, |
| const ParametersMap & | parameters = ParametersMap(), |
||
| bool | baseFrameConversion = false |
||
| ) |
Enables orientation fusion on replayed samples.
| filteringStrategy | IMUFilter::Type index (0 = Madgwick, 1 = complementary). |
| parameters | Optional ImuFilter/... tuning parameters. |
| baseFrameConversion | If true, rotate IMU vectors into the base frame before filtering. |