mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 09:30:25 +08:00
UI: Update preferences with the new imu filter parameters. Camera: added imu filtering option. Updated support for zedm, D435i and T265.
This commit is contained in:
@@ -45,6 +45,7 @@ class Camera;
|
||||
class CameraInfo;
|
||||
class SensorData;
|
||||
class StereoDense;
|
||||
class IMUFilter;
|
||||
|
||||
/**
|
||||
* Class CameraThread
|
||||
@@ -68,6 +69,8 @@ public:
|
||||
void setDistortionModel(const std::string & path);
|
||||
void enableBilateralFiltering(float sigmaS, float sigmaR);
|
||||
void disableBilateralFiltering() {_bilateralFiltering = false;}
|
||||
void enableIMUFiltering(int filteringStrategy=1, const ParametersMap & parameters = ParametersMap());
|
||||
void disableIMUFiltering();
|
||||
|
||||
void setScanParameters(
|
||||
bool fromDepth,
|
||||
@@ -122,6 +125,7 @@ private:
|
||||
bool _bilateralFiltering;
|
||||
float _bilateralSigmaS;
|
||||
float _bilateralSigmaR;
|
||||
IMUFilter * _imuFilter;
|
||||
};
|
||||
|
||||
} // namespace rtabmap
|
||||
|
||||
@@ -38,7 +38,6 @@ namespace rtabmap {
|
||||
|
||||
class OdometryInfo;
|
||||
class ParticleFilter;
|
||||
class IMUFilter;
|
||||
|
||||
class RTABMAP_EXP Odometry
|
||||
{
|
||||
@@ -92,7 +91,6 @@ private:
|
||||
bool _holonomic;
|
||||
bool guessFromMotion_;
|
||||
bool guessSmoothingDelay_;
|
||||
int _imuFilteringStrategy;
|
||||
int _filteringStrategy;
|
||||
int _particleSize;
|
||||
float _particleNoiseT;
|
||||
@@ -117,7 +115,6 @@ private:
|
||||
|
||||
std::vector<ParticleFilter *> particleFilters_;
|
||||
cv::KalmanFilter kalmanFilter_;
|
||||
IMUFilter * imuFilter_;
|
||||
|
||||
protected:
|
||||
Odometry(const rtabmap::ParametersMap & parameters);
|
||||
|
||||
@@ -409,7 +409,6 @@ class RTABMAP_EXP Parameters
|
||||
RTABMAP_PARAM(Odom, Holonomic, bool, true, "If the robot is holonomic (strafing commands can be issued). If not, y value will be estimated from x and yaw values (y=x*tan(yaw)).");
|
||||
RTABMAP_PARAM(Odom, FillInfoData, bool, true, "Fill info with data (inliers/outliers features).");
|
||||
RTABMAP_PARAM(Odom, ImageBufferSize, unsigned int, 1, "Data buffer size (0 min inf).");
|
||||
RTABMAP_PARAM(Odom, ImuFilteringStrategy, int, 0, "0=No filtering 1=Madgwick Filter 2=Complementary Filter. This is used to estimate the quaternion from acceleration and angular velocities of IMU before doing odometry updates. IMU data should be in ENU coordinates.");
|
||||
RTABMAP_PARAM(Odom, FilteringStrategy, int, 0, "0=No filtering 1=Kalman filtering 2=Particle filtering. This filter is used to smooth the odometry output.");
|
||||
RTABMAP_PARAM(Odom, ParticleSize, unsigned int, 400, "Number of particles of the filter.");
|
||||
RTABMAP_PARAM(Odom, ParticleNoiseT, float, 0.002, "Noise (m) of translation components (x,y,z).");
|
||||
@@ -732,18 +731,6 @@ class RTABMAP_EXP Parameters
|
||||
RTABMAP_PARAM(ImuFilter, ComplementaryDoBiasEstimation, bool, true, "Parameter whether to do bias estimation or not.");
|
||||
RTABMAP_PARAM(ImuFilter, ComplementaryDoAdpativeGain, bool, true, "Parameter whether to do adaptive gain or not.");
|
||||
|
||||
//
|
||||
double gain_acc_;
|
||||
|
||||
//
|
||||
double bias_alpha_;
|
||||
|
||||
//
|
||||
bool do_bias_estimation_;
|
||||
|
||||
//
|
||||
bool do_adaptive_gain_;
|
||||
|
||||
public:
|
||||
virtual ~Parameters();
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ public:
|
||||
void pose_callback(rs2::frame frame);
|
||||
void frame_callback(rs2::frame frame);
|
||||
void multiple_message_callback(rs2::frame frame);
|
||||
bool getPoseAndIMU(
|
||||
void getPoseAndIMU(
|
||||
const double & stamp,
|
||||
Transform & pose,
|
||||
unsigned int & poseConfidence,
|
||||
@@ -110,6 +110,8 @@ private:
|
||||
std::map<double, cv::Vec3f> accBuffer_;
|
||||
std::map<double, cv::Vec3f> gyroBuffer_;
|
||||
std::map<double, std::pair<Transform, unsigned int> > poseBuffer_; // <stamp, <Pose, confidence: 1=lost, 2=low, 3=high> >
|
||||
UMutex poseMutex_;
|
||||
UMutex imuMutex_;
|
||||
|
||||
bool emitterEnabled_;
|
||||
bool irDepth_;
|
||||
|
||||
Reference in New Issue
Block a user