9 #ifndef CRangeBearingKFSLAM_H
10 #define CRangeBearingKFSLAM_H
69 void processActionObservation(
70 mrpt::obs::CActionCollectionPtr &action,
71 mrpt::obs::CSensoryFramePtr &SF );
83 std::vector<mrpt::math::TPoint3D> &out_landmarksPositions,
84 std::map<unsigned int,mrpt::maps::CLandmark::TLandmarkID> &out_landmarkIDs,
99 std::vector<mrpt::math::TPoint3D> &out_landmarksPositions,
100 std::map<unsigned int,mrpt::maps::CLandmark::TLandmarkID> &out_landmarkIDs,
106 this->getCurrentState(
q,out_landmarksPositions,out_landmarkIDs,out_fullState,out_fullCovariance);
126 this->getCurrentRobotPose(
q);
133 void getAs3DObject( mrpt::opengl::CSetOfObjectsPtr &outObj )
const;
195 predictions_IDs.clear();
196 newly_inserted_landmarks.clear();
213 return m_last_data_association;
223 parts = m_lastPartitionSet;
232 void getLastPartitionLandmarks( std::vector<vector_uint> &landmarksMembership )
const;
236 void getLastPartitionLandmarksAsIfFixedSubmaps(
size_t K, std::vector<vector_uint> &landmarksMembership );
242 double computeOffDiagonalBlocksApproximationError(
const std::vector<vector_uint> &landmarksMembership )
const;
251 void reconsiderPartitionsNow();
258 return &mapPartitioner.options;
263 void saveMapAndPath2DRepresentationAsMATLABFile(
281 void OnGetAction( KFArray_ACT &out_u )
const;
288 void OnTransitionModel(
289 const KFArray_ACT &in_u,
290 KFArray_VEH &inout_x,
291 bool &out_skipPrediction
298 void OnTransitionJacobian( KFMatrix_VxV &out_F )
const;
304 void OnTransitionNoise( KFMatrix_VxV &out_Q )
const;
316 void OnGetObservationsAndDataAssociation(
317 vector_KFArray_OBS &out_z,
319 const vector_KFArray_OBS &in_all_predictions,
320 const KFMatrix &in_S,
322 const KFMatrix_OxO &in_R
325 void OnObservationModel(
327 vector_KFArray_OBS &out_predictions
335 void OnObservationJacobians(
336 const size_t &idx_landmark_to_predict,
343 void OnSubstractObservationVectors(KFArray_OBS &A,
const KFArray_OBS &B)
const;
348 void OnGetObservationNoise(KFMatrix_OxO &out_R)
const;
357 void OnPreComputingPredictions(
358 const vector_KFArray_OBS &in_all_prediction_means,
373 void OnInverseObservationModel(
374 const KFArray_OBS & in_z,
375 KFArray_FEAT & out_yn,
376 KFMatrix_FxV & out_dyn_dxv,
377 KFMatrix_FxO & out_dyn_dhn )
const;
384 void OnNewLandmarkAddedToMap(
385 const size_t in_obsIdx,
386 const size_t in_idxNewFeat );
391 void OnNormalizeStateVector();
400 mrpt::obs::CSensoryFramePtr
m_SF;
Virtual base for Kalman Filter (EKF,IEKF,UKF) implementations.
This class stores a sequence of <Probabilistic Pose,SensoryFrame> pairs, thus a "metric map" can be t...
Column vector, like Eigen::MatrixX*, but automatically initialized to zeros since construction.
Declares a class that represents a Probability Density function (PDF) of a 3D pose .
A class used to store a 3D pose as a translation (x,y,z) and a quaternion (qr,qx,qy,...
Declares a class that represents a Probability Density function (PDF) of a 3D pose using a quaternion...
This class can be used to make partitions on a map/graph build from observations taken at some poses/...
An implementation of EKF-based SLAM with range-bearing sensors, odometry, a full 6D robot pose,...
mrpt::math::TPoint3D landmark_point_t
Either mrpt::math::TPoint2D or mrpt::math::TPoint3D.
std::vector< vector_uint > m_lastPartitionSet
TDataAssocInfo m_last_data_association
Last data association.
mrpt::obs::CActionCollectionPtr m_action
Set up by processActionObservation.
mrpt::utils::bimap< mrpt::maps::CLandmark::TLandmarkID, unsigned int > m_IDs
The mapping between landmark IDs and indexes in the Pkk cov.
const TDataAssocInfo & getLastDataAssociation() const
Returns a read-only reference to the information on the last data-association.
CIncrementalMapPartitioner mapPartitioner
Used for map partitioning experiments.
void getLastPartition(std::vector< vector_uint > &parts)
Return the last partition of the sequence of sensoryframes (it is NOT a partition of the map!...
mrpt::maps::CSimpleMap m_SFs
The sequence of all the observations and the robot path (kept for debugging, statistics,...
void getCurrentState(mrpt::poses::CPose3DPDFGaussian &out_robotPose, std::vector< mrpt::math::TPoint3D > &out_landmarksPositions, std::map< unsigned int, mrpt::maps::CLandmark::TLandmarkID > &out_landmarkIDs, mrpt::math::CVectorDouble &out_fullState, mrpt::math::CMatrixDouble &out_fullCovariance) const
Returns the complete mean and cov.
void getCurrentRobotPose(mrpt::poses::CPose3DPDFGaussian &out_robotPose) const
Returns the mean & the 6x6 covariance matrix of the robot 6D pose (with rotation as 3 angles).
mrpt::obs::CSensoryFramePtr m_SF
Set up by processActionObservation.
CIncrementalMapPartitioner::TOptions * mapPartitionOptions()
Provides access to the parameters of the map partitioning algorithm.
This class allows loading and storing values and vectors of different types from a configuration text...
This is a virtual base class for sets of options than can be loaded from and/or saved to configuratio...
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
GLsizei const GLchar ** string
GLdouble GLdouble GLdouble GLdouble q
GLsizei GLsizei GLchar * source
TDataAssociationMetric
Different metrics for data association, used in mrpt::slam::data_association For a comparison of both...
TDataAssociationMethod
Different algorithms for data association, used in mrpt::slam::data_association.
std::vector< int32_t > vector_int
std::vector< size_t > vector_size_t
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
@ UNINITIALIZED_QUATERNION
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Configuration of the algorithm:
Information for data-association:
TDataAssociationResults results
std::map< size_t, size_t > newly_inserted_landmarks
Map from the 0-based index within the last observation and the landmark 0-based index in the map (the...
mrpt::math::CMatrixTemplateNumeric< kftype > Y_pred_covs
mrpt::vector_size_t predictions_IDs
The options for the algorithm.
int partitioningMethod
Applicable only if "doPartitioningExperiment=true".
bool force_ignore_odometry
Whether to ignore the input odometry and behave as if there was no odometry at all (default: false)
bool create_simplemap
Whether to fill m_SFs (default=false)
TDataAssociationMetric data_assoc_IC_metric
Whether to use mahalanobis (->chi2 criterion) vs. Matching likelihood.
bool doPartitioningExperiment
If set to true (default=false), map will be partitioned using the method stated by partitioningMethod...
float quantiles_3D_representation
Default = 3.
TDataAssociationMetric data_assoc_metric
double data_assoc_IC_ml_threshold
Only if data_assoc_IC_metric==ML, the log-ML threshold (Default=0.0)
mrpt::math::CVectorFloat stds_Q_no_odo
A 7-length vector with the std.
TDataAssociationMethod data_assoc_method
double data_assoc_IC_chi2_thres
Threshold in [0,1] for the chi2square test for individual compatibility between predictions and obser...
float std_odo_z_additional
Additional std.
The results from mrpt::slam::data_association.