mrpt_ekf_slam_3d.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/CRangeBearingKFSLAM.h>
16 #include <mrpt/math/ops_containers.h>
17 #include <mrpt/opengl/CGridPlaneXY.h>
18 #include <mrpt/opengl/CSetOfLines.h>
19 #include <mrpt/opengl/stock_objects.h>
20 #include <mrpt/gui/CDisplayWindow3D.h>
21 
22 #include <mrpt/version.h>
23 #if MRPT_VERSION >= 0x130
24 #include <mrpt/obs/CActionRobotMovement2D.h>
25 #include <mrpt/obs/CActionRobotMovement3D.h>
26 #include <mrpt/obs/CActionCollection.h>
27 #include <mrpt/obs/CObservationOdometry.h>
28 #include <mrpt/obs/CSensoryFrame.h>
29 #include <mrpt/maps/CMultiMetricMap.h>
30 #include <mrpt/obs/CObservationBearingRange.h>
31 #include <mrpt/obs/CRawlog.h>
32 using namespace mrpt::maps;
33 using namespace mrpt::obs;
34 #else
35 #include <mrpt/slam/CActionRobotMovement2D.h>
36 #include <mrpt/slam/CActionRobotMovement3D.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 using namespace mrpt;
45 using namespace mrpt::slam;
46 using namespace mrpt::opengl;
47 using namespace mrpt::system;
48 using namespace mrpt::math;
49 using namespace mrpt::poses;
50 using namespace mrpt::utils;
51 using namespace std;
52 
57 class EKFslam
58 {
59 public:
63  EKFslam();
67  virtual ~EKFslam();
71  void init3Dwindow();
75  void run3Dwindow();
79  void landmark_to_3d(const CRangeBearingKFSLAM::KFArray_FEAT &lm, TPoint3D &p);
85  void read_iniFile(std::string ini_filename);
92  void observation(CSensoryFrame::Ptr _sf, CObservationOdometry::Ptr _odometry);
93 
94 protected:
95  CRangeBearingKFSLAM mapping;
96 
97  mrpt::system::TTimeStamp timeLastUpdate_;
98 
99  CActionCollection::Ptr action;
100  CSensoryFrame::Ptr sf;
101 
102  mrpt::poses::CPose3D odomLastObservation_;
103 #if MRPT_VERSION >= 0x150
104  CActionRobotMovement3D::TMotionModelOptions motion_model_options_;
105 #endif
106 
107  mrpt::gui::CDisplayWindow3D::Ptr win3d;
110  vector<TPose3D> meanPath;
111  CPose3DQuatPDFGaussian robotPose_;
112  std::vector<mrpt::math::TPoint3D> LMs_;
113  std::map<unsigned int, CLandmark::TLandmarkID> LM_IDs_;
114  CMatrixDouble fullCov_;
115  CVectorDouble fullState_;
116 };
117 
bool SHOW_3D_LIVE
CVectorDouble fullState_
full state vector
CMatrixDouble fullCov_
full covariance matrix
std::vector< mrpt::math::TPoint3D > LMs_
vector of the landmarks
CPose3DQuatPDFGaussian robotPose_
current robot pose
std::map< unsigned int, CLandmark::TLandmarkID > LM_IDs_
vector of the landmarks ID
bool CAMERA_3DSCENE_FOLLOWS_ROBOT
mrpt::system::TTimeStamp timeLastUpdate_
last update of the pose and map
mrpt::poses::CPose3D odomLastObservation_
last observation of odometry
The EKFslam class provides EKF SLAM 3d from MRPT libraries.
vector< TPose3D > meanPath
CRangeBearingKFSLAM mapping
EKF slam 3d class.
mrpt::gui::CDisplayWindow3D::Ptr win3d
MRPT window.
CActionCollection::Ptr action
actions
CSensoryFrame::Ptr sf
observations


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