35 #include <mrpt/version.h> 37 #include <mrpt/maps/COccupancyGridMap2D.h> 40 #include <mrpt/maps/CLandmarksMap.h> 56 cov(0, 0) = 1, cov(1, 1) = 1, cov(2, 2) = 2 *
M_PI;
62 CActionRobotMovement2D::mmGaussian;
69 #if MRPT_VERSION >= 0x199 78 "InitializeFilter: %4.3fm, %4.3fm, %4.3frad ", mean_point.
x(),
79 mean_point.
y(), mean_point.
phi());
80 float min_x = mean_point.
x() - cov(0, 0);
81 float max_x = mean_point.
x() + cov(0, 0);
82 float min_y = mean_point.
y() - cov(1, 1);
83 float max_y = mean_point.
y() + cov(1, 1);
84 float min_phi = mean_point.
phi() - cov(2, 2);
85 float max_phi = mean_point.
phi() + cov(2, 2);
87 #if MRPT_VERSION >= 0x199 101 min_x, max_x, min_y, max_y, min_phi, max_phi);
107 min_x, max_x, min_y, max_y, min_phi, max_phi,
114 CActionCollection::Ptr _action, CSensoryFrame::Ptr _sf)
124 CSensoryFrame::Ptr _sf, CObservationOdometry::Ptr _odometry)
126 auto action = CActionCollection::Create();
128 odom_move.timestamp = _sf->getObservationByIndex(0)->timestamp;
139 action->insert(odom_move);
150 action->insert(odom_move);
156 "No odometry at update %4i -> skipping observation",
void resetUniformFreeSpace(mrpt::maps::COccupancyGridMap2D *theMap, const double freeCellsThreshold=0.7, const int particlesCount=-1, const double x_min=-1e10f, const double x_max=1e10f, const double y_min=-1e10f, const double y_max=1e10f, const double phi_min=-M_PI, const double phi_max=M_PI)
CMultiMetricMap metric_map_
map
void getCovarianceAndMean(mrpt::math::CMatrixDouble33 &out_cov, CPose2D &mean_point) const MRPT_OVERRIDE
void updateFilter(CActionCollection::Ptr _action, CSensoryFrame::Ptr _sf)
TDrawSampleMotionModel modelSelection
mrpt::utils::CTicTac tictac_
timer to measure performance
void executeOn(CParticleFilterCapable &obj, const mrpt::obs::CActionCollection *action, const mrpt::obs::CSensoryFrame *observation, TParticleFilterStats *stats=NULL)
mrpt::bayes::CParticleFilter::TParticleFilterStats pf_stats_
filter statistics
int initial_particle_count_
number of particles for initialization
mrpt::poses::CPose2D odom_last_observation_
correct time
struct OBS_IMPEXP mrpt::obs::CActionRobotMovement2D::TMotionModelOptions::TOptions_GaussianModel gaussianModel
void observation(CSensoryFrame::Ptr _sf, CObservationOdometry::Ptr _odometry)
const double & phi() const
mrpt::slam::CMonteCarloLocalization2D pdf_
the filter
mrpt::poses::CPosePDFGaussian initial_pose_
initial posed used in initializeFilter()
ProxySelectorContainerByClass< mrpt::maps::CLandmarksMapPtr, TListMaps > m_landmarksMap
CActionRobotMovement2D::TMotionModelOptions motion_model_options_
used with odom value motion noise
ProxyFilterContainerByClass< mrpt::maps::COccupancyGridMap2DPtr, TListMaps > m_gridMaps
mrpt::bayes::CParticleFilter pf_
common interface for particle filters
mrpt::system::TTimeStamp time_last_update_
time of the last update
bool use_motion_model_default_options_
used default odom_params
CActionRobotMovement2D::TMotionModelOptions motion_model_default_options_
used if there are is not odom
void computeFromOdometry(const mrpt::poses::CPose2D &odometryIncrement, const TMotionModelOptions &options)
void resetUniform(const double &x_min, const double &x_max, const double &y_min, const double &y_max, const double &phi_min=-M_PI, const double &phi_max=M_PI, const int &particlesCount=-1)