9 #ifndef CRangeBearingKFSLAM_H
10 #define CRangeBearingKFSLAM_H
72 void processActionObservation(
73 CActionCollectionPtr &action,
74 CSensoryFramePtr &SF );
86 std::vector<mrpt::math::TPoint3D> &out_landmarksPositions,
87 std::map<unsigned int,CLandmark::TLandmarkID> &out_landmarkIDs,
102 std::vector<mrpt::math::TPoint3D> &out_landmarksPositions,
103 std::map<unsigned int,CLandmark::TLandmarkID> &out_landmarkIDs,
109 this->getCurrentState(q,out_landmarksPositions,out_landmarkIDs,out_fullState,out_fullCovariance);
129 this->getCurrentRobotPose(q);
136 void getAs3DObject( mrpt::opengl::CSetOfObjectsPtr &outObj )
const;
152 void loadFromConfigFile(
154 const std::string §ion);
158 void dumpToTextStream(
CStream &out)
const;
211 predictions_IDs.clear();
212 newly_inserted_landmarks.clear();
229 return m_last_data_association;
239 parts = m_lastPartitionSet;
248 void getLastPartitionLandmarks( std::vector<vector_uint> &landmarksMembership )
const;
252 void getLastPartitionLandmarksAsIfFixedSubmaps(
size_t K, std::vector<vector_uint> &landmarksMembership );
258 double computeOffDiagonalBlocksApproximationError(
const std::vector<vector_uint> &landmarksMembership )
const;
267 void reconsiderPartitionsNow();
274 return &mapPartitioner.options;
279 void saveMapAndPath2DRepresentationAsMATLABFile(
280 const std::string &fil,
282 const std::string &styleLandmarks = std::string(
"b"),
283 const std::string &stylePath = std::string(
"r"),
284 const std::string &styleRobot = std::string(
"r") )
const;
297 void OnGetAction( KFArray_ACT &out_u )
const;
304 void OnTransitionModel(
305 const KFArray_ACT &in_u,
306 KFArray_VEH &inout_x,
307 bool &out_skipPrediction
314 void OnTransitionJacobian( KFMatrix_VxV &out_F )
const;
320 void OnTransitionNoise( KFMatrix_VxV &out_Q )
const;
332 void OnGetObservationsAndDataAssociation(
333 vector_KFArray_OBS &out_z,
335 const vector_KFArray_OBS &in_all_predictions,
336 const KFMatrix &in_S,
338 const KFMatrix_OxO &in_R
341 void OnObservationModel(
343 vector_KFArray_OBS &out_predictions
351 void OnObservationJacobians(
352 const size_t &idx_landmark_to_predict,
359 void OnSubstractObservationVectors(KFArray_OBS &A,
const KFArray_OBS &B)
const;
364 void OnGetObservationNoise(KFMatrix_OxO &out_R)
const;
373 void OnPreComputingPredictions(
374 const vector_KFArray_OBS &in_all_prediction_means,
389 void OnInverseObservationModel(
390 const KFArray_OBS & in_z,
391 KFArray_FEAT & out_yn,
392 KFMatrix_FxV & out_dyn_dxv,
393 KFMatrix_FxO & out_dyn_dhn )
const;
400 void OnNewLandmarkAddedToMap(
401 const size_t in_obsIdx,
402 const size_t in_idxNewFeat );
407 void OnNormalizeStateVector();
414 CActionCollectionPtr m_action;
418 CSensoryFramePtr m_SF;
433 std::vector<vector_uint> m_lastPartitionSet;
Virtual base for Kalman Filter (EKF,IEKF,UKF) implementations.
mrpt::math::TPoint3D landmark_point_t
Either mrpt::math::TPoint2D or mrpt::math::TPoint3D.
An implementation of EKF-based SLAM with range-bearing sensors, odometry, a full 6D robot pose...
const TDataAssocInfo & getLastDataAssociation() const
Returns a read-only reference to the information on the last data-association.
bool force_ignore_odometry
Whether to ignore the input odometry and behave as if there was no odometry at all (default: false) ...
The namespace for Bayesian filtering algorithm: different particle filters and Kalman filter algorith...
mrpt::vector_size_t predictions_IDs
float std_odo_z_additional
Additional std.
void getLastPartition(std::vector< vector_uint > &parts)
Return the last partition of the sequence of sensoryframes (it is NOT a partition of the map!!) Only ...
dynamic_vector< float > CVectorFloat
Column vector, like Eigen::MatrixXf, but automatically initialized to zeros since construction...
Declares a class that represents a Probability Density function (PDF) of a 3D pose using a quaternion...
Configuration of the algorithm:
This class allows loading and storing values and vectors of different types from a configuration text...
CVectorFloat stds_Q_no_odo
A 7-length vector with the std.
CIncrementalMapPartitioner::TOptions * mapPartitionOptions()
Provides access to the parameters of the map partitioning algorithm.
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
std::vector< size_t > vector_size_t
TDataAssociationMetric data_assoc_metric
int partitioningMethod
Applicable only if "doPartitioningExperiment=true".
TDataAssociationMetric
Different metrics for data association, used in mrpt::slam::data_association For a comparison of both...
CMatrixTemplateNumeric< double > CMatrixDouble
Declares a matrix of double numbers (non serializable).
void getCurrentRobotPose(CPose3DPDFGaussian &out_robotPose) const
Returns the mean & the 6x6 covariance matrix of the robot 6D pose (with rotation as 3 angles)...
A bidirectional version of std::map, declared as bimap and which actually contains two std...
TDataAssociationMetric data_assoc_IC_metric
Whether to use mahalanobis (->chi2 criterion) vs. Matching likelihood.
A class used to store a 3D pose as a translation (x,y,z) and a quaternion (qr,qx,qy,qz).
double data_assoc_IC_ml_threshold
Only if data_assoc_IC_metric==ML, the log-ML threshold (Default=0.0)
CMatrixTemplateNumeric< kftype > Y_pred_means
This class stores a sequence of
pairs, thus a "metric map" can be t...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
This class can be used to make partitions on a map/graph build from observations taken at some poses/...
void getCurrentState(CPose3DPDFGaussian &out_robotPose, std::vector< mrpt::math::TPoint3D > &out_landmarksPositions, std::map< unsigned int, CLandmark::TLandmarkID > &out_landmarkIDs, CVectorDouble &out_fullState, CMatrixDouble &out_fullCovariance) const
Returns the complete mean and cov.
float quantiles_3D_representation
Default = 3.
std::vector< int32_t > vector_int
Declares a class that represents a Probability Density function (PDF) of a 3D pose ...
Information for data-association:
bool create_simplemap
Whether to fill m_SFs (default=false)
TDataAssociationMethod data_assoc_method
bool doPartitioningExperiment
If set to true (default=false), map will be partitioned using the method stated by partitioningMethod...
dynamic_vector< double > CVectorDouble
Column vector, like Eigen::MatrixXd, but automatically initialized to zeros since construction...
TDataAssociationResults results
The results from mrpt::slam::data_association.
The options for the algorithm.
TDataAssociationMethod
Different algorithms for data association, used in mrpt::slam::data_association.
double data_assoc_IC_chi2_thres
Threshold in [0,1] for the chi2square test for individual compatibility between predictions and obser...
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...
This is a virtual base class for sets of options than can be loaded from and/or saved to configuratio...