mrpt_ekf_slam_2d.h
Go to the documentation of this file.
1 /*
2  * File:mrpt_ekf_slam_3d.h
3  * Author: Vladislav Tananaev
4  *
5  */
6 
7 #pragma once
8 
9 #include <mrpt/utils/CConfigFile.h>
10 #include <mrpt/utils/CFileGZInputStream.h>
11 #include <mrpt/utils/CFileGZOutputStream.h>
12 #include <mrpt/system/os.h>
13 #include <mrpt/system/string_utils.h>
14 #include <mrpt/system/filesystem.h>
15 #include <mrpt/slam/CRangeBearingKFSLAM2D.h>
16 
17 #include <mrpt/math/ops_containers.h>
18 #include <mrpt/opengl/CGridPlaneXY.h>
19 #include <mrpt/opengl/CSetOfLines.h>
20 #include <mrpt/opengl/stock_objects.h>
21 
22 #include <mrpt/gui/CDisplayWindow3D.h>
23 
24 #include <mrpt/version.h>
25 #if MRPT_VERSION >= 0x130
26 #include <mrpt/obs/CActionRobotMovement2D.h>
27 #include <mrpt/obs/CActionCollection.h>
28 #include <mrpt/obs/CObservationOdometry.h>
29 #include <mrpt/obs/CSensoryFrame.h>
30 #include <mrpt/maps/CMultiMetricMap.h>
31 #include <mrpt/obs/CObservationBearingRange.h>
32 #include <mrpt/obs/CRawlog.h>
33 using namespace mrpt::maps;
34 using namespace mrpt::obs;
35 #else
36 #include <mrpt/slam/CActionRobotMovement2D.h>
37 #include <mrpt/slam/CActionCollection.h>
38 #include <mrpt/slam/CObservationOdometry.h>
39 #include <mrpt/slam/CSensoryFrame.h>
40 #include <mrpt/slam/CMultiMetricMap.h>
41 #include <mrpt/slam/CObservationBearingRange.h>
42 #include <mrpt/slam/CRawlog.h>
43 #endif
44 
45 using namespace mrpt;
46 using namespace mrpt::slam;
47 using namespace mrpt::opengl;
48 using namespace mrpt::system;
49 using namespace mrpt::math;
50 using namespace mrpt::poses;
51 using namespace mrpt::utils;
52 using namespace std;
53 using namespace mrpt::gui;
58 class EKFslam
59 {
60 public:
64  EKFslam();
68  virtual ~EKFslam();
72  void init3Dwindow();
76  void run3Dwindow();
80  void landmark_to_3d(const CRangeBearingKFSLAM2D::KFArray_FEAT &lm, TPoint3D &p);
86  void read_iniFile(std::string ini_filename);
93  void observation(CSensoryFrame::Ptr _sf, CObservationOdometry::Ptr _odometry);
94 
95 protected:
96  CRangeBearingKFSLAM2D mapping;
97 
98  mrpt::system::TTimeStamp timeLastUpdate_;
99 
100  CActionCollection::Ptr action;
101  CSensoryFrame::Ptr sf;
102 
103  mrpt::poses::CPose2D odomLastObservation_;
105  CActionRobotMovement2D::TMotionModelOptions motion_model_default_options_;
106  CActionRobotMovement2D::TMotionModelOptions motion_model_options_;
107 
108  CPosePDFGaussian robotPose_;
109  std::vector<mrpt::math::TPoint2D> LMs_;
110  std::map<unsigned int, CLandmark::TLandmarkID> LM_IDs_;
111  CMatrixDouble fullCov_;
112  CVectorDouble fullState_;
113 
114  mrpt::gui::CDisplayWindow3D::Ptr win3d;
117  vector<TPose3D> meanPath;
118 };
119 
bool use_motion_model_default_options_
used default odom_params
bool SHOW_3D_LIVE
CVectorDouble fullState_
full state vector
CMatrixDouble fullCov_
full covariance matrix
CPosePDFGaussian robotPose_
current robot pose
mrpt::poses::CPose2D odomLastObservation_
last observation of odometry
std::vector< mrpt::math::TPoint2D > LMs_
vector of the landmarks
std::map< unsigned int, CLandmark::TLandmarkID > LM_IDs_
vector of the landmarks ID
CRangeBearingKFSLAM2D mapping
EKF slam 2d class.
bool CAMERA_3DSCENE_FOLLOWS_ROBOT
mrpt::system::TTimeStamp timeLastUpdate_
last update of the pose and map
The EKFslam class provides EKF SLAM 2d from MRPT libraries.
vector< TPose3D > meanPath
mrpt::gui::CDisplayWindow3D::Ptr win3d
MRPT window.
CActionRobotMovement2D::TMotionModelOptions motion_model_default_options_
used if there are is not odom
CActionRobotMovement2D::TMotionModelOptions motion_model_options_
used with odom value motion noise
CActionCollection::Ptr action
actions
CSensoryFrame::Ptr sf
observations


mrpt_ekf_slam_2d
Author(s): Jose Luis, Vladislav Tananaev
autogenerated on Thu Jun 6 2019 19:37:43