/home/runner/work/beluga/beluga/beluga_ros/include/beluga_ros/amcl.hpp Source File#
Beluga ROS
|
amcl.hpp
Go to the documentation of this file.
105 using execution_policy_variant = std::variant<std::execution::sequenced_policy, std::execution::parallel_policy>;
126 spatial_hasher_{params_.spatial_resolution_x, params_.spatial_resolution_y, params_.spatial_resolution_theta},
162 std::visit([&](auto& sensor_model) { sensor_model.update_map(std::move(map)); }, sensor_model_);
199 beluga::actions::propagate(policy, motion_model(control_action_window_ << base_pose_in_odom)) | //
208 auto random_state = ranges::compose(beluga::make_from_state<particle_type>, std::ref(map_distribution_));
236 beluga::MultivariateUniformDistribution<Sophus::SE2d, beluga_ros::OccupancyGrid> map_distribution_;
constexpr void reset() noexcept
Definition: amcl.hpp:88
void initialize_from_map()
Initialize particles using the default map distribution.
Definition: amcl.hpp:157
std::variant< beluga::DifferentialDriveModel2d, beluga::OmnidirectionalDriveModel, beluga::StationaryModel > motion_model_variant
Motion model variant type for runtime selection support.
Definition: amcl.hpp:97
std::variant< std::execution::sequenced_policy, std::execution::parallel_policy > execution_policy_variant
Execution policy variant type for runtime selection support.
Definition: amcl.hpp:105
void update_map(beluga_ros::OccupancyGrid map)
Update the map used for localization.
Definition: amcl.hpp:160
const auto & particles() const
Returns a reference to the current set of particles.
Definition: amcl.hpp:136
std::tuple< Sophus::SE2d, beluga::Weight > particle_type
Weighted SE(2) state particle type.
Definition: amcl.hpp:91
std::variant< beluga::LikelihoodFieldModel< beluga_ros::OccupancyGrid >, beluga::BeamSensorModel< beluga_ros::OccupancyGrid > > sensor_model_variant
Sensor model variant type for runtime selection support.
Definition: amcl.hpp:102
void initialize(Sophus::SE2d pose, Sophus::Matrix3d covariance)
Initialize particles with a given pose and covariance.
Definition: amcl.hpp:152
void initialize(Distribution distribution)
Initialize particles using a custom distribution.
Definition: amcl.hpp:140
auto update(Sophus::SE2d base_pose_in_odom, beluga_ros::LaserScan laser_scan) -> std::optional< std::pair< Sophus::SE2d, Sophus::Matrix3d >>
Update particles based on motion and sensor information.
Definition: amcl.hpp:178
Amcl(beluga_ros::OccupancyGrid map, motion_model_variant motion_model, sensor_model_variant sensor_model, const AmclParams ¶ms=AmclParams(), execution_policy_variant execution_policy=std::execution::seq)
Constructor.
Definition: amcl.hpp:115
void force_update()
Force a manual update of the particles on the next iteration of the filter.
Definition: amcl.hpp:230
Thin wrapper type for 2D sensor_msgs/LaserScan messages.
Definition: laser_scan.hpp:34
Thin wrapper type for 2D nav_msgs/OccupancyGrid messages.
Definition: occupancy_grid.hpp:47
constexpr detail::every_n_fn every_n
Implementation of sensor_msgs/LaserScan wrapper type.
std::pair< Sophus::SE2< Scalar >, Sophus::Matrix3< Scalar > > estimate(Poses &&poses, Weights &&weights)
DifferentialDriveModel< Sophus::SE2d > DifferentialDriveModel2d
Implementation of nav_msgs/OccupancyGrid wrapper type.
constexpr detail::on_motion_fn on_motion
Struct containing parameters for the Adaptive Monte Carlo Localization (AMCL) implementation.
Definition: amcl.hpp:36
std::size_t max_particles
Maximum allowed number of particles.
Definition: amcl.hpp:57
std::size_t resample_interval
Number of filter updates required before resampling.
Definition: amcl.hpp:44
double kld_epsilon
Maximum particle filter population error between the true distribution and the estimated distribution...
Definition: amcl.hpp:70
double kld_z
Upper standard normal quantile for , where is the probability that the error in the estimated distri...
Definition: amcl.hpp:74
double alpha_fast
Exponential decay rate for the fast average weight filter, used in deciding when to recover from a ba...
Definition: amcl.hpp:65
double update_min_a
Rotational movement required from last resample for resampling to happen again.
Definition: amcl.hpp:41
double alpha_slow
Exponential decay rate for the slow average weight filter, used in deciding when to recover from a ba...
Definition: amcl.hpp:61
double spatial_resolution_theta
Spatial resolution around the z-axis to create buckets for KLD resampling.
Definition: amcl.hpp:83
double spatial_resolution_x
Spatial resolution along the x-axis to create buckets for KLD resampling.
Definition: amcl.hpp:77
std::size_t min_particles
Minimum allowed number of particles.
Definition: amcl.hpp:54
double spatial_resolution_y
Spatial resolution along the y-axis to create buckets for KLD resampling.
Definition: amcl.hpp:80
bool selective_resampling
Whether to enable selective resampling to help avoid loss of diversity in the particle population....
Definition: amcl.hpp:51
double update_min_d
Translational movement required from last resample for resampling to happen again.
Definition: amcl.hpp:38
Generated by